How to Export my Class from my Hand Coded DLL Project

Hi there,

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?

I thank you in advance

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?

This is what i want to do… but dont know how to begin…

i have this code

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…

thanks in advance

There are a few things I see that are wrong… this may take a few steps.

Make a Backup Copy.

#0 change any INCLUDE(' 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

Edit Project and add to Defines: _FrancLinkMode_=>1;_FrancDllMode_=>0

A post on 3 ways to set project defines C10: Adding StringTheory to a Hand Coded project

Does that build and run?

1 Like

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

Yes a Class in an EXP must list all Methods (except private).

I posted my Pro2Exp on GitHub that I created from one by @jslarve and @lodestar . Paste your CLASS from your INC file into it and click Mangle.

Example ABUtil Class and its methods, plus this one needs a Queue

Then Mangled you see all the methods …

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.

1 Like

I use Jeff’s all the time to create exports for hand coded apps. This looks turbo charged:)

I added dual-column 5710a gas chromatographs with flame analyzing detectors

Only on the floor models

My oldest would know what to do with those:)