Jest fer fun:
> For some peticular reason you have to compile your dll for use by External
> "C" functions if you use cpp compiler. Secondly, whether C or C++ you have
Yes indeedy. Without going into a lot of detail, C++ allows class member
functions to have the same name. The compiler differentiates them by their
parameter list order and type. The compiler generates the proper information
for the linker, and the end result is that you and me really don't care.
When dynamically linking however, this information must be preserved somehow
and yup, name mangling is the answer. There are many mangling schemes, but
usually the name is based on the number and type of parameters to that
function. Without the 'extern "C"' declaration modifier, something like
MyClass::MyFunc(int index, double time) winds up being called something like
MyFunc@@2ID as far as the compiler is concerned. Wich, incedentally, can be
used quite easily by VEE. You just have to get the name right.
> to place the _declspec(dllexport) in front of each function definition. If
> that was not done when your dll was compiled, then you won't see an export
Correct again. The "old way" was to use a .def file with an EXPORTS section.
The new way (for MS anyway) is to use their "declaration specifier" stuff
and say it's gonna be a dllexport.
Shawn Fessenden
Mgr., Technical Support
Oswego Software, Inc.
mailto:shawn@oswegosw.com
http://www.oswegosw.com
> For some peticular reason you have to compile your dll for use by External
> "C" functions if you use cpp compiler. Secondly, whether C or C++ you have
Yes indeedy. Without going into a lot of detail, C++ allows class member
functions to have the same name. The compiler differentiates them by their
parameter list order and type. The compiler generates the proper information
for the linker, and the end result is that you and me really don't care.
When dynamically linking however, this information must be preserved somehow
and yup, name mangling is the answer. There are many mangling schemes, but
usually the name is based on the number and type of parameters to that
function. Without the 'extern "C"' declaration modifier, something like
MyClass::MyFunc(int index, double time) winds up being called something like
MyFunc@@2ID as far as the compiler is concerned. Wich, incedentally, can be
used quite easily by VEE. You just have to get the name right.
> to place the _declspec(dllexport) in front of each function definition. If
> that was not done when your dll was compiled, then you won't see an export
Correct again. The "old way" was to use a .def file with an EXPORTS section.
The new way (for MS anyway) is to use their "declaration specifier" stuff
and say it's gonna be a dllexport.
Shawn Fessenden
Mgr., Technical Support
Oswego Software, Inc.
mailto:shawn@oswegosw.com
http://www.oswegosw.com
works or why the dlls must be compiled this way, but I reckon I got you
started so I'll give it another whirl.
For some peticular reason you have to compile your dll for use by External
"C" functions if you use cpp compiler. Secondly, whether C or C++ you have
to place the _declspec(dllexport) in front of each function definition. If
that was not done when your dll was compiled, then you won't see an export
table. If you want to get technical, Microsoft has a bunch of documents on
_declspec( that would probably lead you to why it must be used. If the
Extern "C" is not used under a cpp compile, then you see your function names
jumbulia in the export table. If Keithley gave you the source code for this
dll, then you can make these modifications on your own. If they did not,
then you are at their mercy, call them up and tell them your external
application requires it. Like we were instructed before when wading through
Multi-vendor support don't mention any names if you don't have to.
-----Original Message-----
From: Johan Bouwhuis [mailto:Johan.Bouwhuis@edu.han.nl]
Sent: Thursday, April 01, 1999 3:24 AM
To: hpvxd_xc@hpislsup.lvld.hp.com
Subject: DLLs
Dear Sir,
I am still busy figuring how to implement a Keithley-board into HP VEE 5.0
(by using a DLL). I examined some DLLs with Quick View and the DLL needed
(according to Keithley's documantation) -DasShl32.dll has no Exported
Functions (Import Tables: Kernel32.dll , WOW32.dll). DasShell16.dll and
DasShell.dll (older versions) have all Export Functions I need... But when
using for example DasShell.dll I get the error message "A device attached to
the system is not functioning (Error number: 716)".
I tried some things in MS Visual C++ but with no results... I thought that
importing the DLL and calling the function(s) are the only steps to be taken
for using a specific DLL in HP VEE. I think that I am lacking some
basic-knowledge here...So, my question is where to find documentation
(books) about DLL's.
BTW HP VEE 5.0: " Only DLLs specifically written for HP VEE will work
because HP VEE does not suppport 8 -bit characters or 32-bit reals" Is it
possible that the Keithley's DLLs don't work at all in HP VEE ??
Yours Truly,
Johan Bouwhuis
============================================================
J.J. Bouwhuis tel.: + 31 26 363 01 58
Hanzestraat 200 e-mail: Johan.Bouwhuis@edu.han.nl
NL-6826 MS ARNHEM
Student at The College of Automotive Engineering in Arnhem, The Netherlands
============================================================