Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C or C++ dll
Message
De
17/05/2016 14:32:43
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
17/05/2016 05:56:47
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01636486
Message ID:
01636529
Vues:
137
>Assuming i have a C dll.(or a C++).
>this dll in my knowledge cannot be embed on vfp object browser to see its methods/events.its not a classic com dll.
>how can i communicate from vfp with this dll and use all its expected functions.
>-a visual example code can be usefull.
>
>update: i know its turns around DECLARE DLL but i want a real example with a C dll for ex.
>thank you in advance.

One of the very good things in a link referenced in this thread is:

Here’s a tip I remember Drew Speedie mentioning a few years back. Because API functions
with the same name as FoxPro functions take precedence in the calling heirarchy, you can
dynamically load API functions on-demand by wrapping them in a VFP function of the same
name. The first time you call it, the VFP function will be called, the API function will load
and get called, but on subsequent calls the API function will be called directly.
? getActiveWindow()

getActiveWindow.prg
DECLARE INTEGER GetActiveWindow IN user32
RETURN GetActiveWindow()

You must remember to include any parameters needed by the API in the prg.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform