make all calls to winapi format-agnostic (#1470)

This commit is contained in:
Ramen2X 2025-05-11 15:03:32 -04:00 committed by GitHub
parent 6968a3ba00
commit 2b3e7176d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 66 additions and 66 deletions

View File

@ -15,7 +15,7 @@ CConfigCommandLineInfo::CConfigCommandLineInfo()
void CConfigCommandLineInfo::ParseParam(LPCSTR pszParam, BOOL bFlag, BOOL bLast)
{
if (bFlag) {
if (lstrcmpiA(pszParam, "config") == 0) {
if (lstrcmpi(pszParam, "config") == 0) {
currentConfigApp->m_run_config_dialog = TRUE;
}
}

View File

@ -13,7 +13,7 @@ DECOMP_SIZE_ASSERT(CMainDialog, 0x70)
CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent)
{
afxCurrentWinApp;
m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG));
m_icon = LoadIcon(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG));
}
// FUNCTION: CONFIG 0x00403e50
@ -52,8 +52,8 @@ BOOL CMainDialog::OnInitDialog()
CString about_text;
about_text.LoadString(IDS_ABOUT);
if (system_menu) {
AppendMenuA(system_menu->m_hMenu, MF_SEPARATOR, 0, NULL);
AppendMenuA(system_menu->m_hMenu, MF_STRING, 16, (LPCTSTR) about_text);
AppendMenu(system_menu->m_hMenu, MF_SEPARATOR, 0, NULL);
AppendMenu(system_menu->m_hMenu, MF_STRING, 16, (LPCTSTR) about_text);
}
SendMessage(WM_SETICON, ICON_BIG, (LPARAM) m_icon);
SendMessage(WM_SETICON, ICON_SMALL, (LPARAM) m_icon);

View File

