View Full Version : Custom Action DLL

01-15-2003, 04:54 PM
I am getting ready to write a Custom Action DLL. I use BCB 5 and not VC++. Will using the export key word in a Borland style DLL be sufficient or do I need to make a VC++ style DLL and hand create the .def file? In your example you use @1 in the .def file after old style function signature example and @2 in the .def file of the example using the new style signature. Is this significant?

I created an .exe file using only Windows API calls and set that as a custom action and it works fine. I want to use a DLL file to combine several functions in one place.


01-15-2003, 05:55 PM
What version of Express are you using? I'm looking at the 4.0 help and the sample for the "New Style" doesn't show a sample .def file. Regardless the only significance is that suppose you have three functions in your DLL with names like Func1, Func2 and Func3. Then your .def file should look like:

Func1 @1
Func2 @2
Func3 @3

Also see the following thread for some code regarding writing New Style DLL custom actions using Delphi. Might be helpfull.


01-16-2003, 06:42 AM
Thanks for your quick reply. I am using version 4.0 of Express. The example I am refering to is in the samples directory ModifyConfigSys.cpp and .def. So can I use the Borland C++ compiler with the export key word and skip the .def file or do I need to use the the VC++ option in my compiler and hand make the .def file making sure the first function ends in @1, the second in @2 the third in @3, etc.?


01-16-2003, 04:15 PM
Sorry but I don't know Borland C++ architecture well enough to say whether using Export will work. Try the VC++ option an making the .def file by hand.

01-16-2003, 06:16 PM
I did research and the _export option or __declspec(dllexport) which is now the prefered method does not give ordinal addresses in the def file so doing it by had it the way to go.