LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL

Hi All,
 
I have a problem passing data structures to a DLL function. I used the void* pointer and tried to pass a pointer of the data structure to it.
But when I debug the DLL I find that the address given (and content) is not the one used inside the DLL, and of course the content is invalid.
What is the best to pass data structure (or other memory block) to and from a DLL?
 
Regards,
              Gil
Below you can find the function declaration I use in my DLL.

Here is a type of message handling function , which pointer to it is provided to the DLL to convey its message to the calling program.
typedef void (*DLL_LOG_FUNC)(char* text2, int LineType);   
 
This is the declaration of the test function inside the DLL.
The parameter  "void* pData1" is a given pointer to a data structure to be used by the DLL functions.
int __stdcall FTLIB1001_Test (int* StateFlag, DLL_LOG_FUNC MsgFunc, void* pData1, void* pData2, void* pData3)
0 Kudos
Message 1 of 1
(2,963 Views)