× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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);


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

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

fileid
    (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
http://www.powertechgroup.com



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience 
the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/



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-2024 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.