Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DLL (COM) Compatibility of VFP7
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00549936
Message ID:
00550164
Vues:
52
>>>>>I am new to COM technology as it relates to using it outside of VFP. Maybe a simple question will give me a clearer insight to the flexibility of VFP7 and COM. If I am writing a custom DLL in VFP7 for a Visual C++ client that speaks to a MSSQL backend and has been using VB DLL's to answer calls from the VC++ client to perform various functions, will I have the same functionality if the VB DLL (using ADO) is written in VFP7? If I don't, why not?
>>>>>
>>>>>Thanks for your input.
>>>>
>>>>You should have the same functionality. ADO 2.x is a COM server and VFP can use (almost) any COM server, and be one itself. It used to be that raising events was the limitation but with VFP7 I understand that limitation is gone.
>>>>
>>>>HTH
>>>
>>>No, VFP 7 still cannot raise events by itself, but if you use my EventRaiser COM you will have no problems with that even in VFP 5 :)
>>
>>My mistake, I think the word "raising" is the confusion here. You're right, it can't "raise" events but it does have the ability to bind to a COM server's events.
>>
>>Here I was thinking about the events raised by ADO, which used to be the difference pre-VFPCOM.
>>
>>Thanks for the point of clarification.
>
>Yes, EventHandler() function in VFP 7 or VFPCOM.DLL BindEvents() function in VFP 7, 6 and 5 can bind the exposed events from other COM objects, but not from VFP COM object as the latter cannot expose any events. Here you need a workaround like my EventRaiser which is a VB COM DLL and does the event rasing by the commands from VFP COM object which instantiated it.

OK, I guess my simple question has resulted in a somewhat confusing conclusion, so I am asking your indulgence to clarify what I just read. Do I understand that the VFP DLL when built and registered does not expose any of its events such as would be revealed in a type library, such that I would need a VB COM DLL, which when instantiated by the VFP COM DLL will expose the VFP COM events to the, let's say, VC++ client and enable it to 'see' the dll, make calls to it and get a return value or result?

Thanks for your answer and go easy on me, I am still new at this from the VFP angle.

Bill
CySolutions, Medical Information Technology
You're only as good as your last
success, so . . .If it works. . .don't fix it!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform