03-23-2017
08:10 AM
- last edited on
06-09-2026
04:09 PM
by
Content Cleaner
Could someone tell me the base data type of uPtr returned by the DSNewPtr function (https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/properties-and-methods/lv-manager/dsnewptr...), where this is defined?
Looking at line 228 of the excode.h header file (https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/properties-and-methods/lv-manager/labview-...), it's of type uChar which is uInt8 and then uint8_t.
notepad++_2017-03-23_13-07-41.png
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.