Skip to content
⌘ NSIS Forum Archive

How to load a DLL? (NSudoDM)

2 posts

teknixstuff#

How to load a DLL? (NSudoDM)

I'm trying to load a DLL (specifically NSudoDM), but I keep getting an error. Btw all you have to do with this DLL is load it, there are no functions to call in it.
Here's the code I've got for it:

SetOutPath $INSTDIR
File nsudodm.dll
System::Call 'KERNEL32::AddDllDirectory(w "$InstDir")'
System::Call 'KERNEL32::LoadLibrary(t "$InstDir\nsudodm.dll")p.r8'
${IfThen} $8 P= 0 ${|} MessageBox MB_ICONSTOP "Failed to load nsudodm.dll" ${|}
Anders#
...
System::Call 'KERNEL32::LoadLibrary(t "$InstDir\nsudodm.dll")p.r8?e'
Pop $9
${IfThen} $8 P= 0 ${|} MessageBox MB_ICONSTOP "Failed to load nsudodm.dll, error $9" ${|} 
What does Dependency Walker say?