mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 08:43:38 +00:00
Replaced a few more 0xffffffff by the appropriate constants.
This commit is contained in:
parent
76f13deb26
commit
2aa8a8390a
|
@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
|
||||||
|
|
||||||
HINSTANCE COMDLG32_hInstance = 0;
|
HINSTANCE COMDLG32_hInstance = 0;
|
||||||
|
|
||||||
static DWORD COMDLG32_TlsIndex;
|
static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES;
|
||||||
|
|
||||||
HINSTANCE SHELL32_hInstance = 0;
|
HINSTANCE SHELL32_hInstance = 0;
|
||||||
HINSTANCE SHFOLDER_hInstance = 0;
|
HINSTANCE SHFOLDER_hInstance = 0;
|
||||||
|
@ -81,8 +81,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
|
||||||
COMDLG32_hInstance = hInstance;
|
COMDLG32_hInstance = hInstance;
|
||||||
DisableThreadLibraryCalls(hInstance);
|
DisableThreadLibraryCalls(hInstance);
|
||||||
|
|
||||||
COMDLG32_TlsIndex = 0xffffffff;
|
|
||||||
|
|
||||||
SHELL32_hInstance = GetModuleHandleA("SHELL32.DLL");
|
SHELL32_hInstance = GetModuleHandleA("SHELL32.DLL");
|
||||||
|
|
||||||
if (!SHELL32_hInstance)
|
if (!SHELL32_hInstance)
|
||||||
|
@ -121,7 +119,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
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);
|
if(SHFOLDER_hInstance) FreeLibrary(SHFOLDER_hInstance);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -157,9 +155,9 @@ LPVOID COMDLG32_AllocMem(
|
||||||
void COMDLG32_SetCommDlgExtendedError(DWORD err)
|
void COMDLG32_SetCommDlgExtendedError(DWORD err)
|
||||||
{
|
{
|
||||||
TRACE("(%08lx)\n", err);
|
TRACE("(%08lx)\n", err);
|
||||||
if (COMDLG32_TlsIndex == 0xffffffff)
|
if (COMDLG32_TlsIndex == TLS_OUT_OF_INDEXES)
|
||||||
COMDLG32_TlsIndex = TlsAlloc();
|
COMDLG32_TlsIndex = TlsAlloc();
|
||||||
if (COMDLG32_TlsIndex != 0xffffffff)
|
if (COMDLG32_TlsIndex != TLS_OUT_OF_INDEXES)
|
||||||
TlsSetValue(COMDLG32_TlsIndex, (void *)err);
|
TlsSetValue(COMDLG32_TlsIndex, (void *)err);
|
||||||
else
|
else
|
||||||
FIXME("No Tls Space\n");
|
FIXME("No Tls Space\n");
|
||||||
|
@ -177,7 +175,7 @@ void COMDLG32_SetCommDlgExtendedError(DWORD err)
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI CommDlgExtendedError(void)
|
DWORD WINAPI CommDlgExtendedError(void)
|
||||||
{
|
{
|
||||||
if (COMDLG32_TlsIndex != 0xffffffff)
|
if (COMDLG32_TlsIndex != TLS_OUT_OF_INDEXES)
|
||||||
return (DWORD)TlsGetValue(COMDLG32_TlsIndex);
|
return (DWORD)TlsGetValue(COMDLG32_TlsIndex);
|
||||||
else
|
else
|
||||||
return 0; /* we never set an error, so there isn't one */
|
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.HighPart = dlibMove.s.HighPart;
|
||||||
liNewPos.s.LowPart = SetFilePointer (This->hFile, dlibMove.s.LowPart, &liNewPos.s.HighPart, dwOrigin);
|
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;
|
if (plibNewPosition) plibNewPosition->QuadPart = liNewPos.QuadPart;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
|
@ -1750,7 +1750,7 @@ UINT WINAPI WinExec( LPCSTR lpCmdLine, UINT nCmdShow )
|
||||||
0, NULL, NULL, &startup, &info ))
|
0, NULL, NULL, &startup, &info ))
|
||||||
{
|
{
|
||||||
/* Give 30 seconds to the app to come up */
|
/* 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() );
|
WARN("WaitForInputIdle failed: Error %ld\n", GetLastError() );
|
||||||
ret = 33;
|
ret = 33;
|
||||||
/* Close off the handles */
|
/* Close off the handles */
|
||||||
|
@ -1808,7 +1808,7 @@ HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
|
||||||
params->lpEnvAddress, NULL, &startup, &info ))
|
params->lpEnvAddress, NULL, &startup, &info ))
|
||||||
{
|
{
|
||||||
/* Give 30 seconds to the app to come up */
|
/* 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() );
|
WARN("WaitForInputIdle failed: Error %ld\n", GetLastError() );
|
||||||
hInstance = (HINSTANCE)33;
|
hInstance = (HINSTANCE)33;
|
||||||
/* Close off the handles */
|
/* Close off the handles */
|
||||||
|
|
|
@ -222,7 +222,7 @@ void DoOpenFile(LPCWSTR szFileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
size = GetFileSize(hFile, NULL);
|
size = GetFileSize(hFile, NULL);
|
||||||
if (size == 0xFFFFFFFF)
|
if (size == INVALID_FILE_SIZE)
|
||||||
{
|
{
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
ShowLastError();
|
ShowLastError();
|
||||||
|
|
Loading…
Reference in a new issue