mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-10 09:28:08 +00:00
[idd] debug: full Unicode handling and log as UTF-8
This commit makes `CDebug` use Unicode internally instead of whatever random code page is in use. It also gets rid of the horrible character counting and replaces that with `vasprintf` and `vaswprintf` helpers (partially inspired by Linux) which allocates a buffer. For HRESULT logging, the error code in both hex and decimal are included. The output is now guaranteed to be UTF-8.
This commit is contained in:
@@ -52,7 +52,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
g_debug.Init("looking-glass-idd-service");
|
||||
g_debug.Init(L"looking-glass-idd-service");
|
||||
DEBUG_INFO("Looking Glass IDD Helper Service (" LG_VERSION_STR ")");
|
||||
if (!HandleService())
|
||||
return EXIT_FAILURE;
|
||||
@@ -63,7 +63,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
|
||||
return EXIT_FAILURE;
|
||||
|
||||
// child process
|
||||
g_debug.Init("looking-glass-idd-helper");
|
||||
g_debug.Init(L"looking-glass-idd-helper");
|
||||
DEBUG_INFO("Looking Glass IDD Helper Process (" LG_VERSION_STR ")");
|
||||
|
||||
HandleT<HANDLENullTraits> hParent(OpenProcess(SYNCHRONIZE, FALSE, std::stoul(args[1])));
|
||||
|
Reference in New Issue
Block a user