summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-09-15 17:05:58 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-09-15 17:07:08 +0300
commit31526bc15e409fb3260b465d928ddcb855266278 (patch)
tree5139e8c4e65289ce919584433dfa79d8b5ce0144 /ucb
parent05b49209093847ec28bbac8d69e2d2a94a438cdb (diff)
Improve the Windows code a bit
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/odma/odma_lib.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx
index 91cd79ee1941..a7f31701979e 100644
--- a/ucb/source/ucp/odma/odma_lib.cxx
+++ b/ucb/source/ucp/odma/odma_lib.cxx
@@ -80,16 +80,23 @@ namespace odma
if (bBeenHere)
return bLoaded;
+ bBeenHere = sal_True;
+
::rtl::OUString sPath;
#ifdef WNT
- sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL"));
+ wchar_t system32[MAX_PATH];
+ UINT n = GetSystemDirectoryW( system32, MAX_PATH );
+
+ if (n == 0)
+ return sal_False;
+
+ sPath = ::rtl::OUString( system32, n ) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL"));
+
#endif
#ifdef UNX
sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodma.so"));
#endif
- bBeenHere = sal_True;
-
pODMA = osl_loadModule( sPath.pData,SAL_LOADMODULE_NOW );
if( !pODMA)
return sal_False;