Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6175842

Use Windows -export option to provide undecorated exported names

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0u1
    • core-svc
    • 1.5
    • 5.0
    • b14
    • generic
    • windows_2000

      > 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

            ohair Kelly Ohair (Inactive)
            ohair Kelly Ohair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: