diff --git a/src/lib/arch/win32/ArchMiscWindows.cpp b/src/lib/arch/win32/ArchMiscWindows.cpp index 53b71286..d70861d2 100644 --- a/src/lib/arch/win32/ArchMiscWindows.cpp +++ b/src/lib/arch/win32/ArchMiscWindows.cpp @@ -234,7 +234,7 @@ ArchMiscWindows::setValue(HKEY key, return; } RegSetValueEx(key, name, 0, REG_SZ, - static_cast(value.c_str()), + reinterpret_cast(value.c_str()), (DWORD)value.size() + 1); } @@ -247,7 +247,7 @@ ArchMiscWindows::setValue(HKEY key, const TCHAR* name, DWORD value) return; } RegSetValueEx(key, name, 0, REG_DWORD, - static_cast(&value), + reinterpret_cast(&value), sizeof(DWORD)); } @@ -262,7 +262,7 @@ ArchMiscWindows::setValueBinary(HKEY key, return; } RegSetValueEx(key, name, 0, REG_BINARY, - static_cast(value.data()), + reinterpret_cast(value.data()), (DWORD)value.size()); } @@ -287,7 +287,7 @@ ArchMiscWindows::readBinaryOrString(HKEY key, const TCHAR* name, DWORD type) // read it result = RegQueryValueEx(key, name, 0, &actualType, - static_cast(buffer), &size); + reinterpret_cast(buffer), &size); if (result != ERROR_SUCCESS || actualType != type) { delete[] buffer; return std::string(); @@ -322,7 +322,7 @@ ArchMiscWindows::readValueInt(HKEY key, const TCHAR* name) DWORD value; DWORD size = sizeof(value); LONG result = RegQueryValueEx(key, name, 0, &type, - static_cast(&value), &size); + reinterpret_cast(&value), &size); if (result != ERROR_SUCCESS || type != REG_DWORD) { return 0; } @@ -374,7 +374,7 @@ ArchMiscWindows::setThreadExecutionState(DWORD busyModes) if (s_stes == NULL) { HINSTANCE kernel = LoadLibrary("kernel32.dll"); if (kernel != NULL) { - s_stes = static_cast(GetProcAddress(kernel, + s_stes = reinterpret_cast(GetProcAddress(kernel, "SetThreadExecutionState")); } if (s_stes == NULL) { @@ -414,7 +414,7 @@ ArchMiscWindows::wakeupDisplay() if (s_stes == NULL) { HINSTANCE kernel = LoadLibrary("kernel32.dll"); if (kernel != NULL) { - s_stes = static_cast(GetProcAddress(kernel, + s_stes = reinterpret_cast(GetProcAddress(kernel, "SetThreadExecutionState")); } if (s_stes == NULL) {