]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
update the year in wx information dialog (#9701)
[wxWidgets.git] / src / msw / app.cpp
index 32779c348d776699b85e21e4d0f5e6e039fa5f63..c24475e00e61c60d63ebe6307efdf04af630d19c 100644 (file)
     typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
 #endif // defined(DLLVERSIONINFO)
 
+#ifndef ATTACH_PARENT_PROCESS
+    #define ATTACH_PARENT_PROCESS ((DWORD)-1)
+#endif
 
 // ---------------------------------------------------------------------------
 // global variables
@@ -477,8 +480,19 @@ int wxConsoleStderr::GetCommandHistory(wxWxCharBuffer& buf) const
     if ( len )
     {
         buf.extend(len);
-        const int len2 = m_pfnGetConsoleCommandHistory(buf.data(), len, CMD_EXE);
-        wxASSERT_MSG( len2 == len, _T("failed getting history?") );
+
+        int len2 = m_pfnGetConsoleCommandHistory(buf.data(), len, CMD_EXE);
+
+#if !wxUSE_UNICODE
+        // there seems to be a bug in the GetConsoleCommandHistoryA(), it
+        // returns the length of Unicode string and not ANSI one
+        len2 /= 2;
+#endif // !wxUSE_UNICODE
+
+        if ( len2 != len )
+        {
+            wxFAIL_MSG( _T("failed getting history?") );
+        }
     }
 
     return len;