Im trying to use handcoded classes on my project and trying to export their definitions, but i have some issues that i cant resolve, can anyone give me a book or article /or tutorial to read about creating classes and inserting them into hand-code projects?
So you need help with the EXP file?
Is your hand coded project creating a DLL?
And you want that DLL to Export the Classes?
The Classes to export have the TYPE attribute?
And Symbols in LINK(,) and DLL()
Or are you trying to use external Class files in a Hand Coded EXE?
First pic, is mi class prototype and declaration, then i have a module with procedures oimplementation, then my main WIN32.dll code and at last my .EXP file.
but im not sure if im doing it right… thats why im asking for help or some tutorial…
There are a few things I see that are wrong… this may take a few steps.
Make a Backup Copy.
#0 change any INCLUDE('benefixxxx.inc) to add ,ONCE
#1 Work this out with your Project building as an EXE. Once that works then make it a DLL. As an EXE you’ll want a TestAsExe Procedure the does some basic stuff to see your class works. Once you have that working make a backup.
#2 Your Benificario Class is not a TYPE. My recollection is that does not work for exporting. Also coding it as a TYPE is better so
a. In the INC change "Benificario CLASS" to “BenificarioClass CLASS,TYPE,MODULE…”
b. In CLW search and replace “Benificario.” to “BenificarioClass.” note the trailing period
c. In your project you’ll have to declare Benificario CLASS(BenificarioClass). so you have an Instance, you cannot use the TYPE class it will GPF
Get that working, backup
Next time … in the INC file your CLASS line will need LINK() and DLL() with _symbols
…
In class CLW add MODULE('Beneficiario.clw'),LINK('Beneficiario.clw',_FrancLinkMode_),DLL(_FrancDllMode_)
Edit Project and add to Defines: _FrancLinkMode_=>1;_FrancDllMode_=>0
Thank you very much Charles, the answer is very useful, do I have to export all the methods of the class to be able to use them? in case of using my class as a parameter … as declared in the .EXP, for example (long = l, string = sb, long by reference = Rl) … but I don’t know how to map a class
Another way to get the mangled lines is to try to import them i.e. declare external. It will throw Undefined messages in the MAP file that have the Mangling you need.
Really… thank you very much, very cool tool, I was looking within the definitions of other projects such as clarion typified in the .exp but it was a very tedious task. Once again, thank you very much.
In the Pro2Exp repository I added a new utility EXPfromErrors to allow pasting the MAP Unresolved External errors. It parses them to create the mangled lines for the EXP. If you’ve got the original class then using Pro2EXP does them all perfectly, but if you just have a few new exports grabbing the errors is easier.
It sorts them by Class and also offers a sortable columns list.