]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
removed #ifndef __WXUNIVERSAL__ added in last commit, shouldn't be necessary any...
[wxWidgets.git] / src / msw / utils.cpp
index f174df6fd3652046e090d8d1e19f6d9435d27950..71f5e6521e775a864eb66094b9670987acb7b7b3 100644 (file)
@@ -1036,6 +1036,25 @@ void wxBell()
     ::MessageBeep((UINT)-1);        // default sound
 }
 
+bool wxIsDebuggerRunning()
+{
+    // IsDebuggerPresent() is not available under Win95, so load it dynamically
+    wxDynamicLibrary dll(_T("kernel32.dll"), wxDL_VERBATIM);
+
+    typedef BOOL (WINAPI *IsDebuggerPresent_t)();
+    if ( !dll.HasSymbol(_T("IsDebuggerPresent")) )
+    {
+        // no way to know, assume no
+        return false;
+    }
+
+    return (*(IsDebuggerPresent_t)dll.GetSymbol(_T("IsDebuggerPresent")))() != 0;
+}
+
+// ----------------------------------------------------------------------------
+// OS version
+// ----------------------------------------------------------------------------
+
 wxString wxGetOsDescription()
 {
     wxString str;