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* --- src/core/stdclist/src/clcpaint.cpp | 2 +- src/core/stdfile/src/file.cpp | 4 ++-- src/core/stdfile/src/fileexistsdlg.cpp | 2 +- src/core/stdfile/src/filexferdlg.cpp | 2 +- src/core/stdmsg/src/cmdlist.cpp | 2 +- src/core/stdmsg/src/msglog.cpp | 2 +- src/core/stduihist/src/history.cpp | 2 +- src/mir_app/src/chat_log.cpp | 2 +- src/mir_app/src/chat_manager.cpp | 6 +++--- src/mir_app/src/db_events.cpp | 4 ++-- src/mir_app/src/db_ini.cpp | 2 +- src/mir_app/src/dll_sniffer.cpp | 18 +++++++++--------- src/mir_app/src/netlib.h | 2 +- src/mir_app/src/netlib_http.cpp | 2 +- src/mir_app/src/netlib_openconn.cpp | 4 ++-- src/mir_app/src/netlib_opts.cpp | 8 ++++---- src/mir_app/src/netlib_pktrecver.cpp | 2 +- src/mir_app/src/netlib_sock.cpp | 4 ++-- src/mir_app/src/proto_interface.cpp | 2 +- src/mir_app/src/protocols.cpp | 2 +- 20 files changed, 37 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index 99d3479f74..8a493e0649 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -472,7 +472,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) bmih.biHeight = -clRect.bottom; bmih.biPlanes = 1; bmih.biWidth = clRect.right; - PBYTE bits = (PBYTE)malloc(4 * bmih.biWidth * -bmih.biHeight); + uint8_t *bits = (uint8_t*)malloc(4 * bmih.biWidth * -bmih.biHeight); GetDIBits(hdc, hBmpOsb, 0, clRect.bottom, bits, (BITMAPINFO *)& bmih, DIB_RGB_COLORS); COLORREF greyColour = GetSysColor(COLOR_3DFACE); diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 74456b11b0..f83af57ab7 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -124,7 +124,7 @@ static int FileEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = {}; dbei.cbBlob = sizeof(DWORD); - dbei.pBlob = (PBYTE)&dwSignature; + dbei.pBlob = (uint8_t*)&dwSignature; db_event_get(lParam, &dbei); if (dbei.flags & (DBEF_SENT | DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0) return 0; @@ -141,7 +141,7 @@ int SRFile_GetRegValue(HKEY hKeyBase, const wchar_t *szSubKey, const wchar_t *sz if (RegOpenKeyEx(hKeyBase, szSubKey, 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS) return 0; - if (RegQueryValueEx(hKey, szValue, nullptr, nullptr, (PBYTE)szOutput, &cbOut) != ERROR_SUCCESS) { + if (RegQueryValueEx(hKey, szValue, nullptr, nullptr, (uint8_t*)szOutput, &cbOut) != ERROR_SUCCESS) { RegCloseKey(hKey); return 0; } diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp index b18cac040f..34e198d55a 100644 --- a/src/core/stdfile/src/fileexistsdlg.cpp +++ b/src/core/stdfile/src/fileexistsdlg.cpp @@ -60,7 +60,7 @@ static void DoAnnoyingShellCommand(HWND hwnd, const wchar_t *szFilename, int cmd IShellFolder *pFileFolder; for (pidl = pCurrentIdl;;) { - pidlNext = (ITEMIDLIST *)((PBYTE)pidl + pidl->mkid.cb); + pidlNext = (ITEMIDLIST *)((uint8_t*)pidl + pidl->mkid.cb); if (pidlNext->mkid.cb == 0) { pidlFilename = (ITEMIDLIST *)CoTaskMemAlloc(pidl->mkid.cb + sizeof(pidl->mkid.cb)); memcpy(pidlFilename, pidl, pidl->mkid.cb + sizeof(pidl->mkid.cb)); diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index cd48520cbe..1e6b22b57d 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -83,7 +83,7 @@ void FillSendData(FileDlgData *dat, DBEVENTINFO& dbei) dbei.flags |= DBEF_UTF; dbei.cbBlob = int(sizeof(DWORD) + mir_strlen(szFileNames) + mir_strlen(szMsg) + 2); - dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob); + dbei.pBlob = (uint8_t*)mir_alloc(dbei.cbBlob); *(PDWORD)dbei.pBlob = 0; mir_strcpy((char*)dbei.pBlob + sizeof(DWORD), szFileNames); mir_strcpy((char*)dbei.pBlob + sizeof(DWORD) + mir_strlen(szFileNames) + 1, szMsg); diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index b1953d8553..50c9302f36 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -94,7 +94,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM lParam) dbei.szModule = Proto_GetBaseAccountName(hContact); dbei.timestamp = time(0); dbei.cbBlob = (DWORD)(mir_strlen(p->szMsg) + 1); - dbei.pBlob = (PBYTE)p->szMsg; + dbei.pBlob = (uint8_t*)p->szMsg; dbei.szId = (char *)lParam; MessageWindowEvent evt = { id, hContact, &dbei }; diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 7905452248..73315ce746 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -409,7 +409,7 @@ void LoadMsgLogIcons(void) HDC hdc = GetDC(nullptr); HBITMAP hBmp = CreateCompatibleBitmap(hdc, bih.biWidth, bih.biHeight); HDC hdcMem = CreateCompatibleDC(hdc); - PBYTE pBmpBits = (PBYTE)mir_alloc(widthBytes * bih.biHeight); + uint8_t *pBmpBits = (uint8_t*)mir_alloc(widthBytes * bih.biHeight); for (int i = 0; i < _countof(pLogIconBmpBits); i++) { HICON hIcon = IcoLib_GetIconByHandle(iconList[i].hIcolib); diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index bd99a7a685..b7d7558746 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -304,7 +304,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP int newBlobSize = db_event_getBlobSize(hDbEvent); if (newBlobSize > oldBlobSize) { - dbei.pBlob = (PBYTE)mir_realloc(dbei.pBlob, newBlobSize); + dbei.pBlob = (uint8_t*)mir_realloc(dbei.pBlob, newBlobSize); oldBlobSize = newBlobSize; } dbei.cbBlob = oldBlobSize; diff --git a/src/mir_app/src/chat_log.cpp b/src/mir_app/src/chat_log.cpp index 86072e9ccb..33d97cc08c 100644 --- a/src/mir_app/src/chat_log.cpp +++ b/src/mir_app/src/chat_log.cpp @@ -429,7 +429,7 @@ void LoadMsgLogBitmaps(void) HDC hdc = GetDC(nullptr); HBITMAP hBmp = CreateCompatibleBitmap(hdc, bih.biWidth, bih.biHeight); HDC hdcMem = CreateCompatibleDC(hdc); - PBYTE pBmpBits = (PBYTE)mir_alloc(widthBytes * bih.biHeight); + uint8_t *pBmpBits = (uint8_t*)mir_alloc(widthBytes * bih.biHeight); for (int i = 0; i < _countof(pLogIconBmpBits); i++) { size_t size = RTFPICTHEADERMAXSIZE + (bih.biSize + widthBytes * bih.biHeight) * 2; pLogIconBmpBits[i] = (char*)mir_alloc(size); diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp index a815e2732b..7d2d0b3b70 100644 --- a/src/mir_app/src/chat_manager.cpp +++ b/src/mir_app/src/chat_manager.cpp @@ -964,7 +964,7 @@ MIR_APP_DLL(CHAT_MANAGER*) Chat_CustomizeApi(const CHAT_MANAGER_INITDATA *pInit) return &g_chatApi; // wipe out old junk - memset(PBYTE(&g_chatApi) + offsetof(CHAT_MANAGER, OnCreateModule), 0, sizeof(CHAT_MANAGER) - offsetof(CHAT_MANAGER, OnCreateModule)); + memset((uint8_t*)&g_chatApi + offsetof(CHAT_MANAGER, OnCreateModule), 0, sizeof(CHAT_MANAGER) - offsetof(CHAT_MANAGER, OnCreateModule)); if (g_cbSession) { // reallocate old sessions mir_cslock lck(csChat); @@ -974,7 +974,7 @@ MIR_APP_DLL(CHAT_MANAGER*) Chat_CustomizeApi(const CHAT_MANAGER_INITDATA *pInit) for (auto &p : tmp) { SESSION_INFO *p1 = (SESSION_INFO*)realloc(p, pInit->cbSession); - memset(PBYTE(p1) + sizeof(SESSION_INFO), 0, pInit->cbSession - sizeof(SESSION_INFO)); + memset((uint8_t*)p1 + sizeof(SESSION_INFO), 0, pInit->cbSession - sizeof(SESSION_INFO)); g_arSessions.insert(p1); } } @@ -988,7 +988,7 @@ MIR_APP_DLL(CHAT_MANAGER*) Chat_CustomizeApi(const CHAT_MANAGER_INITDATA *pInit) for (auto &mi : tmp) { MODULEINFO *p1 = (MODULEINFO*)realloc(mi, pInit->cbModuleInfo); - memset(PBYTE(p1) + sizeof(GCModuleInfoBase), 0, pInit->cbModuleInfo - sizeof(GCModuleInfoBase)); + memset((uint8_t*)p1 + sizeof(GCModuleInfoBase), 0, pInit->cbModuleInfo - sizeof(GCModuleInfoBase)); g_arModules.insert(p1); if (p1 != mi) // realloc could change a pointer bReallocated = true; diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp index c3d17446e5..39c48b1056 100644 --- a/src/mir_app/src/db_events.cpp +++ b/src/mir_app/src/db_events.cpp @@ -275,9 +275,9 @@ DB::AUTH_BLOB::AUTH_BLOB(MCONTACT hContact, LPCSTR nick, LPCSTR fname, LPCSTR ln m_size = uint32_t(sizeof(uint32_t) * 2 + 5 + mir_strlen(m_szNick) + mir_strlen(m_szFirstName) + mir_strlen(m_szLastName) + mir_strlen(m_szEmail) + mir_strlen(m_szReason)); } -DB::AUTH_BLOB::AUTH_BLOB(PBYTE blob) +DB::AUTH_BLOB::AUTH_BLOB(uint8_t *blob) { - PBYTE pCurBlob = blob; + uint8_t *pCurBlob = blob; m_dwUin = *(uint32_t*)pCurBlob; pCurBlob += sizeof(uint32_t); m_hContact = *(uint32_t*)pCurBlob; diff --git a/src/mir_app/src/db_ini.cpp b/src/mir_app/src/db_ini.cpp index a792640e5a..91e94fd865 100644 --- a/src/mir_app/src/db_ini.cpp +++ b/src/mir_app/src/db_ini.cpp @@ -467,7 +467,7 @@ LBL_NewLine: int len; char *pszValue, *pszEnd; - PBYTE buf = (PBYTE)mir_alloc(mir_strlen(szValue + 1)); + uint8_t *buf = (uint8_t*)mir_alloc(mir_strlen(szValue + 1)); for (len = 0, pszValue = szValue + 1;; len++) { buf[len] = (BYTE)strtol(pszValue, &pszEnd, 0x10); if (pszValue == pszEnd) diff --git a/src/mir_app/src/dll_sniffer.cpp b/src/mir_app/src/dll_sniffer.cpp index 048cba260c..2a3ecc0418 100644 --- a/src/mir_app/src/dll_sniffer.cpp +++ b/src/mir_app/src/dll_sniffer.cpp @@ -27,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. DWORD dwVersion = 0; -static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, PBYTE pBase, DWORD dwType); +static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBase, DWORD dwType); -static void ProcessResourceEntry(PIMAGE_RESOURCE_DIRECTORY_ENTRY pIRDE, PBYTE pBase, DWORD dwType) +static void ProcessResourceEntry(PIMAGE_RESOURCE_DIRECTORY_ENTRY pIRDE, uint8_t *pBase, DWORD dwType) { if (pIRDE->DataIsDirectory) ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY(pBase + pIRDE->OffsetToDirectory), pBase, dwType == 0 ? pIRDE->Name : dwType); @@ -39,7 +39,7 @@ static void ProcessResourceEntry(PIMAGE_RESOURCE_DIRECTORY_ENTRY pIRDE, PBYTE pB } } -static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, PBYTE pBase, DWORD dwType) +static void ProcessResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, uint8_t *pBase, DWORD dwType) { UINT i; @@ -92,7 +92,7 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) else __leave; - if ((PBYTE)pINTH + sizeof(IMAGE_NT_HEADERS) >= ptr + filesize) + if ((uint8_t*)pINTH + sizeof(IMAGE_NT_HEADERS) >= ptr + filesize) __leave; if (pINTH->Signature != IMAGE_NT_SIGNATURE) __leave; @@ -107,14 +107,14 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) if (pINTH->FileHeader.Machine == IMAGE_FILE_MACHINE_I386 && pINTH->FileHeader.SizeOfOptionalHeader >= sizeof(IMAGE_OPTIONAL_HEADER32) && pINTH->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) { - pIDD = (PIMAGE_DATA_DIRECTORY)((PBYTE)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.DataDirectory)); - base = *(DWORD*)((PBYTE)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.ImageBase)); + pIDD = (PIMAGE_DATA_DIRECTORY)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.DataDirectory)); + base = *(DWORD*)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS32, OptionalHeader.ImageBase)); } else if (pINTH->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64 && pINTH->FileHeader.SizeOfOptionalHeader >= sizeof(IMAGE_OPTIONAL_HEADER64) && pINTH->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) { - pIDD = (PIMAGE_DATA_DIRECTORY)((PBYTE)pINTH + offsetof(IMAGE_NT_HEADERS64, OptionalHeader.DataDirectory)); - base = *(ULONGLONG*)((PBYTE)pINTH + offsetof(IMAGE_NT_HEADERS64, OptionalHeader.ImageBase)); + pIDD = (PIMAGE_DATA_DIRECTORY)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS64, OptionalHeader.DataDirectory)); + base = *(ULONGLONG*)((uint8_t*)pINTH + offsetof(IMAGE_NT_HEADERS64, OptionalHeader.ImageBase)); } else __leave; @@ -135,7 +135,7 @@ MUUID* GetPluginInterfaces(const wchar_t *ptszFileName, bool &bIsPlugin) for (DWORD idx = 0; idx < nSections; idx++) { PIMAGE_SECTION_HEADER pISH = (PIMAGE_SECTION_HEADER)(pImage + idx * sizeof(IMAGE_SECTION_HEADER)); - if (((PBYTE)pISH + sizeof(IMAGE_SECTION_HEADER) > pImage + filesize) || (pISH->PointerToRawData + pISH->SizeOfRawData > filesize)) + if (((uint8_t*)pISH + sizeof(IMAGE_SECTION_HEADER) > pImage + filesize) || (pISH->PointerToRawData + pISH->SizeOfRawData > filesize)) __leave; // process export table diff --git a/src/mir_app/src/netlib.h b/src/mir_app/src/netlib.h index c08718b5bd..d8ed8a3418 100644 --- a/src/mir_app/src/netlib.h +++ b/src/mir_app/src/netlib.h @@ -54,7 +54,7 @@ struct NetlibNestedCriticalSection struct NetlibHTTPProxyPacketQueue { NetlibHTTPProxyPacketQueue *next; - PBYTE dataBuffer; + uint8_t *dataBuffer; int dataBufferLen; }; diff --git a/src/mir_app/src/netlib_http.cpp b/src/mir_app/src/netlib_http.cpp index cea5472038..11336b7ac7 100644 --- a/src/mir_app/src/netlib_http.cpp +++ b/src/mir_app/src/netlib_http.cpp @@ -1128,7 +1128,7 @@ next: } if (bufsz > 0) { - Netlib_Dump(nlc, (PBYTE)szData, bufsz, false, dflags | MSG_NOTITLE); + Netlib_Dump(nlc, (uint8_t*)szData, bufsz, false, dflags | MSG_NOTITLE); mir_free(nlhrReply->pData); nlhrReply->pData = szData; nlhrReply->dataLength = bufsz; diff --git a/src/mir_app/src/netlib_openconn.cpp b/src/mir_app/src/netlib_openconn.cpp index 7fd4badd57..6ebd099d6c 100644 --- a/src/mir_app/src/netlib_openconn.cpp +++ b/src/mir_app/src/netlib_openconn.cpp @@ -183,7 +183,7 @@ static int NetlibInitSocks5Connection(NetlibConnection *nlc, NetlibUser *nlu, NE if (buf[1] == 2) { //rfc1929 size_t nUserLen = mir_strlen(nlu->settings.szProxyAuthUser); size_t nPassLen = mir_strlen(nlu->settings.szProxyAuthPassword); - PBYTE pAuthBuf = (PBYTE)mir_alloc(3 + nUserLen + nPassLen); + uint8_t *pAuthBuf = (uint8_t*)mir_alloc(3 + nUserLen + nPassLen); pAuthBuf[0] = 1; //auth version pAuthBuf[1] = (BYTE)nUserLen; memcpy(pAuthBuf + 2, nlu->settings.szProxyAuthUser, nUserLen); @@ -220,7 +220,7 @@ static int NetlibInitSocks5Connection(NetlibConnection *nlc, NetlibUser *nlu, NE return 0; nHostLen = 4; } - PBYTE pInit = (PBYTE)mir_alloc(6 + nHostLen); + uint8_t *pInit = (uint8_t*)mir_alloc(6 + nHostLen); pInit[0] = 5; //SOCKS5 pInit[1] = nloc->flags & NLOCF_UDP ? 3 : 1; //connect or UDP pInit[2] = 0; //reserved diff --git a/src/mir_app/src/netlib_opts.cpp b/src/mir_app/src/netlib_opts.cpp index 4c5e8f3dbe..7ae1fee706 100644 --- a/src/mir_app/src/netlib_opts.cpp +++ b/src/mir_app/src/netlib_opts.cpp @@ -167,9 +167,9 @@ static void ChangeSettingIntByCheckbox(HWND hwndDlg, UINT ctrlId, int iUser, int if (iUser == -1) { for (auto &p : tempSettings) if (!(p->flags & NUF_NOOPTIONS)) - *(int*)(((PBYTE)&p->settings) + memberOffset) = newValue; + *(int*)(((uint8_t*)&p->settings) + memberOffset) = newValue; } - else *(int*)(((PBYTE)&tempSettings[iUser]->settings) + memberOffset) = newValue; + else *(int*)(((uint8_t*)&tempSettings[iUser]->settings) + memberOffset) = newValue; SendMessage(hwndDlg, M_REFRESHENABLING, 0, 0); } @@ -181,7 +181,7 @@ static void ChangeSettingStringByEdit(HWND hwndDlg, UINT ctrlId, int iUser, int if (iUser == -1) { for (auto &p : tempSettings) { if (!(p->flags & NUF_NOOPTIONS)) { - char **ppszNew = (char**)(((PBYTE)&p->settings) + memberOffset); + char **ppszNew = (char**)(((uint8_t*)&p->settings) + memberOffset); mir_free(*ppszNew); *ppszNew = mir_strdup(szNewValue); } @@ -189,7 +189,7 @@ static void ChangeSettingStringByEdit(HWND hwndDlg, UINT ctrlId, int iUser, int mir_free(szNewValue); } else { - char **ppszNew = (char**)(((PBYTE)&tempSettings[iUser]->settings) + memberOffset); + char **ppszNew = (char**)(((uint8_t*)&tempSettings[iUser]->settings) + memberOffset); mir_free(*ppszNew); *ppszNew = szNewValue; } diff --git a/src/mir_app/src/netlib_pktrecver.cpp b/src/mir_app/src/netlib_pktrecver.cpp index 1ef5fbd5cc..b83e5febf3 100644 --- a/src/mir_app/src/netlib_pktrecver.cpp +++ b/src/mir_app/src/netlib_pktrecver.cpp @@ -36,7 +36,7 @@ MIR_APP_DLL(HANDLE) Netlib_CreatePacketReceiver(HNETLIBCONN nlc, int iMaxSize) nlpr->handleType = NLH_PACKETRECVER; nlpr->nlc = nlc; nlpr->packetRecver.bufferSize = iMaxSize; - nlpr->packetRecver.buffer = (PBYTE)mir_alloc(nlpr->packetRecver.bufferSize); + nlpr->packetRecver.buffer = (uint8_t*)mir_alloc(nlpr->packetRecver.bufferSize); nlpr->packetRecver.bytesUsed = 0; nlpr->packetRecver.bytesAvailable = 0; return nlpr; diff --git a/src/mir_app/src/netlib_sock.cpp b/src/mir_app/src/netlib_sock.cpp index 4cfe8ee4ff..0f2ee2d57f 100644 --- a/src/mir_app/src/netlib_sock.cpp +++ b/src/mir_app/src/netlib_sock.cpp @@ -35,7 +35,7 @@ MIR_APP_DLL(int) Netlib_Send(HNETLIBCONN nlc, const char *buf, int len, int flag return SOCKET_ERROR; int result; - Netlib_Dump(nlc, (PBYTE)buf, len, true, flags); + Netlib_Dump(nlc, (uint8_t*)buf, len, true, flags); if (nlc->hSsl) result = Netlib_SslWrite(nlc->hSsl, buf, len); else @@ -71,7 +71,7 @@ MIR_APP_DLL(int) Netlib_Recv(HNETLIBCONN nlc, char *buf, int len, int flags) if (recvResult <= 0) return recvResult; - Netlib_Dump(nlc, (PBYTE)buf, recvResult, false, flags); + Netlib_Dump(nlc, (uint8_t*)buf, recvResult, false, flags); if ((flags & MSG_PEEK) == 0) { NETLIBNOTIFY nln = { buf, len, flags, recvResult }; diff --git a/src/mir_app/src/proto_interface.cpp b/src/mir_app/src/proto_interface.cpp index 52bf10eea2..fe8e39ca46 100644 --- a/src/mir_app/src/proto_interface.cpp +++ b/src/mir_app/src/proto_interface.cpp @@ -199,7 +199,7 @@ MEVENT PROTO_INTERFACE::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) dbei.timestamp = pre->timestamp; dbei.eventType = EVENTTYPE_MESSAGE; dbei.cbBlob = (DWORD)mir_strlen(pre->szMessage) + 1; - dbei.pBlob = (PBYTE)pre->szMessage; + dbei.pBlob = (uint8_t*)pre->szMessage; if (pre->flags & PREF_CREATEREAD) dbei.flags |= DBEF_READ; diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index 87be16993b..3186a09bff 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -183,7 +183,7 @@ MIR_APP_DLL(MEVENT) Proto_AuthRecv(const char *szProtoName, PROTORECVEVENT *pcre dbei.flags = DBEF_UTF | pcre->flags & (PREF_CREATEREAD ? DBEF_READ : 0); dbei.eventType = EVENTTYPE_AUTHREQUEST; dbei.cbBlob = pcre->lParam; - dbei.pBlob = (PBYTE)pcre->szMessage; + dbei.pBlob = (uint8_t*)pcre->szMessage; return db_event_add(0, &dbei); } -- cgit v1.2.3