Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory objects saved into cursors
Message
From
19/02/2019 13:12:01
 
 
To
19/02/2019 09:28:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01666501
Message ID:
01666559
Views:
58
>I can't figure out how to pass a regular object by reference to a DLL function. I've tried sandwiching it in an array and passing the array by reference, but it only passes the first cell, and no data related to the location of other cells.

I've finally bitten the bullet and looked at the _API interface (vfp9\Samples\API\*.c source code) and figured out how those functions work. The pro_ext.h definitions convey information for accessing objects, but their exposed functionality is limited.

I've been able to get an object reference passed to a DLL function using pro_ext.h and its FoxInfo table and the SET LIBRARY TO myCode.fll, for example. I'm able to access object members, etc, and I can obtain the address of the object itself, but there is no corresponding _RetObj() function where I can create even a reference to the other object. I've had the idea of using a sacrificial object that I can force-populate with the foreign member information from the object I desire, but that's a clunky solution and I don't even know if it would work.

I need someone like Calvin Hsia or maybe Rick Strahl to help me on this.

Information on how to do this is here:
https://flylib.com/books/en/2.920.1.41/1/
https://jeffpar.github.io/kbarchive/kb/148/Q148776/

And search for _API in VFP's help, and look for "data structures" (under APIs), "object routines" and "returning results" under "API library routines".

I would like to also say I'm amazed how how similarly Calvin's VFP and my Visual FreePro, Jr. are designed. I did not use anything in VFP for a reference other than its design at the API level (meaning only knowledge of XBASE functions, and nothing internal to VFP), but there are so many similarities in our design it's amazing. I even coded myself into the VFP BackStyle = 0 (transparent) error where it would slowly creep up and get darker and darker. I had to add special code to work around that when a transparent background was used. :-) I had a good laugh that day.
Previous
Reply
Map
View

Click here to load this message in the networking platform