TC> AM> /// TTT.DEF
TC> AM> EXPORTS
TC> AM> CRAP ;Pascal causes all uper-case - exports don't have
TC> AM> to be case sensitive. :)
TC>I haven't learned how to make DEF files (yet, still) so this stuff I
wouldn'
TC>understand. Under EXPORTS, do I put the names (like a list) of all my
TC>functions in upper case?
Yes, you put all the names of all the functions in upper case but make
sure that they are declared as
extern "C"{ <- prevents name mangling!!
.. FAR PASCAL func(...); <- far pascal causes all names to be
uppercase
}
if you put a function into exports section with name mangling, then it
could look like
int FAR PASCAL Func(int); <- name mangling enabled
EXPORTS
II@FUNC@I <- weird!! or something like that
a function should also be declared as a FAR PASCAL because then all
programming languages can use it and not only case sensitive ones.
All functions in the Win API are FAR PASCAL except a few that are C
(those funcitons acept variable amount of variables - ex. wsprintf(...)
TC>And, when I use them in VB, I declare them with the upper case version of
th
TC>function names?
If VB is not a case sensitive language it doesn't really matter since
all the functions would be assumed to be upper case (I think VB is not
case sensitive)
TC>Lastly, (if you don't mind all my questions ;) If I want to use the same
DLL
TC>in a C++ program, do I use the upper case or lower case/case-sensitive
TC>version? I know I'd make an .H file to declare teh extern. But do I do
_expo
TC>and the .DEF or just add the .DLL to my project list?
Add the DLL to the project (I use BC++ 3.1 and you have to import a LIB
not a DLL - use IMPLIBW to create a LIB from a DLL in BC++ 3.1. The LIB
file automatically runs the DLL at run time and it includes references
to all the used functions in a DLL. Much more portable that use of
IMPORTS section in the DEF file :)
TC>Just a side-thought. I wonder if anyone has had any luck making .VBX
control
TC>using Borland C++ 3.1??
VBX are basic equivelent of DLL. Use DLLs instead :)
* SLMR 2.1a * Unable to locate Coffee -- Operator Halted!
--- FMail 0.92
---------------
* Origin: The Programmer's Oasis on FIDONET! (1:348/203)
|