LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need to call DeAllocateLStrHandleArray?

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.

0 Kudos
Message 1 of 4
(2,333 Views)

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. 

0 Kudos
Message 2 of 4
(2,282 Views)

@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.

0 Kudos
Message 3 of 4
(2,280 Views)
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..



0 Kudos
Message 4 of 4
(2,263 Views)