mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029169: Configuration - fix compilation with undefined UNICODE on Windows
Eliminated usage of TEXT macros, usage of OSVERSIONINFO instead of OSVERSIONINFOW. LoadIcon/LoadCursor are now used instead of LoadIconW/LoadCursorW when passing macros to standard resources (which depend on UNICODE flag).
This commit is contained in:
@@ -211,7 +211,8 @@ OSD_Host :: OSD_Host () {
|
||||
if ( !fInit ) {
|
||||
|
||||
nSize = MAX_COMPUTERNAME_LENGTH + 1;
|
||||
osVerInfo.dwOSVersionInfoSize = sizeof ( OSVERSIONINFO );
|
||||
ZeroMemory (&osVerInfo, sizeof(OSVERSIONINFOW));
|
||||
osVerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
|
||||
|
||||
ZeroMemory (&ms, sizeof(ms));
|
||||
ZeroMemory (szHostName, sizeof(char) * (MAX_COMPUTERNAME_LENGTH + 1));
|
||||
@@ -262,11 +263,12 @@ OSD_Host :: OSD_Host () {
|
||||
|
||||
hostName = szHostName;
|
||||
interAddr = Standard_CString ( hostAddr );
|
||||
wsprintf (
|
||||
osVerInfo.szCSDVersion, TEXT( "Windows NT Version %d.%d" ),
|
||||
osVerInfo.dwMajorVersion, osVerInfo.dwMinorVersion
|
||||
);
|
||||
version = osVerInfo.szCSDVersion;
|
||||
TCollection_AsciiString aVersion = TCollection_AsciiString("Windows NT Version ") + (int )osVerInfo.dwMajorVersion + "." + (int )osVerInfo.dwMinorVersion;
|
||||
if (*osVerInfo.szCSDVersion != L'\0')
|
||||
{
|
||||
aVersion += TCollection_AsciiString(" ") + TCollection_AsciiString (osVerInfo.szCSDVersion);
|
||||
}
|
||||
version = aVersion;
|
||||
|
||||
fInit = TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user