-
Enhancement
-
Resolution: Fixed
-
P3
-
5.0u1
> I had to do this:
>
> _sym = GetProcAddress(_handle, "nptInitialize"); \
> if ( _sym == NULL ) { \
> _sym = GetProcAddress(_handle, "_nptInitialize@12"); \
> } \
> if ( _sym == NULL ) NPT_ERROR("Cannot find nptInitialize"); \
>
> Or it won't work on Windows 2000 X86 (tmi machine).
>
> Windows 2003 AMD64 and IA64 worked with just GetProcAddress(_handle, "nptInitialize");
Local Windows Expert Response: :^)
I understand the issue now - NPT.DLL is built without a .def file or a /exports option so you are getting the default decoration. I wonder if it would be better to export nptInitialize and nptTerminate -- eg: add this to the Makefile :-
ifeq ($(PLATFORM), windows)
OTHER_LCF = -export:nptInitialize -export:nptTerminate
endif
If you do this you'll be able to use GetProcAddress(_handle, "nptInitialize");
---------------
This applies to the various transport libraries too, or anywhere
GetProcAddress is used.
###@###.### 10/7/04 22:12 GMT
>
> _sym = GetProcAddress(_handle, "nptInitialize"); \
> if ( _sym == NULL ) { \
> _sym = GetProcAddress(_handle, "_nptInitialize@12"); \
> } \
> if ( _sym == NULL ) NPT_ERROR("Cannot find nptInitialize"); \
>
> Or it won't work on Windows 2000 X86 (tmi machine).
>
> Windows 2003 AMD64 and IA64 worked with just GetProcAddress(_handle, "nptInitialize");
Local Windows Expert Response: :^)
I understand the issue now - NPT.DLL is built without a .def file or a /exports option so you are getting the default decoration. I wonder if it would be better to export nptInitialize and nptTerminate -- eg: add this to the Makefile :-
ifeq ($(PLATFORM), windows)
OTHER_LCF = -export:nptInitialize -export:nptTerminate
endif
If you do this you'll be able to use GetProcAddress(_handle, "nptInitialize");
---------------
This applies to the various transport libraries too, or anywhere
GetProcAddress is used.
###@###.### 10/7/04 22:12 GMT