]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
use "..." for wx includes instead of <...>
[wxWidgets.git] / src / msw / utils.cpp
index 185d3ebb9ef6472940bfb02f0cab98dd5e82ad5d..9322dcb46e72e70a0b1da2f27c1a483422038a34 100644 (file)
 
 #include "wx/msw/private.h"     // includes <windows.h>
 
+#ifdef __GNUWIN32_OLD__
+    // apparently we need to include winsock.h to get WSADATA and other stuff
+    // used in wxGetFullHostName() with the old mingw32 versions
+    #include <winsock.h>
+#endif
+
 #include "wx/timer.h"
 
 #if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
@@ -877,6 +883,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
         bOK = ::OpenProcessToken(GetCurrentProcess(),
                                  TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
                                  &hToken) != 0;
+#ifndef __WXWINE__
         if ( bOK )
         {
             TOKEN_PRIVILEGES tkp; 
@@ -895,6 +902,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
             // Cannot test the return value of AdjustTokenPrivileges. 
             bOK = ::GetLastError() == ERROR_SUCCESS;
         }
+#endif
     }
 
     if ( bOK )
@@ -941,6 +949,15 @@ long wxGetFreeMemory()
 #endif
 }
 
+unsigned long wxGetProcessId()
+{
+#ifdef __WIN32__
+    return ::GetCurrentProcessId();
+#else
+    return 0;
+#endif
+}
+
 // Emit a beeeeeep
 void wxBell()
 {