Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List of Classes in a VCX at runtime
Message
De
20/09/2016 03:58:39
 
 
À
20/09/2016 03:13:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01641005
Message ID:
01641118
Vues:
66
J'aime (1)
>>>>Hi All,
>>>>
>>>>From a EXE or APP, I would like to get a list of the Classes in a VCX that is compiled into to the runtime. I do not wish to distribute the actual VCX file. But I can not access it as table when it is apart of the EXE/APP. Is there a build-in or third party function that makes it possible to get a list of classes?
>>>>
>>>>Thanks
>>>
>>>Antonio is correct, USE is working in the exe. AVCXClasses() does not work.
>>
>>Oh, ok.
>
>I've made a test EXE with a main PRG and a test.vcx classlibrary, and AVCXCLASSES is working for me in the EXE, with or without using DEBUG/ENCRYPT.
>
>This is my main.prg test file:
>
>
>*SET CLASSLIB TO test.vcx
>
>*--
>LOCAL loEx as Exception
>TRY
>	FOR I = 1 TO AVCXCLASSES(laVCX, "test.vcx")
>		MESSAGEBOX( laVCX(I,1) )
>	ENDFOR
>CATCH TO loEx
>	MESSAGEBOX('Error ' + TRANSFORM(loEx.ErrorNo) + ', ' + loEx.Message)
>ENDTRY
>*--
>
>QUIT
>
>
>I got it working even compiling as COM+ object.
>Why does work for me and not for others?
>
>I'm using VFP 9 SP2 (5185)

After compiling, rename the class and run the executable. Or just move the executable to somewhere else and run from there.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform