X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa78de8249892133e32b988ae145868a833336e3..b059b79da758fae4c25bd54c85f67a4a0d80f12b:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index f174df6fd3..71f5e6521e 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -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;