Commit 2aa8a839 authored by Alexandre Julliard's avatar Alexandre Julliard

Replaced a few more 0xffffffff by the appropriate constants.

parent 76f13deb
......@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
HINSTANCE COMDLG32_hInstance = 0;
static DWORD COMDLG32_TlsIndex;
static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES;
HINSTANCE SHELL32_hInstance = 0;
HINSTANCE SHFOLDER_hInstance = 0;
......@@ -81,8 +81,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
COMDLG32_hInstance = hInstance;
DisableThreadLibraryCalls(hInstance);
COMDLG32_TlsIndex = 0xffffffff;
SHELL32_hInstance = GetModuleHandleA("SHELL32.DLL");
if (!SHELL32_hInstance)
......@@ -121,7 +119,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
break;
case DLL_PROCESS_DETACH:
if (COMDLG32_TlsIndex != 0xffffffff) TlsFree(COMDLG32_TlsIndex);
if (COMDLG32_TlsIndex != TLS_OUT_OF_INDEXES) TlsFree(COMDLG32_TlsIndex);
if(SHFOLDER_hInstance) FreeLibrary(SHFOLDER_hInstance);
break;
}
......@@ -157,9 +155,9 @@ LPVOID COMDLG32_AllocMem(
void COMDLG32_SetCommDlgExtendedError(DWORD err)
{
TRACE("(%08lx)\n", err);
if (COMDLG32_TlsIndex == 0xffffffff)
if (COMDLG32_TlsIndex == TLS_OUT_OF_INDEXES)
COMDLG32_TlsIndex = TlsAlloc();
if (COMDLG32_TlsIndex != 0xffffffff)
if (COMDLG32_TlsIndex != TLS_OUT_OF_INDEXES)
TlsSetValue(COMDLG32_TlsIndex, (void *)err);
else
FIXME("No Tls Space\n");
......@@ -177,7 +175,7 @@ void COMDLG32_SetCommDlgExtendedError(DWORD err)
*/
DWORD WINAPI CommDlgExtendedError(void)
{
if (COMDLG32_TlsIndex != 0xffffffff)
if (COMDLG32_TlsIndex != TLS_OUT_OF_INDEXES)
return (DWORD)TlsGetValue(COMDLG32_TlsIndex);
else
return 0; /* we never set an error, so there isn't one */
......
......@@ -122,7 +122,7 @@ HRESULT WINAPI ILoaderStream_IStream_Seek (LPSTREAM iface, LARGE_INTEGER dlibMov
liNewPos.s.HighPart = dlibMove.s.HighPart;
liNewPos.s.LowPart = SetFilePointer (This->hFile, dlibMove.s.LowPart, &liNewPos.s.HighPart, dwOrigin);
if (liNewPos.s.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR) return E_FAIL;
if (liNewPos.s.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) return E_FAIL;
if (plibNewPosition) plibNewPosition->QuadPart = liNewPos.QuadPart;
return S_OK;
......
......@@ -1750,7 +1750,7 @@ UINT WINAPI WinExec( LPCSTR lpCmdLine, UINT nCmdShow )
0, NULL, NULL, &startup, &info ))
{
/* Give 30 seconds to the app to come up */
if (wait_input_idle( info.hProcess, 30000 ) == 0xFFFFFFFF)
if (wait_input_idle( info.hProcess, 30000 ) == WAIT_FAILED)
WARN("WaitForInputIdle failed: Error %ld\n", GetLastError() );
ret = 33;
/* Close off the handles */
......@@ -1808,7 +1808,7 @@ HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
params->lpEnvAddress, NULL, &startup, &info ))
{
/* Give 30 seconds to the app to come up */
if (wait_input_idle( info.hProcess, 30000 ) == 0xFFFFFFFF )
if (wait_input_idle( info.hProcess, 30000 ) == WAIT_FAILED)
WARN("WaitForInputIdle failed: Error %ld\n", GetLastError() );
hInstance = (HINSTANCE)33;
/* Close off the handles */
......
......@@ -222,7 +222,7 @@ void DoOpenFile(LPCWSTR szFileName)
}
size = GetFileSize(hFile, NULL);
if (size == 0xFFFFFFFF)
if (size == INVALID_FILE_SIZE)
{
CloseHandle(hFile);
ShowLastError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment