Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instantiate a class from an .EXE
Message
 
 
À
02/09/2005 08:42:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01046171
Message ID:
01046184
Vues:
16
>Hi,
>
>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.

The help also says :


cInApplication


Specifies the Visual FoxPro application (.exe or .app) containing the .vcx file you specify with cModule. You must include an extension for the application. CInApplication is ignored if cModule is omitted, or if cInApplication is the empty string or the null value. If you want to use the cInApplication parameter, you must specify the name of .vcx file for cModule. You cannot pass the name of a .prg file or compiled program (.fxp).
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform