There is a problem loading the win32-loader (SVN rev. 61594) plug-in
via the LoadLibrary API function on Windows 98 Second Edition. I have
not yet found out why the win32-loader plug-in behaves different on
Windows 98 Second Edition compared to other NSIS plug-ins.

Below are my notes regarding the analysis:

Building win32-loader plug-in on Linux Sid:
svn co svn://svn.debian.org/d-i/trunk/win32-loader -r 61594
cd win32-loader
i586-mingw32msvc-gcc -Os plugins/cpuid/cpuid.c plugins/cpuid/plugin.c
plugins/systeminfo/systeminfo.c plugins/string.c
-Wl,--file-alignment,512 -Werror -D_WIN32_WINNT=0x0500
-L/usr/i586-mingw32msvc/lib/nsis -lpluginapi -shared -o
plugins/win32-loader.dll

Evaluating of resulting win32-loader.dll on Windows 98 Second Edition:
C:\win32-loader> getfunc win32-loader.dll get_arch
LoadLibrary of win32-loader.dll failed: 0x0000001F

=> ERROR_GEN_FAILURE 31 (0x1F) - A device attached to the system is
not functioning.

in comparison System plug-in from nsis-2.45-1 shows the following result:
C:\win32-loader> getfunc System.dll Call
Call function address in System.dll: 0x6E3C301E

Source code of getfunc.c
#include <windows.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
   HINSTANCE hInstLib;

   if (3 != argc)
   {
      printf("usage: %s dll function\n", argv[0]);
   }
   else
   {
      hInstLib = LoadLibrary(argv[1]);
      if (NULL != hInstLib)
      {
         printf("%s function address in %s: 0x%08X\n", argv[2],
argv[1], (unsigned int) GetProcAddress(hInstLib, argv[2]));
         FreeLibrary(hInstLib);
      }
      else
      {
         printf("LoadLibrary of %s failed: 0x%08X\n", argv[1],
(unsigned int)GetLastError());
      }
   }
   return 0;
}



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to