]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dlmsw.cpp
fix unused parameter warning after r60715
[wxWidgets.git] / src / msw / dlmsw.cpp
index e517bcc3657352bd2db6fd066217d0b7d33a3068..9b1e7428fbddc36613d44648388422011269ba1c 100644 (file)
@@ -65,7 +65,7 @@ private:
     wxDynamicLibrary m_dll;
 
 
-    DECLARE_NO_COPY_CLASS(wxVersionDLL)
+    wxDECLARE_NO_COPY_CLASS(wxVersionDLL);
 };
 
 // class used to create wxDynamicLibraryDetails objects
@@ -194,7 +194,7 @@ wxString wxVersionDLL::GetFileVersion(const wxString& filename) const
     wxString ver;
     if ( m_dll.IsLoaded() )
     {
-        wxChar *pc = wx_const_cast(wxChar *, (const wxChar*) filename.t_str());
+        wxChar *pc = const_cast<wxChar *>((const wxChar*) filename.t_str());
 
         DWORD dummy;
         DWORD sizeVerInfo = m_pfnGetFileVersionInfoSize(pc, &dummy);
@@ -205,7 +205,10 @@ wxString wxVersionDLL::GetFileVersion(const wxString& filename) const
             {
                 void *pVer;
                 UINT sizeInfo;
-                if ( m_pfnVerQueryValue(buf.data(), _T("\\"), &pVer, &sizeInfo) )
+                if ( m_pfnVerQueryValue(buf.data(),
+                                        const_cast<wxChar *>(_T("\\")),
+                                        &pVer,
+                                        &sizeInfo) )
                 {
                     VS_FIXEDFILEINFO *info = (VS_FIXEDFILEINFO *)pVer;
                     ver.Printf(_T("%d.%d.%d.%d"),
@@ -279,9 +282,11 @@ wxDllType wxDynamicLibrary::GetProgramHandle()
 
 /* static */
 wxDllType
-wxDynamicLibrary::RawLoad(const wxString& libname, int WXUNUSED(flags))
+wxDynamicLibrary::RawLoad(const wxString& libname, int flags)
 {
-    return ::LoadLibrary(libname.t_str());
+    return flags & wxDL_GET_LOADED
+            ? ::GetModuleHandle(libname.t_str())
+            : ::LoadLibrary(libname.t_str());
 }
 
 /* static */