General information
Category:
Windows API functions
>Thanks for the information. Passing by reference with @ is fine for simple structures, the problem I faced was that the structure itself is made up of other pointers (CHAR*) and LONG values. If it were just LONG values I could pass the relevant number of bytes (number of LONG values multiplied by 4) but the pointers to the CHAR variables really threw me. Is there a way to create a structure to pass to the function by reference that contains other values passed by reference?
>
>In the interim I have created a VB OCX that wraps around the API command and slots into Fox... It would be nice to be able to do it in pure fox though... to date I've found that there is very little that Fox *cannot* do.
Yes, it can.
First, there is a Christof Lange's struct class in UT downloads.
Next, you can allocate memory for string using WinAPI function GlobalAlloc (or something similar), get a pointer to memory with GlobalLock, copy string to buffer and store pointer value in structure. After call of function you have to free the memory by GlobalFree.
But IMO for such kind of tasks there is a C++ language. With C++ you could solve this problem within one hour and avoid a VB runtime overhead.
Alexander
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only