Hello, As per Bug 90, <URL: http://bugs.winehq.com/show_bug.cgi?id=90>, and Francois's comments about removing casts using: $ find . -name "*.c" | xargs egrep "\(( *HANDLE|HWND|HFONT|HICON) *\) *(NULL|0)" Please find attached a patch which does this. There are still a few 16 bit handles which I haven't undone the cast for as they begin to generate compiler warnings. I've not looked at them yet. Regards, Anand -- `` We are shaped by our thoughts, we become what we think. When the mind is pure, joy follows like a shadow that never leaves. '' -- Buddha, The Dhammapada
diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/controls/button.c wine-local/controls/button.c --- wine/controls/button.c Sat Nov 9 15:00:09 2002 +++ wine-local/controls/button.c Sun Dec 1 09:34:39 2002 @@ -1094,7 +1094,7 @@ if (GetClipRgn(hDC, clipRegion) != 1) { DeleteObject(clipRegion); - clipRegion=(HRGN)NULL; + clipRegion=NULL; } clipRect = dis.rcItem; DPtoLP(hDC, (LPPOINT) &clipRect, 2); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/controls/combo.c wine-local/controls/combo.c --- wine/controls/combo.c Sun Dec 1 09:33:23 2002 +++ wine-local/controls/combo.c Sun Dec 1 09:53:18 2002 @@ -312,7 +312,7 @@ * message. */ SetWindowPos( lphc->self, - (HWND)NULL, + NULL, 0, 0, windowRect.right - windowRect.left, newComboHeight, @@ -822,7 +822,7 @@ if (GetClipRgn(hdc, clipRegion)!=1) { DeleteObject(clipRegion); - clipRegion=(HRGN)NULL; + clipRegion = NULL; } if (!IsWindowEnabled(lphc->self) & WS_DISABLED) itemState |= ODS_DISABLED; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/controls/edit.c wine-local/controls/edit.c --- wine/controls/edit.c Sun Nov 24 23:03:32 2002 +++ wine-local/controls/edit.c Sun Dec 1 11:39:50 2002 @@ -2169,7 +2169,7 @@ es->format_rect.bottom = es->format_rect.top + es->line_height; if ((es->style & ES_MULTILINE) && !(es->style & ES_AUTOHSCROLL)) - EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, (HRGN)0); + EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, 0); } @@ -2779,7 +2779,7 @@ GetClientRect(es->hwndSelf, &rc1); IntersectRect(&rc, &rc1, &es->format_rect); ScrollWindowEx(es->hwndSelf, -dx, dy, - NULL, &rc, (HRGN)NULL, NULL, SW_INVALIDATE); + NULL, &rc, NULL, NULL, SW_INVALIDATE); /* force scroll info update */ EDIT_UpdateScrollInfo(es); } @@ -3143,7 +3143,7 @@ if(es->hloc32A) { LocalFree(es->hloc32A); - es->hloc32A = (HLOCAL)NULL; + es->hloc32A = NULL; } es->hloc32W = hloc; } @@ -3183,7 +3183,7 @@ EDIT_EM_EmptyUndoBuffer(es); es->flags &= ~EF_MODIFIED; es->flags &= ~EF_UPDATE; - EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, (HRGN)0); + EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, 0); EDIT_UpdateText(es, NULL, TRUE); EDIT_EM_ScrollCaret(es); /* force scroll info update */ @@ -3219,7 +3219,7 @@ if(es->hloc32A) { LocalFree(es->hloc32A); - es->hloc32A = (HLOCAL)NULL; + es->hloc32A = NULL; } countA = LOCAL_Size(hInstance, hloc); @@ -3250,7 +3250,7 @@ EDIT_EM_EmptyUndoBuffer(es); es->flags &= ~EF_MODIFIED; es->flags &= ~EF_UPDATE; - EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, (HRGN)0); + EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, 0); EDIT_UpdateText(es, NULL, TRUE); EDIT_EM_ScrollCaret(es); /* force scroll info update */ @@ -3460,7 +3460,7 @@ es->word_break_proc16 = NULL; if ((es->style & ES_MULTILINE) && !(es->style & ES_AUTOHSCROLL)) { - EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, (HRGN)0); + EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, 0); EDIT_UpdateText(es, NULL, TRUE); } } @@ -3479,7 +3479,7 @@ es->word_break_proc = NULL; es->word_break_proc16 = wbp; if ((es->style & ES_MULTILINE) && !(es->style & ES_AUTOHSCROLL)) { - EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, (HRGN)0); + EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, 0); EDIT_UpdateText(es, NULL, TRUE); } } @@ -4527,7 +4527,7 @@ EDIT_SetRectNP(es, &r); if (es->style & ES_MULTILINE) - EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, (HRGN)0); + EDIT_BuildLineDefs_ML(es, 0, strlenW(es->text), 0, 0); else EDIT_CalcLineWidth_SL(es); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/acmstream.c wine-local/dlls/avifil32/acmstream.c --- wine/dlls/avifil32/acmstream.c Tue Oct 22 09:41:01 2002 +++ wine-local/dlls/avifil32/acmstream.c Sun Dec 1 09:34:39 2002 @@ -162,11 +162,11 @@ if (This->ref == 0) { /* destruct */ - if (This->has != (HACMSTREAM)NULL) { + if (This->has != NULL) { if (This->acmStreamHdr.fdwStatus & ACMSTREAMHEADER_STATUSF_PREPARED) acmStreamUnprepareHeader(This->has, &This->acmStreamHdr, 0); acmStreamClose(This->has, 0); - This->has = (HACMSTREAM)NULL; + This->has = NULL; } if (This->acmStreamHdr.pbSrc != NULL) { GlobalFreePtr(This->acmStreamHdr.pbSrc); @@ -271,7 +271,7 @@ return AVIERR_BADSIZE; /* Need codec to correct some values in structure */ - if (This->has == (HACMSTREAM)NULL) { + if (This->has == NULL) { HRESULT hr = AVIFILE_OpenCompressor(This); if (FAILED(hr)) @@ -323,7 +323,7 @@ if (formatsize == NULL) return AVIERR_BADPARAM; - if (This->has == (HACMSTREAM)NULL) { + if (This->has == NULL) { HRESULT hr = AVIFILE_OpenCompressor(This); if (FAILED(hr)) @@ -413,7 +413,7 @@ *samplesread = 0; /* Do we have our compressor? */ - if (This->has == (HACMSTREAM)NULL) { + if (This->has == NULL) { hr = AVIFILE_OpenCompressor(This); if (FAILED(hr)) @@ -540,7 +540,7 @@ return AVIERR_READONLY; /* also need a compressor */ - if (This->has == (HACMSTREAM)NULL) + if (This->has == NULL) return AVIERR_NOCOMPRESSOR; /* map our sizes to pStream sizes */ @@ -629,7 +629,7 @@ return AVIERR_READONLY; /* A compressor is also neccessary */ - if (This->has == (HACMSTREAM)NULL) + if (This->has == NULL) return AVIERR_NOCOMPRESSOR; /* map our positions to pStream positions */ @@ -681,7 +681,7 @@ assert(This != NULL); assert(This->pStream != NULL); - if (This->has != (HACMSTREAM)NULL) + if (This->has != NULL) return AVIERR_OK; if (This->lpInFormat == NULL) { diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/api.c wine-local/dlls/avifil32/api.c --- wine/dlls/avifil32/api.c Sat Nov 9 15:00:11 2002 +++ wine-local/dlls/avifil32/api.c Sun Dec 1 09:34:39 2002 @@ -1224,7 +1224,7 @@ hic = ICLocate(ICTYPE_VIDEO, sInfo.fccHandler, lpFormat, NULL, ICMODE_DECOMPRESS); - if (hic != (HIC)NULL) { + if (hic != NULL) { if (ICGetInfo(hic, &icinfo, sizeof(icinfo)) == S_OK) lstrcatW(szFormat, icinfo.szDescription); ICClose(hic); @@ -1249,7 +1249,7 @@ afd.cbStruct = sizeof(afd); afd.pwfx = lpFormat; - if (acmFormatTagDetailsW((HACMDRIVER)NULL, &aftd, + if (acmFormatTagDetailsW(NULL, &aftd, ACM_FORMATTAGDETAILSF_FORMATTAG) == S_OK) { if (acmFormatDetailsW(NULL,&afd,ACM_FORMATDETAILSF_FORMAT) == S_OK) wsprintfW(szFormat, szAudioFmt, afd.szFormat, aftd.szFormatTag); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/avifile.c wine-local/dlls/avifil32/avifile.c --- wine/dlls/avifil32/avifile.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/avifil32/avifile.c Sun Dec 1 09:34:39 2002 @@ -318,9 +318,9 @@ LocalFree((HLOCAL)This->szFileName); This->szFileName = NULL; } - if (This->hmmio != (HMMIO)NULL) { + if (This->hmmio != NULL) { mmioClose(This->hmmio, 0); - This->hmmio = (HMMIO)NULL; + This->hmmio = NULL; } LocalFree((HLOCAL)This); @@ -586,7 +586,7 @@ return AVIERR_BADPARAM; assert(This->paf != NULL); - if (This->paf->hmmio != (HMMIO)NULL) + if (This->paf->hmmio != NULL) return AVIERR_ERROR; /* No reuse of this object for another file! */ /* remeber mode and name */ @@ -601,7 +601,7 @@ /* try to open the file */ This->paf->hmmio = mmioOpenW(This->paf->szFileName, NULL, MMIO_ALLOCBUF | dwMode); - if (This->paf->hmmio == (HMMIO)NULL) + if (This->paf->hmmio == NULL) return AVIERR_FILEOPEN; /* should we create a new file? */ @@ -1509,7 +1509,7 @@ DWORD nStream; HRESULT hr; - if (This->hmmio == (HMMIO)NULL) + if (This->hmmio == NULL) return AVIERR_FILEOPEN; /* initialize stream ptr's */ @@ -1904,7 +1904,7 @@ /* pre-conditions */ assert(This != NULL); assert(This->paf != NULL); - assert(This->paf->hmmio != (HMMIO)NULL); + assert(This->paf->hmmio != NULL); assert(This->sInfo.dwStart <= pos && pos < This->sInfo.dwLength); assert(pos <= This->lLastFrame); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/extrachunk.c wine-local/dlls/avifil32/extrachunk.c --- wine/dlls/avifil32/extrachunk.c Sat Oct 19 09:48:59 2002 +++ wine-local/dlls/avifil32/extrachunk.c Sun Dec 1 09:34:39 2002 @@ -106,7 +106,7 @@ /* pre-conditions */ assert(extra != NULL); - assert(hmmio != (HMMIO)NULL); + assert(hmmio != NULL); assert(lpck != NULL); cb = lpck->cksize + 2 * sizeof(DWORD); @@ -149,7 +149,7 @@ /* pre-conditions */ assert(extra != NULL); - assert(hmmio != (HMMIO)NULL); + assert(hmmio != NULL); assert(lpck != NULL); TRACE("({%p,%lu},%p,%p,%p,0x%X)\n", extra->lp, extra->cb, hmmio, lpck, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/factory.c wine-local/dlls/avifil32/factory.c --- wine/dlls/avifil32/factory.c Sat Nov 9 15:00:11 2002 +++ wine-local/dlls/avifil32/factory.c Sun Dec 1 09:34:39 2002 @@ -32,7 +32,7 @@ #include "initguid.h" #include "avifile_private.h" -HMODULE AVIFILE_hModule = (HMODULE)NULL; +HMODULE AVIFILE_hModule = NULL; BOOL AVIFILE_bLocked = FALSE; UINT AVIFILE_uUseCount = 0; @@ -203,7 +203,7 @@ switch (fdwReason) { case DLL_PROCESS_ATTACH: - if (AVIFILE_hModule == (HMODULE)NULL) + if (AVIFILE_hModule == NULL) AVIFILE_hModule = (HMODULE)hInstDll; break; case DLL_PROCESS_DETACH: diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/getframe.c wine-local/dlls/avifil32/getframe.c --- wine/dlls/avifil32/getframe.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/avifil32/getframe.c Sun Dec 1 09:34:39 2002 @@ -102,13 +102,13 @@ GlobalFreePtr(This->lpInFormat); This->lpInFormat = NULL; } - if (This->hic != (HIC)NULL) { + if (This->hic != NULL) { if (This->bResize) ICDecompressExEnd(This->hic); else ICDecompressEnd(This->hic); ICClose(This->hic); - This->hic = (HIC)NULL; + This->hic = NULL; } } @@ -260,7 +260,7 @@ This->lpInFormat->biSizeImage = readBytes; /* nothing to decompress? */ - if (This->hic == (HIC)NULL) { + if (This->hic == NULL) { This->lCurrentFrame = lPos; return This->lpInFormat; } @@ -278,7 +278,7 @@ } /* for (lNext < lPos) */ } /* if (This->lCurrentFrame != lPos) */ - return (This->hic == (HIC)NULL ? This->lpInFormat : This->lpOutFormat); + return (This->hic == NULL ? This->lpInFormat : This->lpOutFormat); } static HRESULT WINAPI IGetFrame_fnBegin(IGetFrame *iface, LONG lStart, @@ -396,7 +396,7 @@ } /* need handle to video compressor */ - if (This->hic == (HIC)NULL) { + if (This->hic == NULL) { FOURCC fccHandler; if (This->lpInFormat->biCompression == BI_RGB) @@ -414,7 +414,7 @@ } This->hic = ICLocate(ICTYPE_VIDEO, fccHandler, This->lpInFormat, lpbi, ICMODE_DECOMPRESS); - if (This->hic == (HIC)NULL) { + if (This->hic == NULL) { AVIFILE_CloseCompressor(This); return AVIERR_NOCOMPRESSOR; } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/icmstream.c wine-local/dlls/avifil32/icmstream.c --- wine/dlls/avifil32/icmstream.c Tue Oct 22 09:41:01 2002 +++ wine-local/dlls/avifil32/icmstream.c Sun Dec 1 09:34:39 2002 @@ -186,7 +186,7 @@ IAVIStream_Release(This->pStream); This->pStream = NULL; } - if (This->hic != (HIC)NULL) { + if (This->hic != NULL) { if (This->lpbiPrev != NULL) { ICDecompressEnd(This->hic); GlobalFreePtr(This->lpbiPrev); @@ -194,7 +194,7 @@ This->lpPrev = NULL; } ICCompressEnd(This->hic); - This->hic = (HIC)NULL; + This->hic = NULL; } if (This->lpbiCur != NULL) { GlobalFreePtr(This->lpbiCur); @@ -258,7 +258,7 @@ This->sInfo.fccHandler = pco->fccHandler; This->hic = ICOpen(ICTYPE_VIDEO, pco->fccHandler, ICMODE_COMPRESS); - if (This->hic == (HIC)NULL) + if (This->hic == NULL) return AVIERR_NOCOMPRESSOR; /* restore saved state of codec */ @@ -352,7 +352,7 @@ WARN(": FIND_RET flags will be ignored!\n"); if (flags & FIND_KEY) { - if (This->hic == (HIC)NULL) + if (This->hic == NULL) return pos; /* we decompress so every frame is a keyframe */ if (flags & FIND_PREV) { @@ -396,7 +396,7 @@ if (lpbi == NULL) return AVIERR_MEMORY; - if (This->hic == (HIC)NULL) { + if (This->hic == NULL) { LONG size = lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD); if (size > 0) { @@ -471,7 +471,7 @@ if (This->lpbiInput == NULL) { LONG size; - assert(This->hic != (HIC)NULL); + assert(This->hic != NULL); /* get memory for input format */ This->lpbiInput = (LPBITMAPINFOHEADER)GlobalAllocPtr(GHND, formatsize); @@ -610,7 +610,7 @@ } /* compress or decompress? */ - if (This->hic == (HIC)NULL) { + if (This->hic == NULL) { /* decompress */ lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(This->pg, start); if (lpbi == NULL) @@ -899,7 +899,7 @@ if (This->sInfo.fccHandler == comptypeDIB) return AVIERR_OK; - assert(This->hic != (HIC)NULL); + assert(This->hic != NULL); assert(This->lpbiOutput == NULL); /* get input format */ diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/avifil32/wavfile.c wine-local/dlls/avifil32/wavfile.c --- wine/dlls/avifil32/wavfile.c Sat Oct 19 10:12:06 2002 +++ wine-local/dlls/avifil32/wavfile.c Sun Dec 1 09:34:39 2002 @@ -259,9 +259,9 @@ LocalFree((HLOCAL)This->szFileName); This->szFileName = NULL; } - if (This->hmmio != (HMMIO)NULL) { + if (This->hmmio != NULL) { mmioClose(This->hmmio, 0); - This->hmmio = (HMMIO)NULL; + This->hmmio = NULL; } LocalFree((HLOCAL)This); @@ -532,7 +532,7 @@ return AVIERR_BADPARAM; assert(This != NULL); - if (This->hmmio != (HMMIO)NULL) + if (This->hmmio != NULL) return AVIERR_ERROR; /* No reuse of this object for another file! */ /* remeber mode and name */ @@ -546,7 +546,7 @@ /* try to open the file */ This->hmmio = mmioOpenW(This->szFileName, NULL, MMIO_ALLOCBUF | dwMode); - if (This->hmmio == (HMMIO)NULL) + if (This->hmmio == NULL) return AVIERR_FILEOPEN; memset(& This->fInfo, 0, sizeof(This->fInfo)); @@ -1107,9 +1107,9 @@ /* try to open an appropriate audio codec to figure out * data for fact-chunk */ wfx.wFormatTag = WAVE_FORMAT_PCM; - if (acmFormatSuggest((HACMDRIVER)NULL, This->lpFormat, &wfx, + if (acmFormatSuggest(NULL, This->lpFormat, &wfx, sizeof(wfx), ACM_FORMATSUGGESTF_WFORMATTAG)) { - acmStreamOpen(&has, (HACMDRIVER)NULL, This->lpFormat, &wfx, NULL, + acmStreamOpen(&has, NULL, This->lpFormat, &wfx, NULL, 0, 0, ACM_STREAMOPENF_NONREALTIME); acmStreamSize(has, This->ckData.cksize, &dwFactLength, ACM_STREAMSIZEF_SOURCE); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/animate.c wine-local/dlls/comctl32/animate.c --- wine/dlls/comctl32/animate.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/comctl32/animate.c Sun Dec 1 09:34:39 2002 @@ -950,5 +950,5 @@ void ANIMATE_Unregister(void) { - UnregisterClassA(ANIMATE_CLASSA, (HINSTANCE)NULL); + UnregisterClassA(ANIMATE_CLASSA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/comboex.c wine-local/dlls/comctl32/comboex.c --- wine/dlls/comctl32/comboex.c Mon Nov 18 21:31:13 2002 +++ wine-local/dlls/comctl32/comboex.c Sun Dec 1 09:34:39 2002 @@ -2285,5 +2285,5 @@ void COMBOEX_Unregister (void) { - UnregisterClassW (WC_COMBOBOXEXW, (HINSTANCE)NULL); + UnregisterClassW (WC_COMBOBOXEXW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/comctl32undoc.c wine-local/dlls/comctl32/comctl32undoc.c --- wine/dlls/comctl32/comctl32undoc.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/comctl32/comctl32undoc.c Sun Dec 1 09:34:39 2002 @@ -100,7 +100,7 @@ if (!phDpa || !loadProc || !pStream) return E_INVALIDARG; - *phDpa = (HDPA)NULL; + *phDpa = NULL; position.s.LowPart = 0; position.s.HighPart = 0; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/commctrl.c wine-local/dlls/comctl32/commctrl.c --- wine/dlls/comctl32/commctrl.c Sat Nov 9 15:00:11 2002 +++ wine-local/dlls/comctl32/commctrl.c Sun Dec 1 11:43:10 2002 @@ -110,14 +110,14 @@ extern void UPDOWN_Unregister(void); -HANDLE COMCTL32_hHeap = (HANDLE)NULL; +HANDLE COMCTL32_hHeap = NULL; LPSTR COMCTL32_aSubclass = (LPSTR)NULL; HMODULE COMCTL32_hModule = 0; LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); -HBRUSH COMCTL32_hPattern55AABrush = (HANDLE)NULL; +HBRUSH COMCTL32_hPattern55AABrush = NULL; COMCTL32_SysColor comctl32_color; -static HBITMAP COMCTL32_hPattern55AABitmap = (HANDLE)NULL; +static HBITMAP COMCTL32_hPattern55AABitmap = NULL; static const WORD wPattern55AA[] = { @@ -203,9 +203,9 @@ /* delete local pattern brush */ DeleteObject (COMCTL32_hPattern55AABrush); - COMCTL32_hPattern55AABrush = (HANDLE)NULL; + COMCTL32_hPattern55AABrush = NULL; DeleteObject (COMCTL32_hPattern55AABitmap); - COMCTL32_hPattern55AABitmap = (HANDLE)NULL; + COMCTL32_hPattern55AABitmap = NULL; /* delete global subclassing atom */ GlobalDeleteAtom (LOWORD(COMCTL32_aSubclass)); @@ -215,7 +215,7 @@ /* destroy private heap */ HeapDestroy (COMCTL32_hHeap); TRACE("Heap destroyed: %p\n", COMCTL32_hHeap); - COMCTL32_hHeap = (HANDLE)NULL; + COMCTL32_hHeap = NULL; break; } @@ -419,7 +419,7 @@ if (GetWindowLongA (hwndCtrl, GWL_STYLE) & WS_VISIBLE) { TRACE("control id 0x%x\n", *lpRun); GetWindowRect (hwndCtrl, &rcCtrl); - MapWindowPoints ((HWND)0, hwnd, (LPPOINT)&rcCtrl, 2); + MapWindowPoints (0, hwnd, (LPPOINT)&rcCtrl, 2); SubtractRect (lpRect, lpRect, &rcCtrl); } lpRun++; @@ -881,7 +881,7 @@ } nWidth = (INT)lpBitmapInfo->biWidth; nHeight = (INT)lpBitmapInfo->biHeight; - hdcScreen = GetDC ((HWND)0); + hdcScreen = GetDC (0); hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight); if (hbm) { HDC hdcDst = CreateCompatibleDC (hdcScreen); @@ -894,7 +894,7 @@ SelectObject (hdcDst, hbmOld); DeleteDC (hdcDst); } - ReleaseDC ((HWND)0, hdcScreen); + ReleaseDC (0, hdcScreen); GlobalFree ((HGLOBAL)lpBitmapInfo); FreeResource (hglb); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/datetime.c wine-local/dlls/comctl32/datetime.c --- wine/dlls/comctl32/datetime.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/comctl32/datetime.c Sun Dec 1 09:34:39 2002 @@ -1103,7 +1103,7 @@ /* use DrawEdge to adjust the size of rcEdge to get rcDraw */ memcpy((&infoPtr->rcDraw), (&infoPtr->rcClient), sizeof(infoPtr->rcDraw)); - DrawEdge((HDC)NULL, &(infoPtr->rcDraw), EDGE_SUNKEN, BF_RECT | BF_ADJUST); + DrawEdge(NULL, &(infoPtr->rcDraw), EDGE_SUNKEN, BF_RECT | BF_ADJUST); /* set the size of the button that drops the calendar down */ /* FIXME: account for style that allows button on left side */ @@ -1316,5 +1316,5 @@ DATETIME_Unregister (void) { TRACE("\n"); - UnregisterClassA (DATETIMEPICK_CLASSA, (HINSTANCE)NULL); + UnregisterClassA (DATETIMEPICK_CLASSA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/flatsb.c wine-local/dlls/comctl32/flatsb.c --- wine/dlls/comctl32/flatsb.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/comctl32/flatsb.c Sun Dec 1 09:34:39 2002 @@ -251,5 +251,5 @@ VOID FLATSB_Unregister (void) { - UnregisterClassA (FLATSB_CLASSA, (HINSTANCE)NULL); + UnregisterClassA (FLATSB_CLASSA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/header.c wine-local/dlls/comctl32/header.c --- wine/dlls/comctl32/header.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/comctl32/header.c Sun Dec 1 09:34:39 2002 @@ -1799,5 +1799,5 @@ VOID HEADER_Unregister (void) { - UnregisterClassA (WC_HEADERA, (HINSTANCE)NULL); + UnregisterClassA (WC_HEADERA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/hotkey.c wine-local/dlls/comctl32/hotkey.c --- wine/dlls/comctl32/hotkey.c Thu Oct 24 10:19:59 2002 +++ wine-local/dlls/comctl32/hotkey.c Sun Dec 1 11:43:59 2002 @@ -365,7 +365,7 @@ infoPtr->bFocus = TRUE; - CreateCaret (infoPtr->hwndSelf, (HBITMAP)0, 1, infoPtr->nHeight - 2); + CreateCaret (infoPtr->hwndSelf, 0, 1, infoPtr->nHeight - 2); SetCaretPos (infoPtr->CaretPos, 3); @@ -497,5 +497,5 @@ void HOTKEY_Unregister (void) { - UnregisterClassW (HOTKEY_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (HOTKEY_CLASSW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/ipaddress.c wine-local/dlls/comctl32/ipaddress.c --- wine/dlls/comctl32/ipaddress.c Thu Oct 24 10:20:00 2002 +++ wine-local/dlls/comctl32/ipaddress.c Sun Dec 1 09:34:39 2002 @@ -569,5 +569,5 @@ void IPADDRESS_Unregister (void) { - UnregisterClassW (WC_IPADDRESSW, (HINSTANCE)NULL); + UnregisterClassW (WC_IPADDRESSW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/listview.c wine-local/dlls/comctl32/listview.c --- wine/dlls/comctl32/listview.c Fri Nov 29 00:43:17 2002 +++ wine-local/dlls/comctl32/listview.c Sun Dec 1 09:34:39 2002 @@ -7011,7 +7011,7 @@ /* create header */ infoPtr->hwndHeader = CreateWindowW(WC_HEADERW, (LPCWSTR)NULL, WS_CHILD | HDS_HORZ | (DWORD)((LVS_NOSORTHEADER & lpcs->style)?0:HDS_BUTTONS), - 0, 0, 0, 0, hwnd, (HMENU)0, + 0, 0, 0, 0, hwnd, 0, lpcs->hInstance, NULL); /* set header unicode format */ @@ -8783,7 +8783,7 @@ */ void LISTVIEW_Unregister(void) { - UnregisterClassW(WC_LISTVIEWW, (HINSTANCE)NULL); + UnregisterClassW(WC_LISTVIEWW, NULL); } /*** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/monthcal.c wine-local/dlls/comctl32/monthcal.c --- wine/dlls/comctl32/monthcal.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/monthcal.c Sun Dec 1 09:34:39 2002 @@ -1451,8 +1451,8 @@ infoPtr->titleyear.right-infoPtr->titleyear.left, infoPtr->textHeight, hwnd, - (HMENU)NULL, - (HINSTANCE)NULL, + NULL, + NULL, NULL); infoPtr->hWndYearUpDown=CreateWindowExA(0, UPDOWN_CLASSA, @@ -1462,8 +1462,8 @@ 20, infoPtr->textHeight, hwnd, - (HMENU)NULL, - (HINSTANCE)NULL, + NULL, + NULL, NULL); SendMessageA( infoPtr->hWndYearUpDown, UDM_SETRANGE, (WPARAM) 0, MAKELONG (9999, 1753)); SendMessageA( infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, (LPARAM)0 ); @@ -2062,5 +2062,5 @@ void MONTHCAL_Unregister(void) { - UnregisterClassA(MONTHCAL_CLASSA, (HINSTANCE)NULL); + UnregisterClassA(MONTHCAL_CLASSA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/nativefont.c wine-local/dlls/comctl32/nativefont.c --- wine/dlls/comctl32/nativefont.c Sat Jun 1 09:25:44 2002 +++ wine-local/dlls/comctl32/nativefont.c Sun Dec 1 09:34:39 2002 @@ -131,6 +131,6 @@ VOID NATIVEFONT_Unregister (void) { - UnregisterClassA (WC_NATIVEFONTCTLA, (HINSTANCE)NULL); + UnregisterClassA (WC_NATIVEFONTCTLA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/pager.c wine-local/dlls/comctl32/pager.c --- wine/dlls/comctl32/pager.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/pager.c Sun Dec 1 09:34:39 2002 @@ -836,7 +836,7 @@ SetWindowLongA (hwnd, 0, (DWORD)infoPtr); /* set default settings */ - infoPtr->hwndChild = (HWND)NULL; + infoPtr->hwndChild = NULL; infoPtr->bNoResize = dwStyle & CCS_NORESIZE; infoPtr->clrBk = GetSysColor(COLOR_BTNFACE); infoPtr->nBorder = 0; @@ -1603,5 +1603,5 @@ VOID PAGER_Unregister (void) { - UnregisterClassA (WC_PAGESCROLLERA, (HINSTANCE)NULL); + UnregisterClassA (WC_PAGESCROLLERA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/progress.c wine-local/dlls/comctl32/progress.c --- wine/dlls/comctl32/progress.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/progress.c Sun Dec 1 09:34:39 2002 @@ -430,5 +430,5 @@ */ VOID PROGRESS_Unregister (void) { - UnregisterClassW (PROGRESS_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (PROGRESS_CLASSW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/rebar.c wine-local/dlls/comctl32/rebar.c --- wine/dlls/comctl32/rebar.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/rebar.c Sun Dec 1 09:34:39 2002 @@ -4509,5 +4509,5 @@ VOID REBAR_Unregister (void) { - UnregisterClassA (REBARCLASSNAMEA, (HINSTANCE)NULL); + UnregisterClassA (REBARCLASSNAMEA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/status.c wine-local/dlls/comctl32/status.c --- wine/dlls/comctl32/status.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/status.c Sun Dec 1 09:34:39 2002 @@ -1280,5 +1280,5 @@ void STATUS_Unregister (void) { - UnregisterClassW (STATUSCLASSNAMEW, (HINSTANCE)NULL); + UnregisterClassW (STATUSCLASSNAMEW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/tab.c wine-local/dlls/comctl32/tab.c --- wine/dlls/comctl32/tab.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/tab.c Sun Dec 1 09:34:39 2002 @@ -986,14 +986,14 @@ controlPos.right - controlPos.left, controlPos.bottom - controlPos.top, hwnd, - (HMENU)NULL, - (HINSTANCE)NULL, + NULL, + NULL, NULL); } else { SetWindowPos(infoPtr->hwndUpDown, - (HWND)NULL, + NULL, controlPos.left, controlPos.top, controlPos.right - controlPos.left, controlPos.bottom - controlPos.top, @@ -3196,7 +3196,7 @@ wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TAB_INFO *); wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); - wndClass.hbrBackground = (HBRUSH)NULL; + wndClass.hbrBackground = NULL; wndClass.lpszClassName = WC_TABCONTROLA; RegisterClassA (&wndClass); @@ -3206,5 +3206,5 @@ VOID TAB_Unregister (void) { - UnregisterClassA (WC_TABCONTROLA, (HINSTANCE)NULL); + UnregisterClassA (WC_TABCONTROLA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/toolbar.c wine-local/dlls/comctl32/toolbar.c --- wine/dlls/comctl32/toolbar.c Mon Nov 18 21:31:13 2002 +++ wine-local/dlls/comctl32/toolbar.c Sun Dec 1 11:44:45 2002 @@ -2225,7 +2225,7 @@ nCount = ImageList_GetImageCount(himlDef); /* Add bitmaps to the default image list */ - if (lpAddBmp->hInst == (HINSTANCE)0) + if (lpAddBmp->hInst == 0) { nIndex = ImageList_AddMasked (himlDef, (HBITMAP)lpAddBmp->nID, @@ -5959,7 +5959,7 @@ VOID TOOLBAR_Unregister (void) { - UnregisterClassA (TOOLBARCLASSNAMEA, (HINSTANCE)NULL); + UnregisterClassA (TOOLBARCLASSNAMEA, NULL); } static HIMAGELIST TOOLBAR_InsertImageList(PIMLENTRY **pies, INT *cies, HIMAGELIST himl, INT id) diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/tooltips.c wine-local/dlls/comctl32/tooltips.c --- wine/dlls/comctl32/tooltips.c Sat Nov 9 15:00:11 2002 +++ wine-local/dlls/comctl32/tooltips.c Sun Dec 1 11:46:11 2002 @@ -324,7 +324,7 @@ GetWindowRect ((HWND)toolPtr->uId, &rc); else { rc = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2); + MapWindowPoints (toolPtr->hwnd, 0, (LPPOINT)&rc, 2); } rect.left = (rc.left + rc.right - size.cx) / 2; rect.top = rc.bottom + 2; @@ -353,7 +353,7 @@ GetWindowRect ((HWND)toolPtr->uId, &rc); else { rc = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2); + MapWindowPoints (toolPtr->hwnd, 0, (LPPOINT)&rc, 2); } rect.bottom = rc.top - 2; rect.top = rect.bottom - size.cy; @@ -456,7 +456,7 @@ GetWindowRect ((HWND)toolPtr->uId, &rcTool); else { rcTool = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rcTool, 2); + MapWindowPoints (toolPtr->hwnd, 0, (LPPOINT)&rcTool, 2); } GetCursorPos ((LPPOINT)&rect); @@ -2444,5 +2444,5 @@ VOID TOOLTIPS_Unregister (void) { - UnregisterClassA (TOOLTIPS_CLASSA, (HINSTANCE)NULL); + UnregisterClassA (TOOLTIPS_CLASSA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/trackbar.c wine-local/dlls/comctl32/trackbar.c --- wine/dlls/comctl32/trackbar.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/trackbar.c Sun Dec 1 09:34:40 2002 @@ -1737,5 +1737,5 @@ void TRACKBAR_Unregister (void) { - UnregisterClassW (TRACKBAR_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (TRACKBAR_CLASSW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/treeview.c wine-local/dlls/comctl32/treeview.c --- wine/dlls/comctl32/treeview.c Fri Nov 29 00:43:17 2002 +++ wine-local/dlls/comctl32/treeview.c Sun Dec 1 09:34:40 2002 @@ -1165,7 +1165,7 @@ if (!TREEVIEW_ValidItem(infoPtr, parentItem)) { WARN("invalid parent %p\n", parentItem); - return (LRESULT)(HTREEITEM)NULL; + return (LRESULT)NULL; } } @@ -1196,13 +1196,13 @@ newItem = TREEVIEW_AllocateItem(infoPtr); if (newItem == NULL) - return (LRESULT)(HTREEITEM)NULL; + return (LRESULT)NULL; newItem->parent = parentItem; newItem->iIntegral = 1; if (!TREEVIEW_DoSetItem(infoPtr, newItem, tvItem)) - return (LRESULT)(HTREEITEM)NULL; + return (LRESULT)NULL; /* After this point, nothing can fail. (Except for TVI_SORT.) */ @@ -3344,14 +3344,14 @@ if (status) { lpht->flags = status; - return (LRESULT)(HTREEITEM)NULL; + return (LRESULT)NULL; } wineItem = TREEVIEW_HitTestPoint(infoPtr, lpht->pt); if (!wineItem) { lpht->flags = TVHT_NOWHERE; - return (LRESULT)(HTREEITEM)NULL; + return (LRESULT)NULL; } if (x >= wineItem->textOffset + wineItem->textWidth) @@ -3541,7 +3541,7 @@ TRACE("%x %p\n", (unsigned)hwnd, hItem); if (!TREEVIEW_ValidItem(infoPtr, editItem)) - return (HWND)NULL; + return NULL; if (infoPtr->hwndEdit) return infoPtr->hwndEdit; @@ -3608,7 +3608,7 @@ { DestroyWindow(hwndEdit); infoPtr->hwndEdit = 0; - return (HWND)NULL; + return NULL; } infoPtr->selectedItem = hItem; @@ -5412,7 +5412,7 @@ VOID TREEVIEW_Unregister(void) { - UnregisterClassA(WC_TREEVIEWA, (HINSTANCE) NULL); + UnregisterClassA(WC_TREEVIEWA, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/comctl32/updown.c wine-local/dlls/comctl32/updown.c --- wine/dlls/comctl32/updown.c Thu Oct 24 10:20:01 2002 +++ wine-local/dlls/comctl32/updown.c Sun Dec 1 09:34:40 2002 @@ -966,5 +966,5 @@ */ void UPDOWN_Unregister (void) { - UnregisterClassW (UPDOWN_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (UPDOWN_CLASSW, NULL); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/commdlg/filedlg95.c wine-local/dlls/commdlg/filedlg95.c --- wine/dlls/commdlg/filedlg95.c Sun Nov 24 23:03:33 2002 +++ wine-local/dlls/commdlg/filedlg95.c Sun Dec 1 09:34:40 2002 @@ -396,7 +396,7 @@ /* Initialize the dialog property */ fodInfos.DlgInfos.dwDlgProp = 0; - fodInfos.DlgInfos.hwndCustomDlg = (HWND)NULL; + fodInfos.DlgInfos.hwndCustomDlg = NULL; switch(iDlgType) { @@ -551,7 +551,7 @@ } else { - if( (GetWindow(hwndChildDlg,GW_CHILD)) == (HWND) NULL) return; + if( (GetWindow(hwndChildDlg,GW_CHILD)) == NULL) return; SetRectEmpty(&rectTemp); ptParentClient.x = max((rectParent.right-rectParent.left),(rectChild.right-rectChild.left)); @@ -608,7 +608,7 @@ rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, SWP_NOSIZE | SWP_NOZORDER ); } - } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); + } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != NULL); } hwndChild = GetWindow(hwndParentDlg,GW_CHILD); @@ -636,7 +636,7 @@ rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, SWP_NOSIZE |SWP_NOZORDER ); } - } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != (HWND)NULL); + } while ((hwndChild=GetWindow( hwndChild, GW_HWNDNEXT )) != NULL); } } } @@ -699,7 +699,7 @@ if( !(template = LockResource( fodInfos->ofnInfos->hInstance))) { COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); - return (HWND)NULL; + return NULL; } } else @@ -718,13 +718,13 @@ if (!hRes) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); - return (HWND)NULL; + return NULL; } if (!(hDlgTmpl = LoadResource( hinst, hRes )) || !(template = LockResource( hDlgTmpl ))) { COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); - return (HWND)NULL; + return NULL; } } @@ -756,7 +756,7 @@ hwnd, FileOpenDlgProcUserTemplate, (LPARAM)fodInfos); return hChildDlg; } - return (HWND)NULL; + return NULL; } /*********************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/ddraw/dsurface/dib.c wine-local/dlls/ddraw/dsurface/dib.c --- wine/dlls/ddraw/dsurface/dib.c Sun Nov 24 23:03:33 2002 +++ wine-local/dlls/ddraw/dsurface/dib.c Sun Dec 1 09:53:38 2002 @@ -218,7 +218,7 @@ This->get_dc = DIB_DirectDrawSurface_get_dc; This->release_dc = DIB_DirectDrawSurface_release_dc; - This->hDC = (HDC)NULL; + This->hDC = NULL; This->set_palette = DIB_DirectDrawSurface_set_palette; This->update_palette = DIB_DirectDrawSurface_update_palette; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/imagehlp/access.c wine-local/dlls/imagehlp/access.c --- wine/dlls/imagehlp/access.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/imagehlp/access.c Sun Dec 1 09:50:31 2002 @@ -208,9 +208,9 @@ BOOL bDotDll, BOOL bReadOnly) { CHAR szFileName[MAX_PATH]; - HANDLE hFile = (HANDLE) NULL; - HANDLE hFileMapping = (HANDLE) NULL; - HMODULE hModule = (HMODULE) NULL; + HANDLE hFile = NULL; + HANDLE hFileMapping = NULL; + HMODULE hModule = NULL; PIMAGE_NT_HEADERS pNtHeader = NULL; /* PathCombine(&szFileName, pszDllPath, pszImageName); */ @@ -219,7 +219,7 @@ /* FIXME: Check if the file already loaded (use IMAGEHLP_pFirstLoadedImage) */ if(!(hFile = CreateFileA( szFileName, GENERIC_READ, 1, /* FIXME: FILE_SHARE_READ not defined */ - NULL, OPEN_EXISTING, 0, (HANDLE) NULL))) + NULL, OPEN_EXISTING, 0, NULL))) { SetLastError(ERROR_FILE_NOT_FOUND); goto Error; @@ -234,7 +234,7 @@ goto Error; } CloseHandle(hFile); - hFile = (HANDLE) NULL; + hFile = NULL; if(!(hModule = (HMODULE) MapViewOfFile( hFileMapping, FILE_MAP_READ, 0, 0, 0))) @@ -246,7 +246,7 @@ } CloseHandle(hFileMapping); - hFileMapping=(HANDLE) NULL; + hFileMapping = NULL; pLoadedImage = (PLOADED_IMAGE) HeapAlloc( IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE) diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/imagehlp/debug.c wine-local/dlls/imagehlp/debug.c --- wine/dlls/imagehlp/debug.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/imagehlp/debug.c Sun Dec 1 09:50:43 2002 @@ -37,7 +37,7 @@ debugstr_a(DebugFilePath) ); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HANDLE) NULL; + return NULL; } /*********************************************************************** @@ -51,7 +51,7 @@ debugstr_a(ImageFilePath) ); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HANDLE) NULL; + return NULL; } /*********************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/imagehlp/imagehlp_main.c wine-local/dlls/imagehlp/imagehlp_main.c --- wine/dlls/imagehlp/imagehlp_main.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/imagehlp/imagehlp_main.c Sun Dec 1 09:51:04 2002 @@ -28,7 +28,7 @@ /**********************************************************************/ -HANDLE IMAGEHLP_hHeap = (HANDLE) NULL; +HANDLE IMAGEHLP_hHeap = NULL; static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 }; @@ -44,7 +44,7 @@ break; case DLL_PROCESS_DETACH: HeapDestroy(IMAGEHLP_hHeap); - IMAGEHLP_hHeap = (HANDLE) NULL; + IMAGEHLP_hHeap = NULL; break; case DLL_THREAD_ATTACH: break; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/imm32/imm.c wine-local/dlls/imm32/imm.c --- wine/dlls/imm32/imm.c Thu Oct 24 10:20:02 2002 +++ wine-local/dlls/imm32/imm.c Sun Dec 1 09:34:40 2002 @@ -35,7 +35,7 @@ { FIXME("(%p, %p): stub\n",hWnd,hIMC); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HIMC)NULL; + return NULL; } /*********************************************************************** @@ -71,7 +71,7 @@ { FIXME("(): stub\n"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HIMC)NULL; + return NULL; } /*********************************************************************** @@ -291,7 +291,7 @@ { FIXME("(%p): stub\n", hWnd); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HIMC)NULL; + return NULL; } /*********************************************************************** @@ -344,7 +344,7 @@ { FIXME("(%p): stub\n", hWnd); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HWND)NULL; + return NULL; } /*********************************************************************** @@ -506,7 +506,7 @@ debugstr_a(lpszIMEFileName), debugstr_a(lpszLayoutText) ); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HKL)NULL; + return NULL; } /*********************************************************************** @@ -519,7 +519,7 @@ debugstr_w(lpszIMEFileName), debugstr_w(lpszLayoutText) ); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HKL)NULL; + return NULL; } /*********************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/kernel/tests/alloc.c wine-local/dlls/kernel/tests/alloc.c --- wine/dlls/kernel/tests/alloc.c Sat Nov 9 15:00:17 2002 +++ wine-local/dlls/kernel/tests/alloc.c Sun Dec 1 11:25:51 2002 @@ -195,14 +195,14 @@ SetLastError(NO_ERROR); /* Check that a normal alloc works */ mem1=GlobalAlloc((UINT)NULL,memchunk); - ok(mem1!=(HGLOBAL)NULL,"GlobalAlloc failed"); + ok(mem1!=NULL,"GlobalAlloc failed"); if(mem1) { ok(GlobalSize(mem1)>=memchunk, "GlobalAlloc should return a big enough memory block"); } /* Check that a 'zeroing' alloc works */ mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk); - ok(mem2!=(HGLOBAL)NULL,"GlobalAlloc failed"); + ok(mem2!=NULL,"GlobalAlloc failed"); if(mem2) { ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block"); mem2ptr=(UCHAR *)GlobalLock(mem2); @@ -220,8 +220,8 @@ /* Check that GlobalReAlloc works */ /* Check that we can change GMEM_FIXED to GMEM_MOVEABLE */ mem2a=GlobalReAlloc(mem2,0,GMEM_MODIFY | GMEM_MOVEABLE); - ok(mem2a!=(HGLOBAL)NULL,"GlobalReAlloc failed to convert FIXED to MOVEABLE"); - if(mem2a!=(HGLOBAL)NULL) { + ok(mem2a!=NULL,"GlobalReAlloc failed to convert FIXED to MOVEABLE"); + if(mem2a!=NULL) { mem2=mem2a; } mem2ptr=GlobalLock(mem2a); @@ -230,7 +230,7 @@ /* Check that ReAllocing memory works as expected */ mem2a=GlobalReAlloc(mem2,2*memchunk,GMEM_MOVEABLE | GMEM_ZEROINIT); - ok(mem2a!=(HGLOBAL)NULL,"GlobalReAlloc failed"); + ok(mem2a!=NULL,"GlobalReAlloc failed"); if(mem2a) { ok(GlobalSize(mem2a)>=2*memchunk,"GlobalReAlloc failed"); mem2ptr=(UCHAR *)GlobalLock(mem2a); @@ -252,22 +252,22 @@ #if DISCARD_DEFINED /* Wine doesn't include the GlobalDiscard function */ mem2b=GlobalDiscard(mem2a); - ok(mem2b==(HGLOBAL)NULL,"Discarded memory we shouldn't have"); + ok(mem2b==NULL,"Discarded memory we shouldn't have"); #else /* This is functionally equivalent to the above */ mem2b=GlobalReAlloc(mem2a,0,GMEM_MOVEABLE); - ok(mem2b==(HGLOBAL)NULL,"Discarded memory we shouldn't have"); + ok(mem2b==NULL,"Discarded memory we shouldn't have"); #endif ok(!GlobalUnlock(mem2a) && GetLastError()==NO_ERROR,"GlobalUnlock Failed."); } } if(mem1) { - ok(GlobalFree(mem1)==(HGLOBAL)NULL,"GlobalFree failed"); + ok(GlobalFree(mem1)==NULL,"GlobalFree failed"); } if(mem2a) { - ok(GlobalFree(mem2a)==(HGLOBAL)NULL,"GlobalFree failed"); + ok(GlobalFree(mem2a)==NULL,"GlobalFree failed"); } else { - ok(GlobalFree(mem2)==(HGLOBAL)NULL,"GlobalFree failed"); + ok(GlobalFree(mem2)==NULL,"GlobalFree failed"); } } @@ -293,14 +293,14 @@ /* Check that a normal alloc works */ mem1=LocalAlloc((UINT)NULL,memchunk); - ok(mem1!=(HLOCAL)NULL,"LocalAlloc failed"); + ok(mem1!=NULL,"LocalAlloc failed"); if(mem1) { ok(LocalSize(mem1)>=memchunk, "LocalAlloc should return a big enough memory block"); } /* Check that a 'zeroing' alloc works */ mem2=LocalAlloc(LMEM_ZEROINIT,memchunk); - ok(mem2!=(HLOCAL)NULL,"LocalAlloc failed"); + ok(mem2!=NULL,"LocalAlloc failed"); if(mem2) { ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block"); mem2ptr=(UCHAR *)LocalLock(mem2); @@ -322,11 +322,11 @@ /* Reallocate mem2 as moveable memory */ mem2a=LocalFree(mem2); mem2=LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT,memchunk); - ok(mem2a==(HLOCAL)NULL && mem2!=(HLOCAL)NULL, "LocalAlloc failed to create moveable memory"); + ok(mem2a==NULL && mem2!=NULL, "LocalAlloc failed to create moveable memory"); /* Check that ReAllocing memory works as expected */ mem2a=LocalReAlloc(mem2,2*memchunk,LMEM_MOVEABLE | LMEM_ZEROINIT); - ok(mem2a!=(HLOCAL)NULL,"LocalReAlloc failed"); + ok(mem2a!=NULL,"LocalReAlloc failed"); if(mem2a) { ok(LocalSize(mem2a)>=2*memchunk,"LocalReAlloc failed"); mem2ptr=(UCHAR *)LocalLock(mem2a); @@ -346,23 +346,23 @@ #if DISCARD_DEFINED /* Wine doesn't include the LocalDiscard function */ mem2b=LocalDiscard(mem2a); - ok(mem2b==(HLOCAL)NULL,"Discarded memory we shouldn't have"); + ok(mem2b==NULL,"Discarded memory we shouldn't have"); #else /* This is functionally equivalent to the above */ mem2b=LocalReAlloc(mem2a,0,GMEM_MOVEABLE); - ok(mem2b==(HLOCAL)NULL,"Discarded memory we shouldn't have"); + ok(mem2b==NULL,"Discarded memory we shouldn't have"); #endif SetLastError(NO_ERROR); ok(!LocalUnlock(mem2a) && GetLastError()==NO_ERROR, "LocalUnlock Failed."); } } if(mem1) { - ok(LocalFree(mem1)==(HLOCAL)NULL,"LocalFree failed"); + ok(LocalFree(mem1)==NULL,"LocalFree failed"); } if(mem2a) { - ok(LocalFree(mem2a)==(HLOCAL)NULL,"LocalFree failed"); + ok(LocalFree(mem2a)==NULL,"LocalFree failed"); } else { - ok(LocalFree(mem2)==(HLOCAL)NULL,"LocalFree failed"); + ok(LocalFree(mem2)==NULL,"LocalFree failed"); } } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/kernel/tests/path.c wine-local/dlls/kernel/tests/path.c --- wine/dlls/kernel/tests/path.c Mon Sep 16 04:12:26 2002 +++ wine-local/dlls/kernel/tests/path.c Sun Dec 1 11:16:06 2002 @@ -391,22 +391,22 @@ ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed"); sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,SHORTFILE); hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,(HANDLE)NULL); + CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed"); ok(CloseHandle(hndl),"CloseHandle failed"); sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,LONGFILE); hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,(HANDLE)NULL); + CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed"); ok(CloseHandle(hndl),"CloseHandle failed"); sprintf(tmpstr,"%s\\%s\\%s",newdir,LONGDIR,SHORTFILE); hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,(HANDLE)NULL); + CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed"); ok(CloseHandle(hndl),"CloseHandle failed"); sprintf(tmpstr,"%s\\%s\\%s",newdir,LONGDIR,LONGFILE); hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,(HANDLE)NULL); + CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed"); ok(CloseHandle(hndl),"CloseHandle failed"); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/filter.c wine-local/dlls/msacm/filter.c --- wine/dlls/msacm/filter.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/msacm/filter.c Sun Dec 1 09:49:23 2002 @@ -100,7 +100,7 @@ mmr = MMSYSERR_INVALPARAM; break; } - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { PWINE_ACMDRIVERID padid; mmr = ACMERR_NOTPOSSIBLE; @@ -298,7 +298,7 @@ switch (fdwDetails) { case ACM_FILTERTAGDETAILSF_FILTERTAG: - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { mmr = ACMERR_NOTPOSSIBLE; for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) { /* should check for codec only */ @@ -320,7 +320,7 @@ break; case ACM_FILTERTAGDETAILSF_LARGESTSIZE: - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { ACMFILTERTAGDETAILSW tmp; DWORD ft = paftd->dwFilterTag; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/format.c wine-local/dlls/msacm/format.c --- wine/dlls/msacm/format.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/msacm/format.c Sun Dec 1 09:47:45 2002 @@ -143,7 +143,7 @@ affd.hWnd = hWnd; affd.mode = WINE_ACMFF_TAG; - acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0); return TRUE; } @@ -166,7 +166,7 @@ CB_GETCURSEL, 0, 0), (DWORD)affd.szFormatTag); - acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0); return TRUE; } @@ -189,7 +189,7 @@ CB_GETCURSEL, 0, 0), (DWORD)affd.szFormatTag); - acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); return affd.ret; } @@ -332,7 +332,7 @@ mmr = MMSYSERR_INVALPARAM; break; } - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { PWINE_ACMDRIVERID padid; mmr = ACMERR_NOTPOSSIBLE; @@ -552,7 +552,7 @@ adfg.pwfxDst = pwfxDst; adfg.cbwfxDst = cbwfxDst; - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { PWINE_ACMDRIVERID padid; /* MS doc says: ACM finds the best suggestion. @@ -621,7 +621,7 @@ switch (fdwDetails) { case ACM_FORMATTAGDETAILSF_FORMATTAG: - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) { /* should check for codec only */ if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) && @@ -641,7 +641,7 @@ break; case ACM_FORMATTAGDETAILSF_INDEX: - if (had != (HACMDRIVER)NULL) { + if (had != NULL) { PWINE_ACMDRIVER pad = MSACM_GetDriver(had); if (pad && paftd->dwFormatTagIndex < pad->obj.pACMDriverID->cFormatTags) @@ -650,7 +650,7 @@ break; case ACM_FORMATTAGDETAILSF_LARGESTSIZE: - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { ACMFORMATTAGDETAILSW tmp; DWORD ft = paftd->dwFormatTag; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/imaadp32/imaadp32.c wine-local/dlls/msacm/imaadp32/imaadp32.c --- wine/dlls/msacm/imaadp32/imaadp32.c Sat Oct 19 16:54:05 2002 +++ wine-local/dlls/msacm/imaadp32/imaadp32.c Sun Dec 1 09:48:45 2002 @@ -476,7 +476,7 @@ add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 2; /* PCM, IMA ADPCM */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = 0; MultiByteToWideChar( CP_ACP, 0, "WINE-ADPCM", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine IMA ADPCM converter", -1, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/internal.c wine-local/dlls/msacm/internal.c --- wine/dlls/msacm/internal.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/msacm/internal.c Sun Dec 1 09:46:56 2002 @@ -39,7 +39,7 @@ /**********************************************************************/ -HANDLE MSACM_hHeap = (HANDLE) NULL; +HANDLE MSACM_hHeap = NULL; PWINE_ACMDRIVERID MSACM_pFirstACMDriverID = NULL; PWINE_ACMDRIVERID MSACM_pLastACMDriverID = NULL; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/msacm32_main.c wine-local/dlls/msacm/msacm32_main.c --- wine/dlls/msacm/msacm32_main.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/msacm/msacm32_main.c Sun Dec 1 09:46:05 2002 @@ -51,8 +51,8 @@ case DLL_PROCESS_DETACH: MSACM_UnregisterAllDrivers(); HeapDestroy(MSACM_hHeap); - MSACM_hHeap = (HANDLE)NULL; - MSACM_hInstance32 = (HINSTANCE)NULL; + MSACM_hHeap = NULL; + MSACM_hInstance32 = NULL; break; case DLL_THREAD_ATTACH: break; @@ -176,7 +176,7 @@ break; case ACM_METRIC_MAX_SIZE_FORMAT: - if (hao == (HACMOBJ)NULL) { + if (hao == NULL) { for (padid = MSACM_pFirstACMDriverID; padid; padid = padid->pNextACMDriverID) { if (!(padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED)) { for (i = 0; i < padid->cFormatTags; i++) { diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/msadp32/msadp32.c wine-local/dlls/msacm/msadp32/msadp32.c --- wine/dlls/msacm/msadp32/msadp32.c Tue Jul 2 12:09:39 2002 +++ wine-local/dlls/msacm/msadp32/msadp32.c Sun Dec 1 09:49:04 2002 @@ -322,7 +322,7 @@ add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 2; /* PCM, MS ADPCM */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = 0; MultiByteToWideChar( CP_ACP, 0, "WINE-MS ADPCM", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine MS ADPCM converter", -1, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/msg711/msg711.c wine-local/dlls/msacm/msg711/msg711.c --- wine/dlls/msacm/msg711/msg711.c Sat Jun 1 09:25:49 2002 +++ wine-local/dlls/msacm/msg711/msg711.c Sun Dec 1 09:48:04 2002 @@ -659,7 +659,7 @@ add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 3; /* PCM, G711 A-LAW & MU-LAW */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = 0; MultiByteToWideChar( CP_ACP, 0, "WINE-G711", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine G711 converter", -1, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/pcmconverter.c wine-local/dlls/msacm/pcmconverter.c --- wine/dlls/msacm/pcmconverter.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/msacm/pcmconverter.c Sun Dec 1 09:46:15 2002 @@ -719,7 +719,7 @@ add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CONVERTER; add->cFormatTags = 1; add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = 0; MultiByteToWideChar( CP_ACP, 0, "WINE-PCM", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine PCM converter", -1, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/stream.c wine-local/dlls/msacm/stream.c --- wine/dlls/msacm/stream.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/msacm/stream.c Sun Dec 1 09:47:05 2002 @@ -237,7 +237,7 @@ } errCleanUp: if (phas) - *phas = (HACMSTREAM)0; + *phas = 0; HeapFree(MSACM_hHeap, 0, was); TRACE("=> (%d)\n", ret); return ret; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msacm/winemp3/mpegl3.c wine-local/dlls/msacm/winemp3/mpegl3.c --- wine/dlls/msacm/winemp3/mpegl3.c Sat Aug 31 18:37:45 2002 +++ wine-local/dlls/msacm/winemp3/mpegl3.c Sun Dec 1 09:48:27 2002 @@ -177,7 +177,7 @@ add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 2; /* PCM, MPEG3 */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = 0; MultiByteToWideChar( CP_ACP, 0, "WINE-MPEG3", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine MPEG3 decoder", -1, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msvcrt/console.c wine-local/dlls/msvcrt/console.c --- wine/dlls/msvcrt/console.c Mon Aug 26 21:50:33 2002 +++ wine-local/dlls/msvcrt/console.c Sun Dec 1 11:06:10 2002 @@ -51,11 +51,11 @@ /* FIXME: Should be initialised with: * CreateFileA("CONIN$", GENERIC_READ, FILE_SHARE_READ, - * NULL, OPEN_EXISTING, 0, (HANDLE)NULL); + * NULL, OPEN_EXISTING, 0, NULL); */ MSVCRT_console_out= CreateFileA("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, (HANDLE)NULL); + NULL, OPEN_EXISTING, 0, NULL); if ((MSVCRT_console_in == INVALID_HANDLE_VALUE) || (MSVCRT_console_out== INVALID_HANDLE_VALUE)) diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msvideo/mciwnd.c wine-local/dlls/msvideo/mciwnd.c --- wine/dlls/msvideo/mciwnd.c Sat Nov 9 15:00:18 2002 +++ wine-local/dlls/msvideo/mciwnd.c Sun Dec 1 09:44:22 2002 @@ -101,7 +101,7 @@ if (CreateWindowExA(0, "MCIWndClass", NULL, wndStyle, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwndParent, (HMENU)0, hInstance, mwi)) + hwndParent, 0, hInstance, mwi)) return mwi->hWnd; if(mwi->lpName) HeapFree(GetProcessHeap(), 0, mwi->lpName); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/msvideo/msvideo_main.c wine-local/dlls/msvideo/msvideo_main.c --- wine/dlls/msvideo/msvideo_main.c Fri Nov 29 00:43:18 2002 +++ wine-local/dlls/msvideo/msvideo_main.c Sun Dec 1 09:44:01 2002 @@ -687,7 +687,7 @@ FIXME("(%p,%08x,%p,%p,%p,%ld,%p)\n", hic, uiFlags, lpbiIn, lpBits, lpbiOut, lQuality, plSize); - return (HANDLE)NULL; + return NULL; } /*********************************************************************** @@ -698,7 +698,7 @@ HIC hic, UINT uiFlags, LPBITMAPINFO lpbiIn, LPVOID lpBits, LPBITMAPINFO lpbiOut) { - HGLOBAL hMem = (HGLOBAL)NULL; + HGLOBAL hMem = NULL; BYTE* pMem = NULL; BOOL bReleaseIC = FALSE; BYTE* pHdr = NULL; @@ -710,10 +710,10 @@ TRACE("(%p,%08x,%p,%p,%p)\n", hic, uiFlags, lpbiIn, lpBits, lpbiOut); - if ( hic == (HIC)NULL ) + if ( hic == NULL ) { hic = ICDecompressOpen( mmioFOURCC('V','I','D','C'), 0, &lpbiIn->bmiHeader, (lpbiOut != NULL) ? &lpbiOut->bmiHeader : NULL ); - if ( hic == (HIC)NULL ) + if ( hic == NULL ) { WARN("no handler\n" ); goto err; @@ -791,7 +791,7 @@ TRACE( "cbHdr %ld, biSizeImage %ld\n", cbHdr, biSizeImage ); hMem = GlobalAlloc( GMEM_MOVEABLE|GMEM_ZEROINIT, cbHdr + biSizeImage ); - if ( hMem == (HGLOBAL)NULL ) + if ( hMem == NULL ) { WARN( "out of memory\n" ); goto err; @@ -815,9 +815,9 @@ HeapFree(GetProcessHeap(),0,pHdr); if ( pMem != NULL ) GlobalUnlock( hMem ); - if ( !bSucceeded && hMem != (HGLOBAL)NULL ) + if ( !bSucceeded && hMem != NULL ) { - GlobalFree(hMem); hMem = (HGLOBAL)NULL; + GlobalFree(hMem); hMem = NULL; } return (HANDLE)hMem; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/ole32/clipboard.c wine-local/dlls/ole32/clipboard.c --- wine/dlls/ole32/clipboard.c Sun Nov 24 23:03:35 2002 +++ wine-local/dlls/ole32/clipboard.c Sun Dec 1 09:44:43 2002 @@ -396,7 +396,7 @@ GetClipboardFormatNameA(rgelt.cfFormat, szFmtName, sizeof(szFmtName)-1) ? szFmtName : ""); - SetClipboardData( rgelt.cfFormat, (HANDLE)NULL); + SetClipboardData( rgelt.cfFormat, NULL); } } IEnumFORMATETC_Release(penumFormatetc); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/ole32/ole2stubs.c wine-local/dlls/ole32/ole2stubs.c --- wine/dlls/ole32/ole2stubs.c Sun Nov 24 23:03:35 2002 +++ wine-local/dlls/ole32/ole2stubs.c Sun Dec 1 09:44:54 2002 @@ -153,7 +153,7 @@ HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel) { FIXME("(%p,%p,%x), stub!\n", rclsid, lpszLabel, fUseTypeAsLabel); - return (HGLOBAL)NULL; + return NULL; } /****************************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/richedit/richedit.c wine-local/dlls/richedit/richedit.c --- wine/dlls/richedit/richedit.c Sat Nov 9 15:00:19 2002 +++ wine-local/dlls/richedit/richedit.c Sun Dec 1 11:03:55 2002 @@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit); -HANDLE RICHED32_hHeap = (HANDLE)NULL; +HANDLE RICHED32_hHeap = NULL; /* LPSTR RICHED32_aSubclass = (LPSTR)NULL; */ #define DPRINTF_EDIT_MSG32(str) \ @@ -81,7 +81,7 @@ /* unregister all common control classes */ RICHED32_Unregister (); HeapDestroy (RICHED32_hHeap); - RICHED32_hHeap = (HANDLE)NULL; + RICHED32_hHeap = NULL; break; } return TRUE; @@ -796,7 +796,7 @@ { TRACE("\n"); - UnregisterClassA(RICHEDIT_CLASS10A, (HINSTANCE)NULL); + UnregisterClassA(RICHEDIT_CLASS10A, NULL); } INT RICHEDIT_GetTextRange(HWND hwnd,TEXTRANGEA *tr) diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/setupapi/virtcopy.c wine-local/dlls/setupapi/virtcopy.c --- wine/dlls/setupapi/virtcopy.c Sat Nov 9 15:00:19 2002 +++ wine-local/dlls/setupapi/virtcopy.c Sun Dec 1 09:45:36 2002 @@ -637,7 +637,7 @@ wndClass.cbClsExtra = 0; wndClass.cbWndExtra = 0; wndClass.hCursor = LoadCursorA (0, IDC_ARROWA); - wndClass.hbrBackground = (HBRUSH)NULL; + wndClass.hbrBackground = NULL; wndClass.lpszClassName = "setupx_progress"; RegisterClassA (&wndClass); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shell32/control.c wine-local/dlls/shell32/control.c --- wine/dlls/shell32/control.c Sun Nov 24 23:03:35 2002 +++ wine-local/dlls/shell32/control.c Sun Dec 1 11:04:08 2002 @@ -275,7 +275,7 @@ WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hWnd, (HMENU)0, hInst, panel); + hWnd, 0, hInst, panel); if (!panel->hWnd) return; while (GetMessageA(&msg, panel->hWnd, 0, 0)) { TranslateMessage(&msg); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shell32/dialogs.c wine-local/dlls/shell32/dialogs.c --- wine/dlls/shell32/dialogs.c Sun Nov 24 23:03:35 2002 +++ wine-local/dlls/shell32/dialogs.c Sun Dec 1 11:04:20 2002 @@ -122,7 +122,7 @@ prfdp = (RUNFILEDLGPARAMS *)lParam ; SetWindowTextA (hwnd, prfdp->lpstrTitle) ; SetClassLongA (hwnd, GCL_HICON, (LPARAM)prfdp->hIcon) ; - SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON, (WPARAM)LoadIconA ((HINSTANCE)NULL, IDI_WINLOGOA), 0) ; + SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON, (WPARAM)LoadIconA (NULL, IDI_WINLOGOA), 0) ; FillList (GetDlgItem (hwnd, 12298), NULL) ; SetFocus (GetDlgItem (hwnd, 12298)) ; return TRUE ; @@ -151,7 +151,7 @@ { case IDOK : { - HWND htxt = (HWND)NULL ; + HWND htxt = NULL ; if ((ic = GetWindowTextLengthA (htxt = GetDlgItem (hwnd, 12298)))) { psz = malloc (ic + 2) ; @@ -189,14 +189,14 @@ case 12288 : { - HMODULE hComdlg = (HMODULE)NULL ; + HMODULE hComdlg = NULL ; LPFNOFN ofnProc = NULL ; static char szFName[1024] = "", szFileTitle[256] = "", szInitDir[768] = "" ; static OPENFILENAMEA ofn = { sizeof (OPENFILENAMEA), - (HWND)NULL, - (HINSTANCE)NULL, + NULL, + NULL, "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0", (LPSTR)NULL, 0, @@ -218,7 +218,7 @@ ofn.hwndOwner = hwnd ; - if ((HMODULE)NULL == (hComdlg = LoadLibraryExA ("comdlg32", (HANDLE)NULL, 0))) + if (NULL == (hComdlg = LoadLibraryExA ("comdlg32", NULL, 0))) { MessageBoxA (hwnd, "Unable to display dialog box (LoadLibraryEx) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; return TRUE ; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shell32/shell32_main.c wine-local/dlls/shell32/shell32_main.c --- wine/dlls/shell32/shell32_main.c Sun Nov 24 23:03:35 2002 +++ wine-local/dlls/shell32/shell32_main.c Sun Dec 1 11:04:36 2002 @@ -96,7 +96,7 @@ size*=2; hargv=GlobalReAlloc(hargv, size, 0); argv=GlobalLock(hargv); - } while (GetModuleFileNameW((HMODULE)0, (LPWSTR)(argv+1), size-sizeof(LPWSTR)) == 0); + } while (GetModuleFileNameW(0, (LPWSTR)(argv+1), size-sizeof(LPWSTR)) == 0); argv[0]=(LPWSTR)(argv+1); if (numargs) *numargs=2; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shell32/shlexec.c wine-local/dlls/shell32/shlexec.c --- wine/dlls/shell32/shlexec.c Sun Nov 24 23:03:35 2002 +++ wine-local/dlls/shell32/shlexec.c Sun Dec 1 11:04:53 2002 @@ -329,7 +329,7 @@ HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2) { - return (HDDEDATA)0; + return 0; } /****************************************************************** @@ -518,7 +518,7 @@ debugstr_a(sei->lpDirectory), sei->nShow, (sei->fMask & SEE_MASK_CLASSNAME) ? debugstr_a(sei->lpClass) : "not used"); - sei->hProcess = (HANDLE)NULL; + sei->hProcess = NULL; ZeroMemory(szApplicationName,MAX_PATH); if (sei->lpFile) strcpy(szApplicationName, sei->lpFile); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shell32/tests/shlfileop.c wine-local/dlls/shell32/tests/shlfileop.c --- wine/dlls/shell32/tests/shlfileop.c Mon Nov 18 21:31:15 2002 +++ wine-local/dlls/shell32/tests/shlfileop.c Sun Dec 1 11:12:21 2002 @@ -36,7 +36,7 @@ DWORD written; CHAR msg[MAX_PATH]; - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, (HANDLE)NULL); + file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); sprintf(msg, "Failure to open file %s", name); ok(file != INVALID_HANDLE_VALUE, msg); WriteFile(file, name, strlen(name), &written, NULL); @@ -109,7 +109,7 @@ sprintf(buf, "%s\\%s", CURR_DIR, "test?.txt"); buf[strlen(buf) + 1] = '\0'; - shfo.hwnd = (HANDLE)NULL; + shfo.hwnd = NULL; shfo.wFunc = FO_DELETE; shfo.pFrom = buf; shfo.pTo = "\0"; @@ -153,7 +153,7 @@ CHAR from[MAX_PATH]; CHAR to[MAX_PATH]; - shfo.hwnd = (HANDLE)NULL; + shfo.hwnd = NULL; shfo.wFunc = FO_RENAME; shfo.pFrom = from; shfo.pTo = to; @@ -212,7 +212,7 @@ CHAR to[MAX_PATH]; FILEOP_FLAGS tmp_flags; - shfo.hwnd = (HANDLE)NULL; + shfo.hwnd = NULL; shfo.wFunc = FO_COPY; shfo.pFrom = from; shfo.pTo = to; @@ -296,7 +296,7 @@ CHAR from[MAX_PATH]; CHAR to[MAX_PATH]; - shfo.hwnd = (HANDLE)NULL; + shfo.hwnd = NULL; shfo.wFunc = FO_MOVE; shfo.pFrom = from; shfo.pTo = to; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shlwapi/assoc.c wine-local/dlls/shlwapi/assoc.c --- wine/dlls/shlwapi/assoc.c Thu Sep 5 09:32:19 2002 +++ wine-local/dlls/shlwapi/assoc.c Sun Dec 1 09:34:40 2002 @@ -137,7 +137,7 @@ return E_OUTOFMEMORY; flags &= SHLWAPI_DEF_ASSOCF; - hRet = IQueryAssociations_Init(lpAssoc, flags, pszAssoc, (HKEY)0, (HWND)0); + hRet = IQueryAssociations_Init(lpAssoc, flags, pszAssoc, 0, 0); if (SUCCEEDED(hRet)) hRet = IQueryAssociations_GetKey(lpAssoc, flags, key, pszExtra, phkeyOut); @@ -204,7 +204,7 @@ return E_OUTOFMEMORY; hRet = IQueryAssociations_Init(lpAssoc, flags & SHLWAPI_DEF_ASSOCF, - pszAssoc, (HKEY)0, (HWND)0); + pszAssoc, 0, 0); if (SUCCEEDED(hRet)) hRet = IQueryAssociations_GetString(lpAssoc, flags, str, pszExtra, @@ -291,7 +291,7 @@ return E_OUTOFMEMORY; flags &= SHLWAPI_DEF_ASSOCF; - hRet = IQueryAssociations_Init(lpAssoc, flags, 0, hkAssoc, (HWND)0); + hRet = IQueryAssociations_Init(lpAssoc, flags, 0, hkAssoc, 0); if (SUCCEEDED(hRet)) hRet = IQueryAssociations_GetString(lpAssoc, flags, str, pszExtra, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shlwapi/istream.c wine-local/dlls/shlwapi/istream.c --- wine/dlls/shlwapi/istream.c Tue Jul 16 11:21:52 2002 +++ wine-local/dlls/shlwapi/istream.c Sun Dec 1 09:34:40 2002 @@ -444,7 +444,7 @@ /* Open HANDLE to file */ hFile = CreateFileW(lpszPath, dwAccess, dwShare, NULL, dwCreate, - dwAttributes, (HANDLE)0); + dwAttributes, 0); if(hFile == INVALID_HANDLE_VALUE) { diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shlwapi/ordinal.c wine-local/dlls/shlwapi/ordinal.c --- wine/dlls/shlwapi/ordinal.c Sun Dec 1 09:33:23 2002 +++ wine-local/dlls/shlwapi/ordinal.c Sun Dec 1 09:38:57 2002 @@ -126,7 +126,7 @@ { HANDLE hDst, hSrc; DWORD dwMyProcId = GetCurrentProcessId(); - HSHARED hRet = (HSHARED)NULL; + HSHARED hRet = NULL; TRACE("(%p,%ld,%ld,%08lx,%08lx)\n", (PVOID)hShared, dwDstProcId, dwSrcProcId, dwAccess, dwOptions); @@ -150,7 +150,7 @@ /* Make handle available to dest process */ if (!DuplicateHandle(hDst, (HANDLE)hShared, hSrc, &hRet, dwAccess, 0, dwOptions | DUPLICATE_SAME_ACCESS)) - hRet = (HSHARED)NULL; + hRet = NULL; if (dwSrcProcId != dwMyProcId) CloseHandle(hSrc); @@ -193,7 +193,7 @@ { HANDLE hMap; LPVOID pMapped; - HSHARED hRet = (HSHARED)NULL; + HSHARED hRet = NULL; TRACE("(%ld,%p,%ld)\n", dwProcId, lpvData, dwSize); @@ -2220,7 +2220,7 @@ HICON WINAPI SHLWAPI_337(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons) { - GET_FUNC(pExtractIconExW, shell32, "ExtractIconExW", (HICON)0); + GET_FUNC(pExtractIconExW, shell32, "ExtractIconExW", 0); return pExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); } @@ -2336,7 +2336,7 @@ HICON WINAPI SHLWAPI_370(HINSTANCE hInstance, LPCWSTR lpszExeFileName, UINT nIconIndex) { - GET_FUNC(pExtractIconW, shell32, "ExtractIconW", (HICON)0); + GET_FUNC(pExtractIconW, shell32, "ExtractIconW", 0); return pExtractIconW(hInstance, lpszExeFileName, nIconIndex); } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shlwapi/reg.c wine-local/dlls/shlwapi/reg.c --- wine/dlls/shlwapi/reg.c Sun Dec 1 09:33:24 2002 +++ wine-local/dlls/shlwapi/reg.c Sun Dec 1 09:40:43 2002 @@ -142,7 +142,7 @@ if ((ret1 != ERROR_SUCCESS) && (ret2 != ERROR_SUCCESS)) { HeapFree(GetProcessHeap(), 0, ihky); if (phNewUSKey) - *phNewUSKey = (HUSKEY)0; + *phNewUSKey = 0; return ret2; } @@ -208,7 +208,7 @@ if ((ret1 != ERROR_SUCCESS) && (ret2 != ERROR_SUCCESS)) { HeapFree(GetProcessHeap(), 0, ihky); if (phNewUSKey) - *phNewUSKey = (HUSKEY)0; + *phNewUSKey = 0; return ret2; } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shlwapi/regstream.c wine-local/dlls/shlwapi/regstream.c --- wine/dlls/shlwapi/regstream.c Sun Dec 1 09:22:22 2002 +++ wine-local/dlls/shlwapi/regstream.c Sun Dec 1 09:41:22 2002 @@ -325,7 +325,7 @@ { &DummyRegStreamVTable, 1, - (HKEY)0, + 0, NULL, 0, 0 @@ -373,7 +373,7 @@ IStream * WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey, LPCSTR pszValue,DWORD dwMode) { - HKEY hStrKey = (HKEY)0; + HKEY hStrKey = 0; LPBYTE lpBuff = NULL; DWORD dwLength, dwType; @@ -402,7 +402,7 @@ IStream * WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode) { - HKEY hStrKey = (HKEY)0; + HKEY hStrKey = 0; LPBYTE lpBuff = NULL; DWORD dwLength, dwType; @@ -497,7 +497,7 @@ if (lpbDup) { memcpy(lpbDup, lpbData, dwDataLen); - iStrmRet = IStream_Create((HKEY)0, lpbDup, dwDataLen); + iStrmRet = IStream_Create(0, lpbDup, dwDataLen); if (!iStrmRet) HeapFree(GetProcessHeap(), 0, lpbDup); @@ -536,7 +536,7 @@ if(dwReserved || !lppStream) return E_INVALIDARG; - lpStream = IStream_Create((HKEY)0, lpbData, dwDataLen); + lpStream = IStream_Create(0, lpbData, dwDataLen); if(!lpStream) return E_OUTOFMEMORY; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/shlwapi/tests/shreg.c wine-local/dlls/shlwapi/tests/shreg.c --- wine/dlls/shlwapi/tests/shreg.c Sat Sep 21 17:38:54 2002 +++ wine-local/dlls/shlwapi/tests/shreg.c Sun Dec 1 11:15:48 2002 @@ -228,21 +228,21 @@ HKEY hKeySrc, hKeyDst; /* Delete existing destination sub keys */ - hKeyDst = (HKEY)0; + hKeyDst = 0; if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) && hKeyDst) { SHDeleteKeyA(hKeyDst, NULL); RegCloseKey(hKeyDst); } - hKeyDst = (HKEY)0; + hKeyDst = 0; if (RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) || !hKeyDst) { ok(0, "didn't open dest"); return; } - hKeySrc = (HKEY)0; + hKeySrc = 0; if (RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc) || !hKeySrc) { ok(0, "didn't open source"); @@ -257,7 +257,7 @@ RegCloseKey(hKeyDst); /* Check we copied the sub keys, i.e. AeDebug from the default wine registry */ - hKeyDst = (HKEY)0; + hKeyDst = 0; if (RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination\\AeDebug", &hKeyDst) || !hKeyDst) { ok(0, "didn't open copy"); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/ttydrv/bitmap.c wine-local/dlls/ttydrv/bitmap.c --- wine/dlls/ttydrv/bitmap.c Sat Nov 9 15:00:22 2002 +++ wine-local/dlls/ttydrv/bitmap.c Sun Dec 1 11:05:07 2002 @@ -59,7 +59,7 @@ FIXME("(%p, %p, %u, %p, %p, %ld): stub\n", physDev->hdc, bmi, usage, bits, section, offset); - return (HBITMAP) NULL; + return NULL; } /*********************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/ttydrv/wnd.c wine-local/dlls/ttydrv/wnd.c --- wine/dlls/ttydrv/wnd.c Sat Nov 9 15:00:22 2002 +++ wine-local/dlls/ttydrv/wnd.c Sun Dec 1 11:05:19 2002 @@ -734,7 +734,7 @@ * window is already the topmost window, it will not * activate it. */ - if (GetTopWindow((HWND)0)==hwnd && (wasVisible || GetActiveWindow() == hwnd)) + if (GetTopWindow(0)==hwnd && (wasVisible || GetActiveWindow() == hwnd)) swp |= SWP_NOACTIVATE; break; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/user/dde/client.c wine-local/dlls/user/dde/client.c --- wine/dlls/user/dde/client.c Sun Nov 24 23:03:36 2002 +++ wine-local/dlls/user/dde/client.c Sun Dec 1 11:08:42 2002 @@ -394,7 +394,7 @@ { TRACE("Returning FALSE on XTYP_ADVSTART - fAck was FALSE\n"); GlobalFree(pXAct->hMem); - pXAct->hDdeData = (HDDEDATA)0; + pXAct->hDdeData = 0; } return WDML_QS_HANDLED; @@ -461,7 +461,7 @@ if (!ddeAck.fAck) { TRACE("Returning FALSE on XTYP_ADVSTOP - fAck was FALSE\n"); - pXAct->hDdeData = (HDDEDATA)0; + pXAct->hDdeData = 0; } else { diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/user/dde/misc.c wine-local/dlls/user/dde/misc.c --- wine/dlls/user/dde/misc.c Sun Nov 24 23:03:36 2002 +++ wine-local/dlls/user/dde/misc.c Sun Dec 1 11:09:00 2002 @@ -715,7 +715,7 @@ HDDEDATA ret; if (pInstance == NULL) - return (HDDEDATA)0; + return 0; TRACE("invoking CB%d[%p] (%u %u %p %p %p %p %lu %lu)\n", pInstance->win16 ? 16 : 32, pInstance->callback, uType, uFmt, hConv, hsz1, hsz2, hdata, dwData1, dwData2); @@ -857,7 +857,7 @@ { WCHAR nameBuffer[MAX_BUFFER_LEN]; - if (!atom) return (HSZ)0; + if (!atom) return 0; if (GlobalGetAtomNameW(atom, nameBuffer, MAX_BUFFER_LEN)) { diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/user/dde/server.c wine-local/dlls/user/dde/server.c --- wine/dlls/user/dde/server.c Sun Nov 24 23:03:36 2002 +++ wine-local/dlls/user/dde/server.c Sun Dec 1 11:09:14 2002 @@ -174,7 +174,7 @@ HWND hwndServer; WNDCLASSEXA wndclass; - hDdeData = (HDDEDATA)NULL; + hDdeData = NULL; TRACE("(%ld,%p,%p,%d)\n", idInst, hsz1, hsz2, afCmd); @@ -706,7 +706,7 @@ { WDML_LINK* pLink; - if (pXAct->hszItem == (HSZ)0 || pXAct->wFmt == 0) + if (pXAct->hszItem == 0 || pXAct->wFmt == 0) { ERR("Unsupported yet options (null item or clipboard format)\n"); return WDML_QS_ERROR; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/user/resource.c wine-local/dlls/user/resource.c --- wine/dlls/user/resource.c Sun Nov 24 23:03:36 2002 +++ wine-local/dlls/user/resource.c Sun Dec 1 09:34:40 2002 @@ -152,7 +152,7 @@ /* Do parameter checking to avoid the explosions and the screaming as far as possible. */ - if((dst && (entries < 1)) || (src == (HACCEL)NULL) || !accel) { + if((dst && (entries < 1)) || (src == NULL) || !accel) { WARN_(accel)("Application sent invalid parameters (%p %p %d).\n", (LPVOID)src, (LPVOID)dst, entries); return 0; @@ -209,7 +209,7 @@ WARN_(accel)("Application sent invalid parameters (%p %d).\n", lpaccel, cEntries); SetLastError(ERROR_INVALID_PARAMETER); - return (HACCEL)NULL; + return NULL; } FIXME_(accel)("should check that the accelerator descriptions are valid," " return NULL and SetLastError() if not.\n"); @@ -222,7 +222,7 @@ if(!hAccel) { ERR_(accel)("Out of memory.\n"); SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return (HACCEL)NULL; + return NULL; } accel = GlobalLock16(HACCEL_16(hAccel)); for (i=0;i<cEntries;i++) { @@ -255,7 +255,7 @@ WARN_(accel)("Application sent invalid parameters (%p %d).\n", lpaccel, cEntries); SetLastError(ERROR_INVALID_PARAMETER); - return (HACCEL)NULL; + return NULL; } FIXME_(accel)("should check that the accelerator descriptions are valid," " return NULL and SetLastError() if not.\n"); @@ -268,7 +268,7 @@ if(!hAccel) { ERR_(accel)("Out of memory.\n"); SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return (HACCEL)NULL; + return NULL; } accel = GlobalLock16(HACCEL_16(hAccel)); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/winedos/vga.c wine-local/dlls/winedos/vga.c --- wine/dlls/winedos/vga.c Fri Nov 29 00:43:18 2002 +++ wine-local/dlls/winedos/vga.c Sun Dec 1 11:06:39 2002 @@ -122,7 +122,7 @@ static void CALLBACK VGA_Poll( LPVOID arg, DWORD low, DWORD high ); -static HWND vga_hwnd = (HWND) NULL; +static HWND vga_hwnd = NULL; /* * For simplicity, I'm creating a second palette. diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/wineps/init.c wine-local/dlls/wineps/init.c --- wine/dlls/wineps/init.c Mon Nov 18 21:31:16 2002 +++ wine-local/dlls/wineps/init.c Sun Dec 1 09:52:12 2002 @@ -121,7 +121,7 @@ case DLL_PROCESS_ATTACH: PSDRV_Heap = HeapCreate(0, 0x10000, 0); - if (PSDRV_Heap == (HANDLE)NULL) + if (PSDRV_Heap == NULL) return FALSE; if (PSDRV_GetFontMetrics() == FALSE) { @@ -130,7 +130,7 @@ } PSDRV_DefaultFont = CreateFontIndirectA(&DefaultLogFont); - if (PSDRV_DefaultFont == (HANDLE)NULL) { + if (PSDRV_DefaultFont == NULL) { HeapDestroy(PSDRV_Heap); return FALSE; } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/wininet/ftp.c wine-local/dlls/wininet/ftp.c --- wine/dlls/wininet/ftp.c Sat Nov 9 15:00:26 2002 +++ wine-local/dlls/wininet/ftp.c Sun Dec 1 11:10:08 2002 @@ -192,7 +192,7 @@ BOOL WINAPI FTP_FtpPutFileA(HINTERNET hConnect, LPCSTR lpszLocalFile, LPCSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext) { - HANDLE hFile = (HANDLE)NULL; + HANDLE hFile = NULL; BOOL bSuccess = FALSE; LPWININETAPPINFOA hIC = NULL; LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hConnect; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/wininet/http.c wine-local/dlls/wininet/http.c --- wine/dlls/wininet/http.c Mon Nov 18 21:31:16 2002 +++ wine-local/dlls/wininet/http.c Sun Dec 1 11:10:18 2002 @@ -312,7 +312,7 @@ if (NULL == lpwhr) { INTERNET_SetLastError(ERROR_OUTOFMEMORY); - return (HINTERNET) NULL; + return NULL; } lpwhr->hdr.htype = WH_HHTTPREQ; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/wininet/internet.c wine-local/dlls/wininet/internet.c --- wine/dlls/wininet/internet.c Fri Nov 29 00:43:18 2002 +++ wine-local/dlls/wininet/internet.c Sun Dec 1 11:10:28 2002 @@ -253,7 +253,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags) { - HINTERNET rc = (HINTERNET)NULL; + HINTERNET rc = NULL; INT lenAgent = lstrlenW(lpszAgent)+1; INT lenProxy = lstrlenW(lpszProxy)+1; INT lenBypass = lstrlenW(lpszProxyBypass)+1; @@ -269,7 +269,7 @@ free(szProxy); if (szBypass) free(szBypass); - return (HINTERNET)NULL; + return NULL; } WideCharToMultiByte(CP_ACP, -1, lpszAgent, -1, szAgent, lenAgent, @@ -354,7 +354,7 @@ LPCSTR lpszUserName, LPCSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD dwContext) { - HINTERNET rc = (HINTERNET) NULL; + HINTERNET rc = NULL; TRACE("ServerPort %i\n",nServerPort); @@ -397,7 +397,7 @@ LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD dwContext) { - HINTERNET rc = (HINTERNET)NULL; + HINTERNET rc = NULL; INT lenServer = lstrlenW(lpszServerName)+1; INT lenUser = lstrlenW(lpszUserName)+1; INT lenPass = lstrlenW(lpszPassword)+1; @@ -413,7 +413,7 @@ free(szUserName); if (szPassword) free(szPassword); - return (HINTERNET)NULL; + return NULL; } WideCharToMultiByte(CP_ACP, -1, lpszServerName, -1, szServerName, lenServer, @@ -1609,7 +1609,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl, LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD dwContext) { - HINTERNET rc = (HINTERNET)NULL; + HINTERNET rc = NULL; INT lenUrl = lstrlenW(lpszUrl)+1; INT lenHeaders = lstrlenW(lpszHeaders)+1; @@ -1622,7 +1622,7 @@ free(szUrl); if (szHeaders) free(szHeaders); - return (HINTERNET)NULL; + return NULL; } WideCharToMultiByte(CP_ACP, -1, lpszUrl, -1, szUrl, lenUrl, diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/winsock/tests/sock.c wine-local/dlls/winsock/tests/sock.c --- wine/dlls/winsock/tests/sock.c Sat Sep 21 17:38:55 2002 +++ wine-local/dlls/winsock/tests/sock.c Sun Dec 1 11:13:14 2002 @@ -572,7 +572,7 @@ { par->general = general; thread[0] = CreateThread ( NULL, 0, routine, par, 0, &thread_id[0] ); - ok ( thread[0] != (HANDLE) NULL, "Failed to create server thread" ); + ok ( thread[0] != NULL, "Failed to create server thread" ); } static void StartClients (LPTHREAD_START_ROUTINE routine, @@ -584,7 +584,7 @@ { client_id = i - 1; thread[i] = CreateThread ( NULL, 0, routine, par, 0, &thread_id[i] ); - ok ( thread[i] != (HANDLE) NULL, "Failed to create client thread" ); + ok ( thread[i] != NULL, "Failed to create client thread" ); /* Make sure the client is up and running */ WaitForSingleObject ( client_ready[client_id], INFINITE ); }; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/winspool/info.c wine-local/dlls/winspool/info.c --- wine/dlls/winspool/info.c Mon Nov 18 21:31:16 2002 +++ wine-local/dlls/winspool/info.c Sun Dec 1 09:34:40 2002 @@ -3052,7 +3052,7 @@ ++cbMaxValueNameLen; /* allow for trailing '\0' */ hHeap = GetProcessHeap (); - if (hHeap == (HANDLE) NULL) + if (hHeap == NULL) { ERR ("GetProcessHeap failed\n"); r = RegCloseKey (hkSubKey); @@ -3241,7 +3241,7 @@ } hHeap = GetProcessHeap (); - if (hHeap == (HANDLE) NULL) + if (hHeap == NULL) { ERR ("GetProcessHeap failed\n"); return ERROR_OUTOFMEMORY; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/dlls/x11drv/winpos.c wine-local/dlls/x11drv/winpos.c --- wine/dlls/x11drv/winpos.c Mon Nov 18 21:31:16 2002 +++ wine-local/dlls/x11drv/winpos.c Sun Dec 1 11:08:18 2002 @@ -1265,7 +1265,7 @@ * window is already the topmost window, it will not * activate it. */ - if (GetTopWindow((HWND)0)==hwnd && (wasVisible || GetActiveWindow() == hwnd)) + if (GetTopWindow(0)==hwnd && (wasVisible || GetActiveWindow() == hwnd)) swp |= SWP_NOACTIVATE; break; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/graphics/path.c wine-local/graphics/path.c --- wine/graphics/path.c Sun Dec 1 09:33:24 2002 +++ wine-local/graphics/path.c Sun Dec 1 09:52:30 2002 @@ -1182,7 +1182,7 @@ /* Free memory for number-of-points-in-stroke array */ HeapFree( GetProcessHeap(), 0, pNumPointsInStroke ); - if(hrgn==(HRGN)0) + if(hrgn==0) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); return FALSE; diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/objects/enhmetafile.c wine-local/objects/enhmetafile.c --- wine/objects/enhmetafile.c Sun Nov 24 23:03:46 2002 +++ wine-local/objects/enhmetafile.c Sun Dec 1 09:34:40 2002 @@ -1609,9 +1609,9 @@ INT savedMode = 0; FLOAT xSrcPixSize, ySrcPixSize, xscale, yscale; XFORM savedXform, xform; - HPEN hPen = (HPEN)NULL; - HBRUSH hBrush = (HBRUSH)NULL; - HFONT hFont = (HFONT)NULL; + HPEN hPen = NULL; + HBRUSH hBrush = NULL; + HFONT hFont = NULL; POINT pt[2]; if(!lpRect) diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/programs/regtest/regtest.c wine-local/programs/regtest/regtest.c --- wine/programs/regtest/regtest.c Sat Jun 1 09:40:59 2002 +++ wine-local/programs/regtest/regtest.c Sun Dec 1 11:06:56 2002 @@ -363,7 +363,7 @@ long lSts; HANDLE hEvent; - hEvent = (HANDLE)0; + hEvent = 0; lSts = RegNotifyChangeKeyValue((HKEY)2, TRUE, REG_NOTIFY_CHANGE_NAME, 0, 0); if (lSts != ERROR_INVALID_HANDLE) xERROR(1,lSts); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/programs/wineconsole/user.c wine-local/programs/wineconsole/user.c --- wine/programs/wineconsole/user.c Sat Nov 9 15:00:33 2002 +++ wine-local/programs/wineconsole/user.c Sun Dec 1 11:07:28 2002 @@ -150,7 +150,7 @@ { if (data->curcfg.cursor_visible && PRIVATE(data)->hWnd == GetFocus()) DestroyCaret(); if (PRIVATE(data)->cursor_bitmap) DeleteObject(PRIVATE(data)->cursor_bitmap); - PRIVATE(data)->cursor_bitmap = (HBITMAP)0; + PRIVATE(data)->cursor_bitmap = 0; if (size != 100) { int w16b; /* number of bytes per row, aligned on word size */ @@ -417,7 +417,7 @@ HFONT hFont, hOldFont; int w, i, buf[256]; - if (!(hDC = GetDC(hWnd))) return (HFONT)0; + if (!(hDC = GetDC(hWnd))) return 0; if (!(hFont = CreateFontIndirect(lf))) goto err1; hOldFont = SelectObject(hDC, hFont); @@ -469,7 +469,7 @@ err1: if (hDC) ReleaseDC(hWnd, hDC); - return (HFONT)0; + return 0; } /****************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/programs/winhelp/hlpfile.c wine-local/programs/winhelp/hlpfile.c --- wine/programs/winhelp/hlpfile.c Sun Nov 24 23:03:47 2002 +++ wine-local/programs/winhelp/hlpfile.c Sun Dec 1 11:07:45 2002 @@ -1119,7 +1119,7 @@ WINE_FIXME("Too high face ref (%u/%u)\n", idx, face_num); strcpy(hlpfile->fonts[i].LogFont.lfFaceName, "Helv"); } - hlpfile->fonts[i].hFont = (HANDLE)0; + hlpfile->fonts[i].hFont = 0; hlpfile->fonts[i].color = RGB(ref[dscr_offset + i * 11 + 5], ref[dscr_offset + i * 11 + 6], ref[dscr_offset + i * 11 + 7]); diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/programs/winver/winver.c wine-local/programs/winver/winver.c --- wine/programs/winver/winver.c Fri Apr 12 07:54:02 2002 +++ wine-local/programs/winver/winver.c Sun Dec 1 11:03:10 2002 @@ -23,7 +23,7 @@ int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { - return ShellAbout((HWND)0, PACKAGE_NAME, PACKAGE_STRING, 0); + return ShellAbout(0, PACKAGE_NAME, PACKAGE_STRING, 0); } /* Local Variables: */ diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/win32/newfns.c wine-local/win32/newfns.c --- wine/win32/newfns.c Sun Nov 24 23:03:51 2002 +++ wine-local/win32/newfns.c Sun Dec 1 09:34:40 2002 @@ -294,7 +294,7 @@ DWORD dwNumberOfConcurrentThreads) { FIXME("(%p, %p, %08lx, %08lx): stub.\n", hFileHandle, hExistingCompletionPort, dwCompletionKey, dwNumberOfConcurrentThreads); - return (HANDLE)NULL; + return NULL; } /****************************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/windows/dialog.c wine-local/windows/dialog.c --- wine/windows/dialog.c Fri Nov 29 00:43:27 2002 +++ wine-local/windows/dialog.c Sun Dec 1 11:02:49 2002 @@ -1264,7 +1264,7 @@ /* Don't have to send a ShowWindow(SW_HIDE), just do SetWindowPos with SWP_HIDEWINDOW as done in Windows */ - SetWindowPos(hwnd, (HWND)0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE + SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW); /* unblock dialog loop */ @@ -1811,7 +1811,7 @@ if(hChildFirst) { if(bCtrl) - retWnd = DIALOG_GetNextTabItem(hwndMain,hChildFirst,(HWND)NULL,fPrevious ); + retWnd = DIALOG_GetNextTabItem(hwndMain,hChildFirst,NULL,fPrevious ); else retWnd = hChildFirst; } @@ -1829,7 +1829,7 @@ hParent = GetParent(hParent); } if(!retWnd) - retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,(HWND)NULL,fPrevious ); + retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,NULL,fPrevious ); } return retWnd; } diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/windows/multimon.c wine-local/windows/multimon.c --- wine/windows/multimon.c Sat Jun 1 09:06:54 2002 +++ wine-local/windows/multimon.c Sun Dec 1 09:34:40 2002 @@ -42,7 +42,7 @@ { return xPRIMARY_MONITOR; } - return (HMONITOR)0; + return NULL; } /*********************************************************************** @@ -58,7 +58,7 @@ { return xPRIMARY_MONITOR; } - return (HMONITOR)0; + return NULL; } /*********************************************************************** @@ -78,7 +78,7 @@ return MonitorFromRect(&wp.rcNormalPosition, dwFlags); } - return (HMONITOR)0; + return NULL; } /*********************************************************************** diff -ur -x *.o -x *.s -x *.spec.c -x Make* wine/windows/painting.c wine-local/windows/painting.c --- wine/windows/painting.c Sun Nov 24 23:03:51 2002 +++ wine-local/windows/painting.c Sun Dec 1 09:34:40 2002 @@ -1305,8 +1305,8 @@ /* before it is displayed */ fg = SetTextColor(hdc, RGB(0, 0, 0)); bg = SetBkColor(hdc, RGB(255, 255, 255)); - hbm = (HBITMAP)NULL; hbmsave = (HBITMAP)NULL; - memdc = (HDC)NULL; hbsave = (HBRUSH)NULL; + hbm = NULL; hbmsave = NULL; + memdc = NULL; hbsave = NULL; retval = FALSE; /* assume failure */ /* From here on we must use "goto cleanup" when something goes wrong */