Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C library
Message
From
12/03/1999 09:22:31
 
 
To
12/03/1999 09:10:00
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00196760
Message ID:
00196769
Views:
17
>I have been asked a question by someone interested in using VFP for a project, and I do not have an answer. They are currently using VB for a project, but it is becoming database intensive and they want to switch to VFP. However, they are calling a c library from VB and they need to make sure they can also call this library from VFP. If so, I would also like to know which versions of VFP can do this. Also, is there anything inparticular that needs to be done. I'm afraid I haven't had to call any libraries while using VFP so I am fairly ignorant on the subject. Thank you in advance,


If the C library is a .DLL that uses C-style calls, you may be able to access it simply by using the DECLARE...DLL command to define the entrypoints and types of parameters passed if the parameters are of a type natively supported by VFP. If this is not the case, you may need to create data structures in memory using a tool like Paul Tatavu's POINTERS class or my CLSHEAP class (both can be downloaded from UT's File Section.)

If the C library is accessed as methods of an OLE Automation server or ActiveX control, then VFP 5 or 6 will more than likely be able to use it. ActiveX controls which are containers, or require support of non-native system events, may be problems.

if the C library is provided as a static library which must be linked into compiled code, you'll have to write something as a shell around it to expose its entrypoints as methods of an OLE Server or as entrypoints of a C-style .DLL, or incorporate it into a .FLL (a .FLL is most easily explained as a VFP-specific variant of a .DLL, which can interact with VFP very closely.)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform