LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

howto use AZNewHandle

Does anyone have examples of how to use XXNewHandle, XXSetHandleSize or SetCINArraySize?
0 Kudos
Message 1 of 4
(2,840 Views)
Check the following example, which include most of the functions you are asking about:

Passing a Variety of Data Types from DLL to LabVIEW

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 2 of 4
(2,825 Views)
I would recommend using DSNewHandle and DSSetHandleSize over AZ*

A Rafiq
0 Kudos
Message 3 of 4
(2,819 Views)
here is one sample to convert LabVIEW string to char*

inline char* GetCharAlloc(LStrHandle LVStrH){
char* lpszRet=NULL;
lpszRet = (char*)malloc(LStrLen(*LVStrH)+1); //len + NULL char
memcpy(lpszRet, LStrBuf(*LVStrH), LStrLen(*LVStrH));
lpszRet[LStrLen(*LVStrH)]=0;
return lpszRet;
}

NOTE: Calling code is resonsible for freeing the memory for char* when done using.

Hope this helps.
A Rafiq
0 Kudos
Message 4 of 4
(2,818 Views)