Hi Jevgeni

I am glad your program is now working, it was your original question
that prompted my to make a program that uses the API.

Seems there are many ways to skin a cat and what you say to store the
pointer of the previous field is more efficient.

You mention debugging my program.
What bug did you find? I would like to correct it.
As you may guess I dont believe my code is 'dangerously inefficient'.
Yes my code is not the most efficient but it was mostly a demonstration
of how to process the API data, and as such it has succeeded.


From: Jevgeni Astanovski <jevgeniast@xxxxxxxxx>
Date: Mon, 22 Sep 2014 09:52:44 +0300
I meant different thing.
I would retrieve QDFTRTVD API data into an allocated memory chunk.
Then I would create user space to keep retrieved structures in a
format of FieldData_t format.
I would place two integers in the beginning of the user space that are
length of the data in the user space and offset to the first unsent
field in the user space.
Then I would return first retrieved field from the user space and
increment a pointer to the next one.
When called with "NEXT" I would just return a field pointed by my
"next" pointer in the user space and increment it.
In this case you also do not need to pass previous field when requesting
By the way, after analyzing and debugging your program I've got mine
working as well. I've caught the logic of "Where Used" fields and now
it works fine in my program.
On Fri, Sep 19, 2014 at 10:04 AM, Frank Kolmann <fkolmann@xxxxxxxxx>
Hi Jevgeni
Thank you for your reply , much appreciated.
However I am not sure what you mean.
I am happy to be corrected if I am wrong.
From my code you can see.
I only Create and Populate the Userspace for the #FIRST record.
- snip --
So I believe I am doing the code correctly exactly how you describe it
should be done.

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.