Migliorato calcolo Session ID

git-svn-id: svn://10.65.10.50/branches/R_10_00@22946 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2014-05-14 08:33:48 +00:00
parent 572ff303d1
commit e5d6e2794c
2 changed files with 6 additions and 3 deletions

View File

@ -1043,9 +1043,10 @@ bool OsWin32_Speak(const char* text, bool async)
int OsWin32_GetSessionId() int OsWin32_GetSessionId()
{ {
DWORD session = 0; // DWORD session = 0;
::ProcessIdToSessionId(::GetCurrentProcessId(), &session); // ::ProcessIdToSessionId(::GetCurrentProcessId(), &session);
return (int)session; // return (int)session;
return WTSGetActiveConsoleSessionId(); // Unknown modern way!
} }
bool OsWin32_IsWindowsServer() bool OsWin32_IsWindowsServer()

View File

@ -2702,12 +2702,14 @@ XVT_IMAGE xvt_res_get_image(int rid)
{ {
const wxString strFileName = xvtart_GetResourceName("Image", rid); const wxString strFileName = xvtart_GetResourceName("Image", rid);
const bool ok = !strFileName.IsEmpty(); const bool ok = !strFileName.IsEmpty();
#ifndef NDEBUG
if (!ok) if (!ok)
{ {
wxString msg; wxString msg;
msg << "Can't find image code " << rid << " in resource.ini"; msg << "Can't find image code " << rid << " in resource.ini";
xvt_dm_post_note(msg); xvt_dm_post_note(msg);
} }
#endif
return ok ? xvt_image_read(strFileName) : NULL; return ok ? xvt_image_read(strFileName) : NULL;
} }