mirror of
https://github.com/Xevion/easy7zip.git
synced 2026-02-01 08:24:14 -06:00
4.30 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
bcd1db2f5a
commit
e18587ba51
+19
-16
@@ -8,6 +8,9 @@
|
||||
#endif
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
#ifndef _UNICODE
|
||||
extern bool g_IsNT;
|
||||
#endif
|
||||
|
||||
namespace NWindows {
|
||||
|
||||
@@ -20,7 +23,8 @@ CSysString MyLoadString(UINT resourceID)
|
||||
{
|
||||
size += 256;
|
||||
len = ::LoadString(g_hInstance, resourceID, s.GetBuffer(size - 1), size);
|
||||
} while (size - len <= 1);
|
||||
}
|
||||
while (size - len <= 1);
|
||||
s.ReleaseBuffer();
|
||||
return s;
|
||||
}
|
||||
@@ -28,23 +32,22 @@ CSysString MyLoadString(UINT resourceID)
|
||||
#ifndef _UNICODE
|
||||
UString MyLoadStringW(UINT resourceID)
|
||||
{
|
||||
UString s;
|
||||
int size = 256;
|
||||
int len;
|
||||
do
|
||||
if (g_IsNT)
|
||||
{
|
||||
size += 256;
|
||||
len = ::LoadStringW(g_hInstance, resourceID, s.GetBuffer(size - 1), size);
|
||||
if (len == 0)
|
||||
UString s;
|
||||
int size = 256;
|
||||
int len;
|
||||
do
|
||||
{
|
||||
if (::GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
|
||||
break;
|
||||
return GetUnicodeString(MyLoadString(resourceID));
|
||||
}
|
||||
} while (size - len <= 1);
|
||||
s.ReleaseBuffer();
|
||||
return s;
|
||||
size += 256;
|
||||
len = ::LoadStringW(g_hInstance, resourceID, s.GetBuffer(size - 1), size);
|
||||
}
|
||||
while (size - len <= 1);
|
||||
s.ReleaseBuffer();
|
||||
return s;
|
||||
}
|
||||
return GetUnicodeString(MyLoadString(resourceID));
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user