PDA

View Full Version : problems in calling DLL



NewsArchive
12-18-2013, 07:45 AM
Per suggestions from Friedrich I believe my problems in calling a dll from
my SB script is because the called function is not being exported correctly
by the dll.

In the dlls .exp file I have this:

LIBRARY 'CPINSTALLREG' GUI
EXPORTS
a whole bunch of other stuff then
;start of exported procedures
AUTOREGISTER@FRsclsb

Using SBDLL.EXP as an example, per Friedrich's email, the exported function
should be something like this:

AUTOREGISTER @1

How do I override the .exp file created by Clarion 8.0.9661 and use my own
..exp file ? I tried to add MyOwn.exp to the solution's external resource
files but I get a compile error:

AUTOREGISTER is unresolved for export.

This is a new area for me so please pardon my ignorance - I have never
created a DLL that is to be called by something other than a Clarion
generated .exe or dll.

regards,

Chuck

NewsArchive
12-18-2013, 01:42 PM
Hi Chuck,

Use the NAME attribute on the procedures prototype to set an unmangled
uppercase name eg

NAME('AUTOREGISTER')

See NAME in the Clarion Help.

Graham

NewsArchive
12-18-2013, 01:45 PM
Chuck,

I have created a (very) quick-and-dirty C8.0 #9661 demo app for you:

http://www.lindersoft.com/projects/C8_dll.zip

The ZIP includes the full DLL source code, the DLL binary and the .sb8
project file to call the DLL from the installer.

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

--Helping You Build Better Installations
--SetupBuilder "point. click. ship"
--Create Windows 8 ready installations in minutes
--Official COMODO Code Signing and SSL Certificate Partner

NewsArchive
12-20-2013, 11:56 AM
Graham,

Tried your suggestion and it crashed the installer.

regards,

Chuck

NewsArchive
12-20-2013, 11:57 AM
Friedrich,

I decided to create a .exe and run that - way too many things going on in my
dll - the .exe works fine.

regards,

Chuck