03-23-2017 08:10 AM
Could someone tell me the base data type of uPtr returned by the DSNewPtr function (http://zone.ni.com/reference/en-XX/help/371361N-01/lvexcode/aznewptr_dsnewptr/), where this is defined?
Looking at line 228 of the excode.h header file (http://zone.ni.com/reference/en-XX/help/371361N-01/lvexcode/labview_manager_functions/), it's of type uChar which is uInt8 and then uint8_t.
I think I must have made a mistake as I would have expected size_t for the uPtr data type.
Solved! Go to Solution.
03-23-2017 09:14 AM
The data you get from DSNewPtr is like the data you get from malloc, right? It's whatever you want it to be. malloc returns a void*, implying no particular size. Perhaps here they wanted to imply that you are getting size_t number of uChars.
03-23-2017 09:25 AM
A pointer is typically a U32.
/Y
03-23-2017 10:16 AM
Thanks. I guess that makes sense.
I hate to admit that I misread the uPtr typedef as a uChar data type rather than a pointer (size_t) to a uChar
So the uPtr type when using the Call Library Function Node from LV should always be Numeric->Unsigned Pointer-sized Integer to let LV determine x64 or x86.