• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

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
0
fluidtronic
Asked:
fluidtronic
  • 2
  • 2
1 Solution
 
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
 
twocandlesCommented:
try to declare it as this:

char *returnValue[MAX_VALUE];

thus initializing it.
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now