Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DLL doesn't see open tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00620369
Message ID:
00620862
Vues:
15
>>>I converted a Vcx class into a DLL
>>>
>>>
>>>When I use my Vcx in code, I open tables, I create the object from the class and everything run fine.
>>>
>>>But when I use my dll (instead of the vcx), it doesn't see the previously open tables
>>>
>>>How can my DLL see already open tables...?
>>
>>It can't. When you use a DLL, it runs a separate copy of VFP (even an in-process DLL). As such, variables, tables and cursors are not available to it. You need to reopen the tables and pass the necessary information to the DLL to position the record where you need it.
>
>Thanks,
>
>Is there a way to pass a "picture" of the environment to the DLL so it can reopen table, indexex and restore record pointer like they were before launching the DLL?
>
>
>Like a memory dump and restore afterward...

You can do that in a number of ways. You could pass it an object parameter that held all the information you wanted to track. You could also dumo the information to file and the DLL read the file and parse it that way.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform