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" ${|}