HK_president


Dear all,

I'm new to VF 9.0, can anyone tell me how to call C++ dll from VF. The IN and OUT argument are both structures. Thx in advance.




Re: Calling C++ DLL

Naomi Nosonovsky


There are two well-known classes to work with the structures. One is written by Christof Wollenhaupt and another by late Ed Rauh clsHeap. Both can be found at www.universalthread.com Downloads section (unfortunately this site requires to be a member to access its content).

On the same site I found an example of using C++ dll in the following message http://www.universalthread.com/wconnect/wc.dll 2,15,1155306 or you can also check this sample http://www.geocities.com/ResearchTriangle/9834/dequote.htm






Re: Calling C++ DLL

CetinBasoz

You can use string for structures and parse it yourself. Check for sample in solution.app (Windows API\Use API functions that require a STRUCT).




Re: Calling C++ DLL

HK_president

If I have to pass a structure(IN argument) to the DLL, how can I create the structure inVF and populate it



Re: Calling C++ DLL

Naomi Nosonovsky

See sample here http://www.berezniker.com/display/VFP/Copy+Files+to+Clipboard For more complex structures you may need to use two classes I already recommended in my first message.



Re: Calling C++ DLL

Naomi Nosonovsky

Sergey just added a new page http://www.berezniker.com/display/VFP/Windows+API+support+class which you definitely would find useful.