@ -106,7 +106,7 @@ BOOL CConfigApp::InitInstance()
// FUNCTION: CONFIG 0x00403100
BOOL CConfigApp::IsLegoNotRunning()
{
HWND hWnd = FindWindowA("Lego Island MainNoM App", "LEGO\xae");
HWND hWnd = FindWindow("Lego Island MainNoM App", "LEGO\xae");
if (_stricmp(afxCurrentAppName, "config") == 0 || !hWnd) {
return TRUE;
}
@ -122,7 +122,7 @@ BOOL CConfigApp::WriteReg(const char* p_key, const char* p_value) const
HKEY hKey;
DWORD pos;
if (RegCreateKeyExA(
if (RegCreateKeyEx(
HKEY_LOCAL_MACHINE,
"SOFTWARE\\Mindscape\\LEGO Island",
0,
@ -133,7 +133,7 @@ BOOL CConfigApp::WriteReg(const char* p_key, const char* p_value) const
&hKey,
&pos
) == ERROR_SUCCESS) {
if (RegSetValueExA(hKey, p_key, 0, REG_SZ, (LPBYTE) p_value, strlen(p_value)) == ERROR_SUCCESS) {
if (RegSetValueEx(hKey, p_key, 0, REG_SZ, (LPBYTE) p_value, strlen(p_value)) == ERROR_SUCCESS) {
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
return TRUE;
}
@ -153,8 +153,8 @@ BOOL CConfigApp::ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const
BOOL out = FALSE;
DWORD size = p_size;
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueExA(hKey, p_key, NULL, &valueType, (LPBYTE) p_value, &size) == ERROR_SUCCESS) {
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueEx(hKey, p_key, NULL, &valueType, (LPBYTE) p_value, &size) == ERROR_SUCCESS) {
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
out = TRUE;
}

View File

@ -22,7 +22,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
OSVERSIONINFOA os_version;
os_version.dwOSVersionInfoSize = sizeof(os_version);
if (!GetVersionExA(&os_version)) {
if (!GetVersionEx(&os_version)) {
*p_version = 0;
*p_found = 0;
return;
@ -38,16 +38,16 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
return;
}
*p_version = 0x200;
HMODULE dinput_module = LoadLibraryA("DINPUT.DLL");
HMODULE dinput_module = LoadLibrary("DINPUT.DLL");
if (!dinput_module) {
OutputDebugStringA("Couldn't LoadLibrary DInput\r\n");
OutputDebugString("Couldn't LoadLibrary DInput\r\n");
return;
}
DirectInputCreateA_fn* func_DirectInputCreateA =
(DirectInputCreateA_fn*) GetProcAddress(dinput_module, "DirectInputCreateA");
FreeLibrary(dinput_module);
if (!func_DirectInputCreateA) {
OutputDebugStringA("Couldn't GetProcAddress DInputCreate\r\n");
OutputDebugString("Couldn't GetProcAddress DInputCreate\r\n");
return;
}
*p_version = 0x300;
@ -58,7 +58,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
*p_version = 0x501;
return;
}
HMODULE ddraw_module = LoadLibraryA("DDRAW.DLL");
HMODULE ddraw_module = LoadLibrary("DDRAW.DLL");
if (!ddraw_module) {
*p_version = 0;
*p_found = 0;
@ -71,7 +71,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
*p_version = 0;
*p_found = 0;
FreeLibrary(ddraw_module);
OutputDebugStringA("Couldn't LoadLibrary DDraw\r\n");
OutputDebugString("Couldn't LoadLibrary DDraw\r\n");
return;
}
LPDIRECTDRAW ddraw;
@ -79,7 +79,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
*p_version = 0;
*p_found = 0;
FreeLibrary(ddraw_module);
OutputDebugStringA("Couldn't create DDraw\r\n");
OutputDebugString("Couldn't create DDraw\r\n");
return;
}
*p_version = 0x100;
@ -87,14 +87,14 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
if (FAILED(ddraw->QueryInterface(IID_IDirectDraw2, (LPVOID*) &ddraw2))) {
ddraw->Release();
FreeLibrary(ddraw_module);
OutputDebugStringA("Couldn't QI DDraw2\r\n");
OutputDebugString("Couldn't QI DDraw2\r\n");
return;
}
ddraw->Release();
*p_version = 0x200;
HMODULE dinput_module = LoadLibraryA("DINPUT.DLL");
HMODULE dinput_module = LoadLibrary("DINPUT.DLL");
if (!dinput_module) {
OutputDebugStringA("Couldn't LoadLibrary DInput\r\n");
OutputDebugString("Couldn't LoadLibrary DInput\r\n");
ddraw2->Release();
FreeLibrary(ddraw_module);
return;
@ -105,7 +105,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
if (!func_DirectInputCreateA) {
FreeLibrary(ddraw_module);
ddraw2->Release();
OutputDebugStringA("Couldn't GetProcAddress DInputCreate\r\n");
OutputDebugString("Couldn't GetProcAddress DInputCreate\r\n");
return;
}
*p_version = 0x300;
@ -118,7 +118,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
ddraw2->Release();
FreeLibrary(ddraw_module);
*p_version = 0;
OutputDebugStringA("Couldn't Set coop level\r\n");
OutputDebugString("Couldn't Set coop level\r\n");
return;
}
LPDIRECTDRAWSURFACE surface;
@ -126,7 +126,7 @@ void DetectDirectX(unsigned int* p_version, BOOL* p_found)
ddraw2->Release();
FreeLibrary(ddraw_module);
*p_version = 0;
OutputDebugStringA("Couldn't CreateSurface\r\n");
OutputDebugString("Couldn't CreateSurface\r\n");
return;
}
LPDIRECTDRAWSURFACE3 surface3;

View File

@ -179,7 +179,7 @@ BOOL IsleApp::SetupLegoOmni()
{
BOOL result = FALSE;
char mediaPath[256];
GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath));
GetProfileString("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath));
#ifdef COMPAT_MODE
BOOL failure;
@ -251,7 +251,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// Throw error if sound unavailable
if (!soundReady) {
MessageBoxA(
MessageBox(
NULL,
"\"LEGO\xAE Island\" is not detecting a DirectSound compatible sound card. Please quit all other "
"applications and try again.",
@ -266,7 +266,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// Create window
if (g_isle->SetupWindow(hInstance, lpCmdLine) != SUCCESS) {
MessageBoxA(
MessageBox(
NULL,
"\"LEGO\xAE Island\" failed to start. Please quit all other applications and try again.",
"LEGO\xAE Island Error",
@ -287,12 +287,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// sample for MSVC600. It's quite possible Mindscape derived this app from that example since they no longer had the
// luxury of the MFC AppWizard which we know they used for the frontend used during development (ISLEMFC.EXE,
// MAIN.EXE, et al.)
LoadAcceleratorsA(hInstance, "AppAccel");
LoadAccelerators(hInstance, "AppAccel");
MSG msg;
while (!g_closed) {
while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE)) {
while (!PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) {
if (g_isle) {
g_isle->Tick(1);
}
@ -303,15 +303,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
}
while (!g_closed) {
if (!PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) {
if (!PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
break;
}
MSG nextMsg;
if (!g_isle || !g_isle->GetWindowHandle() || msg.message != WM_MOUSEMOVE ||
!PeekMessageA(&nextMsg, NULL, 0, 0, PM_NOREMOVE) || nextMsg.message != WM_MOUSEMOVE) {
!PeekMessage(&nextMsg, NULL, 0, 0, PM_NOREMOVE) || nextMsg.message != WM_MOUSEMOVE) {
TranslateMessage(&msg);
DispatchMessageA(&msg);
DispatchMessage(&msg);
}
if (g_reqEnableRMDevice) {
@ -343,7 +343,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// FUNCTION: ISLE 0x401ca0
BOOL FindExistingInstance()
{
HWND hWnd = FindWindowA(WNDCLASS_NAME, WINDOW_TITLE);
HWND hWnd = FindWindow(WNDCLASS_NAME, WINDOW_TITLE);
if (hWnd) {
if (SetForegroundWindow(hWnd)) {
ShowWindow(hWnd, SW_RESTORE);
@ -373,14 +373,14 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
unsigned char keyCode = 0;
if (!g_isle) {
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
switch (uMsg) {
case WM_PAINT:
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_ACTIVATE:
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_ACTIVATEAPP:
if (g_isle) {
if ((wParam != 0) && (g_isle->GetFullScreen())) {
@ -395,7 +395,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
g_isle->SetWindowActive(wParam);
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_CLOSE:
if (!g_closed && g_isle) {
delete g_isle;
@ -403,7 +403,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
g_closed = TRUE;
return 0;
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_GETMINMAXINFO:
((MINMAXINFO*) lParam)->ptMaxTrackSize.x = (g_windowRect.right - g_windowRect.left) + 1;
((MINMAXINFO*) lParam)->ptMaxTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1;
@ -411,7 +411,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
((MINMAXINFO*) lParam)->ptMinTrackSize.y = (g_windowRect.bottom - g_windowRect.top) + 1;
return 0;
case WM_ENTERMENULOOP:
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_SYSCOMMAND:
if (wParam == SC_SCREENSAVE) {
return 0;
@ -421,27 +421,27 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (g_rmDisabled) {
ShowWindow(g_isle->GetWindowHandle(), SW_RESTORE);
}
PostMessageA(g_isle->GetWindowHandle(), WM_CLOSE, 0, 0);
PostMessage(g_isle->GetWindowHandle(), WM_CLOSE, 0, 0);
return 0;
}
}
else if (g_isle && g_isle->GetFullScreen() && (wParam == SC_MOVE || wParam == SC_KEYMENU)) {
return 0;
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_EXITMENULOOP:
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_MOVING:
if (g_isle && g_isle->GetFullScreen()) {
GetWindowRect(hWnd, (LPRECT) lParam);
return 0;
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_NCPAINT:
if (g_isle && g_isle->GetFullScreen()) {
return 0;
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_DISPLAYCHANGE:
if (g_isle && VideoManager() && g_isle->GetFullScreen() && VideoManager()->GetDirect3D()) {
if (VideoManager()->GetDirect3D()->AssignedDevice()) {
@ -474,12 +474,12 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
}
}
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
case WM_KEYDOWN:
// While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems
// to be what the assembly is actually doing
if (lParam & (KF_REPEAT << 16)) {
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
type = c_notificationKeyPress;
keyCode = wParam;
@ -513,7 +513,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;
default:
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
if (g_isle) {
@ -559,7 +559,7 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
MxOmni::SetSound3D(m_use3dSound);
srand(timeGetTime() / 1000);
SystemParametersInfoA(SPI_SETMOUSETRAILS, 0, NULL, 0);
SystemParametersInfo(SPI_SETMOUSETRAILS, 0, NULL, 0);
ZeroMemory(&wndclass, sizeof(WNDCLASSA));
@ -567,22 +567,22 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbWndExtra = 0;
wndclass.hIcon = LoadIconA(hInstance, MAKEINTRESOURCEA(APP_ICON));
wndclass.hCursor = m_cursorArrow = m_cursorCurrent = LoadCursorA(hInstance, MAKEINTRESOURCEA(ISLE_ARROW));
m_cursorBusy = LoadCursorA(hInstance, MAKEINTRESOURCEA(ISLE_BUSY));
m_cursorNo = LoadCursorA(hInstance, MAKEINTRESOURCEA(ISLE_NO));
wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(APP_ICON));
wndclass.hCursor = m_cursorArrow = m_cursorCurrent = LoadCursor(hInstance, MAKEINTRESOURCE(ISLE_ARROW));
m_cursorBusy = LoadCursor(hInstance, MAKEINTRESOURCE(ISLE_BUSY));
m_cursorNo = LoadCursor(hInstance, MAKEINTRESOURCE(ISLE_NO));
wndclass.hInstance = hInstance;
wndclass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
wndclass.lpszClassName = WNDCLASS_NAME;
if (!RegisterClassA(&wndclass)) {
if (!RegisterClass(&wndclass)) {
return FAILURE;
}
if (m_fullScreen) {
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
m_windowHandle = CreateWindowExA(
m_windowHandle = CreateWindowEx(
WS_EX_APPWINDOW,
WNDCLASS_NAME,
WINDOW_TITLE,
@ -600,7 +600,7 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
else {
AdjustWindowRectEx(&g_windowRect, WS_CAPTION | WS_SYSMENU, 0, WS_EX_APPWINDOW);
m_windowHandle = CreateWindowExA(
m_windowHandle = CreateWindowEx(
WS_EX_APPWINDOW,
WNDCLASS_NAME,
WINDOW_TITLE,
@ -690,8 +690,8 @@ BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
BOOL out = FALSE;
DWORD size = outSize;
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) {
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
if (RegQueryValueEx(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) {
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
out = TRUE;
}

View File

@ -186,7 +186,7 @@ public:
MxResult StartActionIfUnknown0x13c(MxDSAction& p_dsAction) { return m_unk0x13c ? Start(&p_dsAction) : SUCCESS; }
void SetUnknown13c(MxBool p_unk0x13c) { m_unk0x13c = p_unk0x13c; }
void CloseMainWindow() { PostMessageA(m_windowHandle, WM_CLOSE, 0, 0); }
void CloseMainWindow() { PostMessage(m_windowHandle, WM_CLOSE, 0, 0); }
// SYNTHETIC: LEGO1 0x10058b30
// LegoOmni::`scalar deleting destructor'

View File

@ -565,7 +565,7 @@ void EnableAnimations(MxBool p_enable)
// FUNCTION: LEGO1 0x1003ef40
void SetAppCursor(Cursor p_cursor)
{
PostMessageA(MxOmni::GetInstance()->GetWindowHandle(), WM_ISLE_SETCURSOR, p_cursor, 0);
PostMessage(MxOmni::GetInstance()->GetWindowHandle(), WM_ISLE_SETCURSOR, p_cursor, 0);
}
// FUNCTION: LEGO1 0x1003ef60

View File

@ -398,7 +398,7 @@ void LegoVideoManager::DrawFPS()
char zeros[8] = "0000.00";
if (m_unk0x528 == NULL) {
m_arialFont = CreateFontA(
m_arialFont = CreateFont(
12,
0,
0,
@ -417,7 +417,7 @@ void LegoVideoManager::DrawFPS()
HDC dc = GetDC(NULL);
SelectObject(dc, m_arialFont);
GetTextExtentPointA(dc, zeros, strlen(zeros), &m_fpsSize);
GetTextExtentPoint(dc, zeros, strlen(zeros), &m_fpsSize);
ReleaseDC(NULL, dc);
m_unk0x528 = m_displaySurface->FUN_100bc8b0(m_fpsSize.cx, m_fpsSize.cy);
@ -493,11 +493,11 @@ void LegoVideoManager::DrawFPS()
SetTextColor(dc, RGB(255, 255, 0));
SetBkColor(dc, RGB(0, 0, 0));
SetBkMode(dc, OPAQUE);
GetTextExtentPoint32A(dc, buffer, nb, &m_fpsSize);
GetTextExtentPoint32(dc, buffer, nb, &m_fpsSize);
RECT rect;
SetRect(&rect, 0, 0, m_fpsSize.cx, m_fpsSize.cy);
ExtTextOutA(dc, 0, 0, ETO_OPAQUE, &rect, buffer, nb, NULL);
ExtTextOut(dc, 0, 0, ETO_OPAQUE, &rect, buffer, nb, NULL);
m_unk0x528->ReleaseDC(dc);
m_unk0x550 = 1.f;
}

View File

@ -217,7 +217,7 @@ MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount)
for (; device < total; device++) {
MIDIOUTCAPSA caps;
midiOutGetDevCapsA(device, &caps, sizeof(MIDIOUTCAPSA));
midiOutGetDevCaps(device, &caps, sizeof(MIDIOUTCAPSA));
if (caps.wTechnology == MOD_FMSYNTH) {
break;
}

View File

@ -71,7 +71,7 @@ MxResult MxDSFile::ReadChunks()
m_io.Read(&m_header, 0x0c);
if ((m_header.m_majorVersion != SI_MAJOR_VERSION) || (m_header.m_minorVersion != SI_MINOR_VERSION)) {
sprintf(tempBuffer, "Wrong SI file version. %d.%d expected.", SI_MAJOR_VERSION, SI_MINOR_VERSION);
MessageBoxA(NULL, tempBuffer, NULL, MB_ICONERROR);
MessageBox(NULL, tempBuffer, NULL, MB_ICONERROR);
return FAILURE;
}

View File

@ -15,7 +15,7 @@ MxCriticalSection::MxCriticalSection()
HANDLE mutex;
if (g_useMutex) {
mutex = CreateMutexA(NULL, FALSE, NULL);
mutex = CreateMutex(NULL, FALSE, NULL);
m_mutex = mutex;
}
else {

View File

@ -16,7 +16,7 @@ MxResult MxSemaphore::Init(MxU32 p_initialCount, MxU32 p_maxCount)
{
MxResult result = FAILURE;
if ((m_hSemaphore = CreateSemaphoreA(NULL, p_initialCount, p_maxCount, NULL))) {
if ((m_hSemaphore = CreateSemaphore(NULL, p_initialCount, p_maxCount, NULL))) {
result = SUCCESS;
}

View File

@ -177,7 +177,7 @@ MxLong MxBitmap::Read(const char* p_filename)
MxResult result = FAILURE;
HANDLE handle = 0;
handle = CreateFileA(p_filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
handle = CreateFile(p_filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (handle == INVALID_HANDLE_VALUE) {
goto done;