Compile correctly regardless of the UNICODE macro

This commit is contained in:
Duncan Ogilvie 2024-08-05 15:53:35 +02:00
parent 633a864c9c
commit bd3c2a41ed
4 changed files with 4 additions and 4 deletions

View File

@ -758,7 +758,7 @@ void HexEditDialog::printData(DataType type)
{
INETNTOPW InetNtopW;
int numIPs = mData.size() / 16;
HMODULE hWinsock = LoadLibrary(L"ws2_32.dll");
HMODULE hWinsock = LoadLibraryW(L"ws2_32.dll");
InetNtopW = INETNTOPW(GetProcAddress(hWinsock, "InetNtopW"));
if(InetNtopW)
{

View File

@ -2450,7 +2450,7 @@ void MainWindow::clickFavouriteTool()
}
GuiAddLogMessage(tr("Starting tool %1\n").arg(toolPath).toUtf8().constData());
PROCESS_INFORMATION procinfo;
STARTUPINFO startupinfo;
STARTUPINFOW startupinfo;
memset(&procinfo, 0, sizeof(PROCESS_INFORMATION));
memset(&startupinfo, 0, sizeof(startupinfo));
startupinfo.cb = sizeof(startupinfo);

View File

@ -179,7 +179,7 @@ QString getSymbolicNameStr(duint addr)
QIcon getFileIcon(QString file)
{
SHFILEINFO info;
SHFILEINFOW info;
if(SHGetFileInfoW((const wchar_t*)file.utf16(), 0, &info, sizeof(info), SHGFI_ICON) == 0)
return QIcon(); //API error
QIcon result = QIcon(QtWin::fromHICON(info.hIcon));

View File

@ -309,7 +309,7 @@ static void restartInstall()
ShellExecute(nullptr, operation, szApplicationDir, TEXT("::install"), szCurrentDir, SW_SHOWNORMAL);
}
static BOOL CALLBACK DlgLauncher(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT_PTR CALLBACK DlgLauncher(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{