pointer to pointer

Hello
I'm trying to use a NI library function that is decleard as below.
CWUIControlsLib_CWAxisGetFormatString (CAObjHandle objectHandle,
                                                       ERRORINFO *errorInfo,
                                                       char **returnValue);
The purpose is to read out a format string in "returnValue".
If I declear a pointer to pointer to char as char **Pointer, the compiler (CVI 8.5) complains
that the pointer is not initialized and I do not get the sting I'm looking for.
Anyone have a proposal ?
Regards Per
fluidtronicAsked:
Who is Participating?
 
twocandlesConnect With a Mentor Commented:
try to declare it as this:

char *returnValue[MAX_VALUE];

thus initializing it.
0
 
ozoCommented:
can you initialize the pointer?
if it is a pointer in which to return a value, you may want to point it to the place where you want the value returned.
0
 
fluidtronicAuthor Commented:
Hi
I have tried this but with the same result.

char **Specifier,FormatString[80];
*Specifier=FormatString;       
CWUIControlsLib_CWAxisGetFormatString(Axis[0],NULL,Specifier);
0
 
fluidtronicAuthor Commented:
That works. Thank you.
0
 
twocandlesCommented:
You're welcome. Thanks for the points!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.