02-28-2018 11:33 AM
Compiled a VI as a DLL. One of the outputs is an array of LabVIEW strings. Interface defines the call as:
int32_t __cdecl function(..., LStrHandleArray *X, ...);
and gives me three managing functions
LStrHandleArray __cdecl AllocateLStrHandleArray (int32 elmtCount); MgErr __cdecl ResizeLStrHandleArray (LStrHandleArray *hdlPtr, int32 elmtCount); MgErr __cdecl DeAllocateLStrHandleArray (LStrHandleArray *hdlPtr);
I allocate a LStrHandArray to pass to my function and call the function as
LStrHandleArray X = AllocateLStrHandleArray(0); MgErr error = function(..., &X, ...);
Everything works fine. Do I need to call?
MgErr error DeAllocateLStrHandleArray (&X);
If I do it returns an error (18438). Not too worried about not calling it, as the code exits a couple of lines below, but just wondering what it is and how to convert that to an error message.
03-01-2018 05:30 PM
Hi instrumento,
What environment are you calling the DLL?
If you are calling it in CVI, it may be best to post in LabWindows/CVI forums to get people who work closer to that environment.
03-01-2018 05:33 PM
@sherlockholmWhat environment are you calling the DLL?If you are calling it in CVI, it may be best to post in LabWindows/CVI forums to get people who work closer to that environment.
I don't have CVI (not even completely sure what that is).
I'm using the DLL with a simple C++ program compiled with MSVC++ 2015.
03-02-2018 10:13 AM
I don't have CVI (not even completely sure what that is).I'm using the DLL with a simple C++ program compiled with MSVC++ 2015.
I think I'll post there too. Not sure this forum software has cross posting capabilities, like on Usenet..