static wxDllType         GetProgramHandle();
 
     // return the platform standard DLL extension (with leading dot)
-    static const wxChar *GetDllExt() { return ms_dllext; }
+    static const wxString& GetDllExt() { return ms_dllext; }
 
     wxDynamicLibrary() : m_handle(0) { }
     wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT)
 
 
     // platform specific shared lib suffix.
-    static const wxChar *ms_dllext;
+    static const wxString ms_dllext;
 
     // the handle to DLL or NULL
     wxDllType m_handle;
 
 // ---------------------------------------------------------------------------
 
 #if defined(__WXPM__) || defined(__EMX__)
-    const wxChar *wxDynamicLibrary::ms_dllext = _T(".dll");
+    const wxString wxDynamicLibrary::ms_dllext(_T(".dll"));
 #elif defined(__WXMAC__) && !defined(__DARWIN__)
-    const wxChar *wxDynamicLibrary::ms_dllext = wxEmptyString;
+    const wxString wxDynamicLibrary::ms_dllext; // empty string
 #endif
 
 // for MSW/Unix it is defined in platform-specific file
 
 #include "wx/msw/private.h"
 #include "wx/msw/debughlp.h"
 
-const wxChar *wxDynamicLibrary::ms_dllext = _T(".dll");
+const wxString wxDynamicLibrary::ms_dllext(_T(".dll"));
 
 // ----------------------------------------------------------------------------
 // private classes
 
 
 // standard shared libraries extensions for different Unix versions
 #if defined(__HPUX__)
-    const wxChar *wxDynamicLibrary::ms_dllext = _T(".sl");
+    const wxString wxDynamicLibrary::ms_dllext(".sl");
 #elif defined(__DARWIN__)
-    const wxChar *wxDynamicLibrary::ms_dllext = _T(".bundle");
+    const wxString wxDynamicLibrary::ms_dllext(".bundle");
 #else
-    const wxChar *wxDynamicLibrary::ms_dllext = _T(".so");
+    const wxString wxDynamicLibrary::ms_dllext(".so");
 #endif
 
 // ============================================================================