diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_secur.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index c48ded22d6..e91496f774 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -66,8 +66,14 @@ TNtlmAuth::~TNtlmAuth() bool TNtlmAuth::getSpn( TCHAR* szSpn, size_t dwSpnLen )
{
+ HMODULE hDll = GetModuleHandle(_T("secur32.dll"));
+ if (!hDll)
+ hDll = LoadLibrary(_T("secur32.dll"));
+ if (!hDll)
+ return false;
+
GetUserNameExType myGetUserNameEx =
- ( GetUserNameExType )GetProcAddress( GetModuleHandleA( "secur32.dll" ), "GetUserNameExW" );
+ ( GetUserNameExType )GetProcAddress(hDll, "GetUserNameExW" );
if ( !myGetUserNameEx ) return false;
|