Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using .vcx compiled in one .exe by another .exe
Message
From
18/05/2001 12:39:44
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00508751
Message ID:
00508819
Views:
23
Hi!

As I already suggested, set the class library in the child EXE using function from the main.exe. You can set that library in the main.exe before child.exe is called. This way child.exe can use it, however, ensure ADDITIVE word is everywhere and SET("CLASSLIB") lists that library is loaded.

Finally, how you run a child exe? do you run it by DO command from VFP? If you run it as a separate applciation, of course, this will never work and child application should be compiled with that library included.

>>Hi!
>>
>>Well, did you used 'ADDITIVE' When setting VCX second time? WIthout that second SET CLASSLIB overrides the first one. WIth ADDITIVE both libraries will be loaded in the memory.
>>
>>BTW, for debugging purposes, just display the result of the 'SET("CLASSLIB")' function. This way you will see wich libraries are currently loaded.
>>
>>HTH.
>
>
>Yes, I made sure that I included the ADDITIVE option when opening the second class library in the oApp.Init.
>
>While debugging, in addition to showing the set('classlib'), I'm also showing curdir(), set('path') right before I do the new form, just to make sure things are where I want them to be...
>
>Here's my current sequence of events:
>In the main.prg, I call the SetPath() function, which among other things does a SET CLASSLIB TO mainlib
>
>If SetPath() evaluates to true, I then oApp = CREATEOBJECT("Application")
>When oApp gets created, in the oApp.Init I have a:
>SET CLASSLIB TO registry ADDITIVE
>This.AddObject("oGetIni", "oldinireg")
>
>
>Now, the second .exe I'm launching has a main program with just:
>
>*** For debug only
>?curdir()
>?set('path')
>?Set('classlib')
>****
>* Been trying to use any of the following lines
>* SET CLASSLIB TO mainlib IN main.exe ADDITIVE ALIAS mainlib2
>* SET CLASSLIB TO mainlib IN main.exe ADDITIVE
>* SET CLASSLIB TO mainlib
>
>DO FORM wtwuoem
>
>
>All of the SET CLASSLIB attempts above return some error
>and if I don't use one at all, I still get error instantiating class eventhough the SET('classlib') clearly shows both the mainlib and registry libraries are loaded.
>
>
>- Brian
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform