From fcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 15:58:40 +0300 Subject: PBYTE -> uint8_t* --- plugins/ShellExt/src/main.cpp | 4 ++-- plugins/ShellExt/src/shlext.cpp | 2 +- plugins/ShellExt/src/shlicons.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/ShellExt/src') diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp index 0de062e3fa..3d5f1b7d0b 100644 --- a/plugins/ShellExt/src/main.cpp +++ b/plugins/ShellExt/src/main.cpp @@ -189,7 +189,7 @@ STDAPI DllRegisterServer() GetModuleFileName(g_plugin.getInst(), tszFileName, _countof(tszFileName)); if (RegSetValueEx(kInprocServer, nullptr, 0, REG_SZ, (LPBYTE)tszFileName, sizeof(wchar_t) * (lstrlen(tszFileName) + 1))) return E_FAIL; - if (RegSetValueExA(kInprocServer, "ThreadingModel", 0, REG_SZ, (PBYTE)str4, sizeof(str4))) + if (RegSetValueExA(kInprocServer, "ThreadingModel", 0, REG_SZ, (uint8_t*)str4, sizeof(str4))) return E_FAIL; ////////////////////////////////////////////////////////////////////////////////////// @@ -204,7 +204,7 @@ STDAPI DllRegisterServer() HRegKey k2(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"); if (k2 == nullptr) return E_FAIL; - if (RegSetValueExA(k2, str2, 0, REG_SZ, (PBYTE)str1, str1len)) + if (RegSetValueExA(k2, str2, 0, REG_SZ, (uint8_t*)str1, str1len)) return E_FAIL; return S_OK; diff --git a/plugins/ShellExt/src/shlext.cpp b/plugins/ShellExt/src/shlext.cpp index 20036fb699..51b1895a8e 100644 --- a/plugins/ShellExt/src/shlext.cpp +++ b/plugins/ShellExt/src/shlext.cpp @@ -535,7 +535,7 @@ static void BuildSkinIcons(TEnumData * lParam) if (pct->cbSize != sizeof(TSlotIPC) || pct->fType != REQUEST_NEWICONS) break; - TSlotProtoIcons * p = (TSlotProtoIcons*)(PBYTE(pct) + sizeof(TSlotIPC)); + TSlotProtoIcons * p = (TSlotProtoIcons*)((uint8_t*)pct + sizeof(TSlotIPC)); Self->ProtoIcons = (TSlotProtoIcons*)realloc(Self->ProtoIcons, (Self->ProtoIconsCount + 1) * sizeof(TSlotProtoIcons)); TSlotProtoIcons * d = &Self->ProtoIcons[Self->ProtoIconsCount]; memmove(d, p, sizeof(TSlotProtoIcons)); diff --git a/plugins/ShellExt/src/shlicons.cpp b/plugins/ShellExt/src/shlicons.cpp index 1c6b2dbcb6..d8337318ab 100644 --- a/plugins/ShellExt/src/shlicons.cpp +++ b/plugins/ShellExt/src/shlicons.cpp @@ -55,7 +55,7 @@ HBITMAP ARGB_BitmapFromIcon(IWICImagingFactory* Factory, HDC hDC, HICON hIcon) UINT cbStride = cx * sizeof(DWORD); // ARGB = DWORD UINT cbBuffer = cy * cbStride; // note: the pbBuffer memory is owned by the DIB and will be freed when the bitmap is released - hr = bitmap->CopyPixels(nullptr, cbStride, cbBuffer, (PBYTE)pbBuffer); + hr = bitmap->CopyPixels(nullptr, cbStride, cbBuffer, (uint8_t*)pbBuffer); if (hr != S_OK) { // the copy failed, delete the DIB DeleteObject(hBmp); -- cgit v1.2.3