01-18-2007 03:45 PM
01-19-2007 08:47 AM
Why not put the functions you want to call from both places into the DLL? You can then call them from the EXE or from the DLL.
Why do you need to use pointers to functions? If you export them from your DLL and statically link them to your exe, your can call the functions directly and don't need to LoadLibrary and GetProcAddress.
01-19-2007 08:57 AM
01-19-2007 09:07 AM
01-19-2007 10:14 AM
01-19-2007 10:40 AM
01-20-2007 08:04 AM
01-22-2007 10:37 AM
01-23-2007 09:52 AM
10-05-2007 02:44 PM
Just starting to twiddle with the Open Watcom myself and found this thread interesting, so I did a search at www.openwatcom.org for Calling Convention...
At www.openwatcom.org/index.php/Calling_Conventions i found this, which, I believe, is GOOD news:
= = = begin: referenced text = = =
Specifying Calling Conventions
The first important fact to realize is that calling conventions are not part of the language standards. Calling conventions are, by nature, platform specific, while C and C++ language standards are not. There are two common de facto standards of designating calling conventions. The traditional way employs type qualifiers; their usage is similar to const or volatile keywords. For example:
extern int __cdecl foo( char * );
In this example, foo is a function taking a pointer to char as an argument and returning int; the function uses the __cdecl calling convention (also known as the C calling convention). Other calling conventions supported by Open Watcom C and C++ compilers are __stdcall, __syscall, __fortran, __pascal, and the default calling convention, __watcall.
The other method of specifying calling convention is using the __declspec type qualifier. The following declaration is equivalent to the one above:
__declspec(__cdecl) extern int foo( char * );
This syntax was first supported in Microsoft C compilers in the early 1990s; most compilers that target Windows support it. Note that the __declspec qualifier has more uses than specifying calling conventions; such uses are not discussed here.
Most of the calling convention specifiers have aliases, for instance _cdecl (for __cdecl) or _System (for __syscall). Use of aliases with no underscores or a single underscore and lowercase letter is discouraged, because such identifiers are not implementation-reserved and may conflict with user code. See the C/C++ User's Guide for further details.
= = = end: referenced text = = =
This is after "open watcom 1.7" was released in August 2007, I do not know if earlier versions do this had this option.
It would also be nice if the "LabVIEW Embedded Development" and Watcom would work together, too. Has anyone tried this combination ??