X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..d162a7ee7d6bab3d0c714b865806377aeb5d0d9e:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 4556f6fa97..986e6602bf 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -48,7 +48,7 @@ #include "wx/timer.h" -#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__) +#if !defined(__GNUWIN32__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__) #include #ifndef __MWERKS__ @@ -78,8 +78,10 @@ #include #endif // USE_NET_API -#if defined(__WIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__) - #include +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + #ifndef __UNIX__ + #include + #endif #ifndef __GNUWIN32__ #include @@ -600,14 +602,16 @@ bool wxGetEnv(const wxString& var, wxString *value) { #ifdef __WIN16__ const wxChar* ret = wxGetenv(var); - if (ret) + if ( !ret ) + return FALSE; + + if ( value ) { *value = ret; - return TRUE; } - else - return FALSE; -#else + + return TRUE; +#else // Win32 // first get the size of the buffer DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0); if ( !dwRet ) @@ -623,7 +627,7 @@ bool wxGetEnv(const wxString& var, wxString *value) } return TRUE; -#endif +#endif // Win16/32 } bool wxSetEnv(const wxString& var, const wxChar *value) @@ -660,6 +664,8 @@ struct wxFindByPidParams // the PID we're looking from DWORD pid; + + DECLARE_NO_COPY_CLASS(wxFindByPidParams) }; // wxKill helper: EnumWindows() callback which is used to find the first (top @@ -883,7 +889,6 @@ bool wxShutdown(wxShutdownFlags wFlags) bOK = ::OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken) != 0; -#ifndef __WXWINE__ if ( bOK ) { TOKEN_PRIVILEGES tkp; @@ -902,7 +907,6 @@ bool wxShutdown(wxShutdownFlags wFlags) // Cannot test the return value of AdjustTokenPrivileges. bOK = ::GetLastError() == ERROR_SUCCESS; } -#endif } if ( bOK )