I'm trying to call the Qp0lGetPathFromFileID API and having amazingly minimal 
success. I've tried every way I can think of and I get a null pointer every 
time. I even tried the example code from PID (or whatever they're called now) 
once I understood what it was attempting to do and after I'd modified it to be 
more correct. (And I e-mailed my changes back to them first, asking if they 
thought I made the right changes and they definitely agreed.)

>From the UNIX-type APIs manual, the function prototype is:

   char *Qp0lGetPathFromFileID(char *buf, size_t size,
                               Qp0lFID_t fileid);

    (Output)  A pointer to a buffer that will be used to
    hold an absolute path name of the file identified by fileid.

    (Input)  The number of bytes in the buffer buf.

    (Input)  The identifier of the file whose path name is to be returned.

That seems so simple... but a couple thing throw me.

First, the full description of buf includes "The buffer must be large enough to 
contain the full path name including the terminating NULL character." Since I 
don't know what the path name is until after the API returns, how can I know 
how large buf should be?

Second, buf is described as being both 'output' and 'pointer'. What does that 
mean? If I pass a pointer, is the API going to change it ('output')? If so, how 
do I associate it with the "buf" that I've somehow managed to make "...large 
enough to contain the full path name including the terminating NULL character"? 
The only thing that makes minimal sense is a LINKAGE item that I've set ADDRESS 
OF to null.

Is there sense to be made of this in COBOL?

Much TIA for any light that can be shed on this.

Tom Liotta

Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788
Fax    253-872-7904

Your favorite stores, helpful shopping tools and great gift ideas. Experience 
the convenience of buying online with Shop@Netscape! 

Get your own FREE, personal Netscape Mail account today at 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.