02-05-2012 01:18 AM
I want to use viIn32(*,*,*,val) to get the data(setted to be 0x4) from PXI device. But when I debugged the code, There is An
FATAL RUN-TIME ERROR: "Main.c", line 376, col 40, thread id 0x000000B0: Uninitialized pointer argument to library function.
I right clicked on the variable and select "View Variable Value". I found the value of val is "0x00000100(0) (no size info)".
I want to know what this means and how to sovle this problem.
02-05-2012 03:41 AM
@Treefull wrote:
I want to use viIn32(*,*,*,val) to get the data(setted to be 0x4) from PXI device. But when I debugged the code, There is An
FATAL RUN-TIME ERROR: "Main.c", line 376, col 40, thread id 0x000000B0: Uninitialized pointer argument to library function.
Hi,
the function you are using should look something like
status = viIn32 (instrument_handle, VI_A16_SPACE, offset, &value);
value is a pointer of type ViUInt32 and needs to be initialized before you use it in this function call: how did you declare value in your code, and (how) did you initialize it? The error message suggests that you did not initialize it...
02-05-2012 04:57 AM
Thank you for your reply!
I have solved the problem.
In the old code, I defined the val as ViPUInt32 derectly.
Now, I defined the val as ViUInt32, and used &val in the viIn32() function.
Wolfgang 已写:
@Treefull wrote:
I want to use viIn32(*,*,*,val) to get the data(setted to be 0x4) from PXI device. But when I debugged the code, There is An
FATAL RUN-TIME ERROR: "Main.c", line 376, col 40, thread id 0x000000B0: Uninitialized pointer argument to library function.
Hi,
the function you are using should look something like
status = viIn32 (instrument_handle, VI_A16_SPACE, offset, &value);
value is a pointer of type ViUInt32 and needs to be initialized before you use it in this function call: how did you declare value in your code, and (how) did you initialize it? The error message suggests that you did not initialize it...