Hi,
I've some problems usind call of API when the function return a PChar. How can I read the value pointed by the Pchar within VFP ?
Also with the types of parameters or values like Byte,Boolean,Struct...
Thank's for your help !
Jean Paul
VFP doesn't have structures. Or data types of byte or pointers. You have to fudge a little. You have to use STRING or INTEGER, or STRING @ or INTEGER @. (@ = by reference/address, similar to a pointer.) That said, it sometimes takes a little testing to get the correct values back. Sometimes you have to take the returned value as a string, and convert it to numeric by byte ordering and then recombine/add them.
click on the Download picture on the left, and choose the Visual FoxPro area. Next enter 'struct' (without the quotes) in the Title area and press Enter. You should get back an entry for:
struct.zip - "A Visual FoxPro class to simplify packing and unpacking of structures for use WINAPI functions or other DLLs Code is included."
There is excellent documentation on it's use in a .DOC file.
Thnks for your replies, I already use string, integers, etc with @ fir send parameters in the API call. My problem is how to do when the API return a pointer....The samples sites you give are very interesting ! Have good days (and sorry for my English !)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.