]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
Compilaton fixes.
[wxWidgets.git] / src / msw / utils.cpp
index 2ce7da19565afc076e16aae68913ab62d31146ab..4ba9ff2a28917149e8eeb0e7758b40a616edd212 100644 (file)
     #endif
 #endif
 
-// ----------------------------------------------------------------------------
-// module globals
-// ----------------------------------------------------------------------------
-
-#if wxUSE_ON_FATAL_EXCEPTION
-    static bool gs_handleExceptions = FALSE;
-#endif
-
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -416,8 +408,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
 
     wxString strPath;
     ::GetModuleFileName(::GetModuleHandle(NULL),
-                        strPath.GetWriteBuf(MAX_PATH), MAX_PATH);
-    strPath.UngetWriteBuf();
+                        wxStringBuffer(strPath, MAX_PATH), MAX_PATH);
 
     // extract the dir name
     wxSplitPath(strPath, &strDir, NULL, NULL);
@@ -601,8 +592,8 @@ bool wxGetEnv(const wxString& var, wxString *value)
 
     if ( value )
     {
-        (void)::GetEnvironmentVariable(var, value->GetWriteBuf(dwRet), dwRet);
-        value->UngetWriteBuf();
+        (void)::GetEnvironmentVariable(var, wxStringBuffer(*value, dwRet),
+                                       dwRet);
     }
 
     return TRUE;
@@ -1211,40 +1202,3 @@ extern long wxCharsetToCodepage(const wxChar *name)
 
 #endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
 
-// ----------------------------------------------------------------------------
-// wxApp::OnFatalException() support
-// ----------------------------------------------------------------------------
-
-bool wxHandleFatalExceptions(bool doit)
-{
-#if wxUSE_ON_FATAL_EXCEPTION
-    // assume this can only be called from the main thread
-    gs_handleExceptions = doit;
-
-    return TRUE;
-#else
-    wxFAIL_MSG(_T("set wxUSE_ON_FATAL_EXCEPTION to 1 to use this function"));
-
-    (void)doit;
-    return FALSE;
-#endif
-}
-
-#if wxUSE_ON_FATAL_EXCEPTION
-
-extern unsigned long wxGlobalSEHandler()
-{
-    if ( gs_handleExceptions && wxTheApp )
-    {
-        // give the user a chance to do something special about this
-        wxTheApp->OnFatalException();
-
-        // this will execute our handler and terminate the process
-        return EXCEPTION_EXECUTE_HANDLER;
-    }
-
-    return EXCEPTION_CONTINUE_SEARCH;
-}
-
-#endif // wxUSE_ON_FATAL_EXCEPTION
-