diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
tree | b0a227d6e087c41958cc84d27bc323353248aae5 /plugins/CrashDumper | |
parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) |
DWORD -> uint32_t
Diffstat (limited to 'plugins/CrashDumper')
-rw-r--r-- | plugins/CrashDumper/src/dumper.cpp | 8 | ||||
-rw-r--r-- | plugins/CrashDumper/src/exhndlr.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/sdkstuff.h | 20 | ||||
-rw-r--r-- | plugins/CrashDumper/src/stdafx.h | 8 | ||||
-rw-r--r-- | plugins/CrashDumper/src/ui.cpp | 6 | ||||
-rw-r--r-- | plugins/CrashDumper/src/utils.cpp | 8 |
6 files changed, 26 insertions, 26 deletions
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index d44823bf55..d4ae642135 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -45,7 +45,7 @@ void WriteUtfFile(HANDLE hDumpFile, char *bufu) DWORD bytes;
static const unsigned char bytemark[] = { 0xEF, 0xBB, 0xBF };
WriteFile(hDumpFile, bytemark, 3, &bytes, nullptr);
- WriteFile(hDumpFile, bufu, (DWORD)mir_strlen(bufu), &bytes, nullptr);
+ WriteFile(hDumpFile, bufu, (uint32_t)mir_strlen(bufu), &bytes, nullptr);
}
BOOL CALLBACK LoadedModules64(LPCSTR, DWORD64 ModuleBase, ULONG ModuleSize, PVOID UserContext)
@@ -77,7 +77,7 @@ BOOL CALLBACK LoadedModulesFind64(LPCSTR ModuleName, DWORD64 ModuleBase, ULONG M {
FindData *data = (FindData*)UserContext;
- if ((DWORD)(data->Offset - ModuleBase) < ModuleSize) {
+ if ((uint32_t)(data->Offset - ModuleBase) < ModuleSize) {
const size_t len = _countof(data->pModule->ModuleName);
strncpy(data->pModule->ModuleName, ModuleName, len);
data->pModule->ModuleName[len - 1] = 0;
@@ -113,7 +113,7 @@ void GetLinkedModulesInfo(wchar_t *moduleName, CMStringW &buffer) PIMAGE_IMPORT_DESCRIPTOR importData = (PIMAGE_IMPORT_DESCRIPTOR)ImageDirectoryEntryToData(dllAddr, FALSE, IMAGE_DIRECTORY_ENTRY_IMPORT, &tableSize);
if (importData) {
CMStringW wszEnvPath;
- DWORD dwLen = GetEnvironmentVariableW(L"Path", nullptr, 0);
+ uint32_t dwLen = GetEnvironmentVariableW(L"Path", nullptr, 0);
wszEnvPath.Preallocate(dwLen + 1);
GetEnvironmentVariableW(L"Path", wszEnvPath.GetBuffer(), dwLen);
@@ -206,7 +206,7 @@ static void GetPluginsString(CMStringW &buffer, unsigned &flags) mir_free(pVerInfo);
}
else {
- DWORD ver = pi->version;
+ uint32_t ver = pi->version;
v1 = HIBYTE(HIWORD(ver)), v2 = LOBYTE(HIWORD(ver)), v3 = HIBYTE(LOWORD(ver)), v4 = LOBYTE(LOWORD(ver));
}
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp index 652adcbf9f..e5b1723d06 100644 --- a/plugins/CrashDumper/src/exhndlr.cpp +++ b/plugins/CrashDumper/src/exhndlr.cpp @@ -127,7 +127,7 @@ LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr) return EXCEPTION_CONTINUE_SEARCH;
}
-DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info)
+uint32_t MirandaThreadFilter(uint32_t code, EXCEPTION_POINTERS* info)
{
if (info != lastptr) {
lastptr = info;
diff --git a/plugins/CrashDumper/src/sdkstuff.h b/plugins/CrashDumper/src/sdkstuff.h index e4dec9fd93..04dce75d4c 100644 --- a/plugins/CrashDumper/src/sdkstuff.h +++ b/plugins/CrashDumper/src/sdkstuff.h @@ -21,12 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "dbghelp.h"
typedef struct _IMAGEHLP_MODULE64_V2 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
+ uint32_t SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
+ uint32_t ImageSize; // virtual size of the loaded module
+ uint32_t TimeDateStamp; // date/time stamp from pe header
+ uint32_t CheckSum; // checksum from the pe header
+ uint32_t NumSyms; // number of symbols in the symbol table
SYM_TYPE SymType; // type of symbols loaded
CHAR ModuleName[32]; // module name
CHAR ImageName[256]; // image name
@@ -34,12 +34,12 @@ typedef struct _IMAGEHLP_MODULE64_V2 { } IMAGEHLP_MODULE64_V2;
typedef struct _IMAGEHLP_MODULEW64_V2 {
- DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
+ uint32_t SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
DWORD64 BaseOfImage; // base load address of module
- DWORD ImageSize; // virtual size of the loaded module
- DWORD TimeDateStamp; // date/time stamp from pe header
- DWORD CheckSum; // checksum from the pe header
- DWORD NumSyms; // number of symbols in the symbol table
+ uint32_t ImageSize; // virtual size of the loaded module
+ uint32_t TimeDateStamp; // date/time stamp from pe header
+ uint32_t CheckSum; // checksum from the pe header
+ uint32_t NumSyms; // number of symbols in the symbol table
SYM_TYPE SymType; // type of symbols loaded
wchar_t ModuleName[32]; // module name
wchar_t ImageName[256]; // image name
diff --git a/plugins/CrashDumper/src/stdafx.h b/plugins/CrashDumper/src/stdafx.h index c35c36a8bb..06a23e75d3 100644 --- a/plugins/CrashDumper/src/stdafx.h +++ b/plugins/CrashDumper/src/stdafx.h @@ -111,7 +111,7 @@ void WriteUtfFile(HANDLE hDumpFile, char* bufu); LONG WINAPI myfilter(PEXCEPTION_POINTERS exc_ptr);
LONG WINAPI myfilterv(PEXCEPTION_POINTERS exc_ptr);
-DWORD MirandaThreadFilter(DWORD code, EXCEPTION_POINTERS* info);
+uint32_t MirandaThreadFilter(uint32_t code, EXCEPTION_POINTERS* info);
void GetInternetExplorerVersion(CMStringW& buffer);
void GetProcessorString(CMStringW& buffer);
@@ -123,12 +123,12 @@ void GetLanguagePackString(CMStringW& buffer); void GetWow64String(CMStringW& buffer);
void GetVersionInfo(HMODULE hLib, CMStringW& buffer);
-void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize);
+void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, uint32_t dwSize);
void ReadableExceptionInfo(PEXCEPTION_RECORD excrec, CMStringW& buffer);
-void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize);
-void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, DWORD dwSize);
+void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, uint32_t dwSize);
+void GetLastWriteTime(FILETIME* ftime, LPTSTR lpszString, uint32_t dwSize);
void StoreStringToClip(CMStringW& buffer);
void ShowMessage(int type, const wchar_t* format, ...);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index 80483b4fe3..3fa9ce6046 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -20,13 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. class CViewVersionInfo : public CDlgBase
{
- DWORD m_flags;
+ uint32_t m_flags;
CCtrlButton m_btnCopyClip, m_btnCopyFile;
CCtrlRichEdit m_redtViewVersionInfo;
public:
- CViewVersionInfo(DWORD flags) :
+ CViewVersionInfo(uint32_t flags) :
CDlgBase(g_plugin, IDD_VIEWVERSION),
m_btnCopyClip(this, IDC_CLIPVER),
m_btnCopyFile(this, IDC_FILEVER),
@@ -145,7 +145,7 @@ public: INT_PTR ViewVersionInfo(WPARAM wParam, LPARAM)
{
if (pViewDialog == nullptr) {
- DWORD dwFlags = wParam ? (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL) : VI_FLAG_PRNVAR;
+ uint32_t dwFlags = wParam ? (VI_FLAG_PRNVAR | VI_FLAG_PRNDLL) : VI_FLAG_PRNVAR;
pViewDialog = new CViewVersionInfo(dwFlags);
pViewDialog->Show();
}
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index b67f389f15..055ee355a3 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -23,7 +23,7 @@ static HINSTANCE hKernel = GetModuleHandleA("kernel32.dll"); int GetTZOffset(void)
{
TIME_ZONE_INFORMATION tzInfo = {};
- DWORD type = GetTimeZoneInformation(&tzInfo);
+ uint32_t type = GetTimeZoneInformation(&tzInfo);
int offset = 0;
switch (type) {
@@ -42,7 +42,7 @@ int GetTZOffset(void) return offset;
}
-void GetISO8061Time(SYSTEMTIME *stLocal, LPTSTR lpszString, DWORD dwSize)
+void GetISO8061Time(SYSTEMTIME *stLocal, LPTSTR lpszString, uint32_t dwSize)
{
SYSTEMTIME loctime;
if (stLocal == nullptr) {
@@ -66,7 +66,7 @@ void GetISO8061Time(SYSTEMTIME *stLocal, LPTSTR lpszString, DWORD dwSize) }
}
-void GetLastWriteTime(FILETIME *ftime, LPTSTR lpszString, DWORD dwSize)
+void GetLastWriteTime(FILETIME *ftime, LPTSTR lpszString, uint32_t dwSize)
{
FILETIME ftLocal;
SYSTEMTIME stLocal;
@@ -78,7 +78,7 @@ void GetLastWriteTime(FILETIME *ftime, LPTSTR lpszString, DWORD dwSize) GetISO8061Time(&stLocal, lpszString, dwSize);
}
-void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, DWORD dwSize)
+void GetLastWriteTime(LPCTSTR fileName, LPTSTR lpszString, uint32_t dwSize)
{
WIN32_FIND_DATA FindFileData;
|