Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

netapi32.dll is not working in Working Windows

1 reply to this topic


  • Full Members
  • 1 posts

Posted 09 August 2010 - 08:13

I am using InstallShield professional 7 for preparing setup. In my code, I used netapi32.dll for getting the list of machines present in network. This code works fine with Windows XP,2000,2003 etc. But if same setup is run on Windows 7 OS, it gives error of "Loading of DLL failed". Please if anyone knows cuause of this problem then please rply urgently.


  • Moderators
  • 1,447 posts

Posted 09 August 2010 - 20:28

I am not sure, but I suppose the API could be different in later Windows versions. As always check the latest api documentation (sample: http://msdn.microsof...23(VS.85).aspx). Sometimes you need to call a different method from a different OS, often the same function name ending with Ex or similar.

Apart from an incorrect function call, it could also be that there is a dependency missing (when it says loading failed, that is normally the case), but for such a core dll as netapi32.dll I don't see why that would be. It is more likely that there is a missing dll dependency for the Installshield engine launching the call. I would compile an EXE file that embeds the api call, then run it through depends.exe profiler to see if that works. Alternatively create an EXE harness and run the dll call from the EXE code in debug mode whilst stepping through the code. Look in the call stack for potential error messages or clues.
-Stein Åsmul