×
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.
Hi
I have coded a C program to get info from the QDFRTVFD API.
It works and successfully retrieves Fields (incl posn and atr) and
Constants from a DSPF.
It is here.
http://wiki.midrange.com/index.php/CQDFRTVFD
However the way it is coded is very inefficient because I invoke the API
for every field/constant in the DSPF.
To be more efficient I would need to invoke the API only once and retain
the API returned data.
I want to keep the API invoke in the called function.
To retain data after a C program ends is , I believe the definition of
‘memory leak’, so I cant see how I can call the API within the C program
and also retain the data after the program ends.
I know how to pass data back to the caller, in fact that is how the field
information is returned. However for this I have memory allocated in the
caller.
The C program does a ‘malloc’ and here is where I am lost, as I cannot
see how to pass back the data in the ‘malloc’.
Any help. TIA.
Frank
As an Amazon Associate we earn from qualifying purchases.
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.