Solved

pointer to pointer

Posted on 2009-03-30
5
303 Views
Last Modified: 2012-05-06
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
Comment
Question by:fluidtronic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 24018065
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
 
LVL 6

Accepted Solution

by:
twocandles earned 50 total points
ID: 24018093
try to declare it as this:

char *returnValue[MAX_VALUE];

thus initializing it.
0
 

Author Comment

by:fluidtronic
ID: 24018110
Hi
I have tried this but with the same result.

char **Specifier,FormatString[80];
*Specifier=FormatString;       
CWUIControlsLib_CWAxisGetFormatString(Axis[0],NULL,Specifier);
0
 

Author Closing Comment

by:fluidtronic
ID: 31564293
That works. Thank you.
0
 
LVL 6

Expert Comment

by:twocandles
ID: 24018477
You're welcome. Thanks for the points!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question