Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiate a class from another .EXE
Message
From
02/09/2005 08:40:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Instantiate a class from another .EXE
Miscellaneous
Thread ID:
01046169
Message ID:
01046169
Views:
73
It work
loTest = NewObject("MyClassName", "MyVCXName.VCX", "MyExecutableName.EXE")
But it don't work
loTest = NewObject("MyClassName", "MyPRGName.PRG", "MyExecutableName.EXE")
If I have a class in a program(.EXE) and I want to use this class of an another I can use it with the NewObject() function. But if the class are stored in a .PRG file it don't work and display an error message.

In the .PRG file I have
Define class MyClassName as Custom
...
EndDefine
The help file say:

NEWOBJECT(cClassName, cModule, cInApplication)

cModule
Specifies a .vcx file or Visual FoxPro program (.prg, .fxp, .mpr, .app, .exe, and so on) containing the class or object specified with cClassName. The default is a .vcx file. If you specify a program file, you must include an extension.
Next
Reply
Map
View

Click here to load this message in the networking platform