Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of Classes in a VCX at runtime
Message
From
20/09/2016 03:58:39
 
 
To
20/09/2016 03:13:29
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01641005
Message ID:
01641118
Views:
65
Likes (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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform