diff --git a/controls/button.c b/controls/button.c index c0e7790c556..d4fac467e5b 100644 --- a/controls/button.c +++ b/controls/button.c @@ -1094,7 +1094,7 @@ static void OB_Paint( HWND hwnd, HDC hDC, UINT action ) if (GetClipRgn(hDC, clipRegion) != 1) { DeleteObject(clipRegion); - clipRegion=(HRGN)NULL; + clipRegion=NULL; } clipRect = dis.rcItem; DPtoLP(hDC, (LPPOINT) &clipRect, 2); diff --git a/controls/combo.c b/controls/combo.c index 830922e3671..d94f9845595 100644 --- a/controls/combo.c +++ b/controls/combo.c @@ -312,7 +312,7 @@ static void CBForceDummyResize( * message. */ SetWindowPos( lphc->self, - (HWND)NULL, + NULL, 0, 0, windowRect.right - windowRect.left, newComboHeight, @@ -822,7 +822,7 @@ static void CBPaintText( if (GetClipRgn(hdc, clipRegion)!=1) { DeleteObject(clipRegion); - clipRegion=(HRGN)NULL; + clipRegion=NULL; } if (!IsWindowEnabled(lphc->self) & WS_DISABLED) itemState |= ODS_DISABLED; diff --git a/controls/edit.c b/controls/edit.c index 9149d0d1651..66b9874e98f 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -2169,7 +2169,7 @@ static void EDIT_SetRectNP(EDITSTATE *es, LPRECT rc) 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, NULL); } @@ -2779,7 +2779,7 @@ static BOOL EDIT_EM_LineScroll_internal(EDITSTATE *es, INT dx, INT dy) 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 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc) if(es->hloc32A) { LocalFree(es->hloc32A); - es->hloc32A = (HLOCAL)NULL; + es->hloc32A = NULL; } es->hloc32W = hloc; } @@ -3183,7 +3183,7 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc) 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, NULL); EDIT_UpdateText(es, NULL, TRUE); EDIT_EM_ScrollCaret(es); /* force scroll info update */ @@ -3219,7 +3219,7 @@ static void EDIT_EM_SetHandle16(EDITSTATE *es, HLOCAL16 hloc) if(es->hloc32A) { LocalFree(es->hloc32A); - es->hloc32A = (HLOCAL)NULL; + es->hloc32A = NULL; } countA = LOCAL_Size(hInstance, hloc); @@ -3250,7 +3250,7 @@ static void EDIT_EM_SetHandle16(EDITSTATE *es, HLOCAL16 hloc) 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, NULL); EDIT_UpdateText(es, NULL, TRUE); EDIT_EM_ScrollCaret(es); /* force scroll info update */ @@ -3460,7 +3460,7 @@ static void EDIT_EM_SetWordBreakProc(EDITSTATE *es, LPARAM lParam) 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, NULL); EDIT_UpdateText(es, NULL, TRUE); } } @@ -3479,7 +3479,7 @@ static void EDIT_EM_SetWordBreakProc16(EDITSTATE *es, EDITWORDBREAKPROC16 wbp) 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, NULL); EDIT_UpdateText(es, NULL, TRUE); } } @@ -4527,7 +4527,7 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw) 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, NULL); else EDIT_CalcLineWidth_SL(es); diff --git a/dlls/avifil32/acmstream.c b/dlls/avifil32/acmstream.c index eaa81097324..771b0c4ca08 100644 --- a/dlls/avifil32/acmstream.c +++ b/dlls/avifil32/acmstream.c @@ -162,11 +162,11 @@ static ULONG WINAPI ACMStream_fnRelease(IAVIStream* iface) 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 @@ static HRESULT WINAPI ACMStream_fnInfo(IAVIStream *iface,LPAVISTREAMINFOW psi, 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 @@ static HRESULT WINAPI ACMStream_fnReadFormat(IAVIStream *iface, LONG pos, 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 @@ static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start, *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 @@ static HRESULT WINAPI ACMStream_fnWrite(IAVIStream *iface, LONG start, 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 @@ static HRESULT WINAPI ACMStream_fnDelete(IAVIStream *iface, LONG start, 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 @@ static HRESULT AVIFILE_OpenCompressor(IAVIStreamImpl *This) assert(This != NULL); assert(This->pStream != NULL); - if (This->has != (HACMSTREAM)NULL) + if (This->has != NULL) return AVIERR_OK; if (This->lpInFormat == NULL) { diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 40dfe243e14..60ac382fe0b 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -1224,7 +1224,7 @@ static void AVISaveOptionsUpdate(HWND hWnd) 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 @@ static void AVISaveOptionsUpdate(HWND hWnd) 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 --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index 426052f60b0..a1afa0deeda 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -318,9 +318,9 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface) 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 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, 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 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, /* 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 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) DWORD nStream; HRESULT hr; - if (This->hmmio == (HMMIO)NULL) + if (This->hmmio == NULL) return AVIERR_FILEOPEN; /* initialize stream ptr's */ @@ -1904,7 +1904,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos, /* 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 --git a/dlls/avifil32/extrachunk.c b/dlls/avifil32/extrachunk.c index c0f7a75d650..cf70c5c9b96 100644 --- a/dlls/avifil32/extrachunk.c +++ b/dlls/avifil32/extrachunk.c @@ -106,7 +106,7 @@ HRESULT ReadChunkIntoExtra(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck) /* 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 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,MMCKINFO *lpck, /* 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 --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c index 7e5481145e6..e4f0d75a297 100644 --- a/dlls/avifil32/getframe.c +++ b/dlls/avifil32/getframe.c @@ -102,13 +102,13 @@ static void AVIFILE_CloseCompressor(IGetFrameImpl *This) 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 @@ static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos) 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 @@ static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos) } /* 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 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface, } /* 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 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface, } 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 --git a/dlls/avifil32/icmstream.c b/dlls/avifil32/icmstream.c index b109dabac7f..7b738774aac 100644 --- a/dlls/avifil32/icmstream.c +++ b/dlls/avifil32/icmstream.c @@ -186,7 +186,7 @@ static ULONG WINAPI ICMStream_fnRelease(IAVIStream* iface) 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 @@ static ULONG WINAPI ICMStream_fnRelease(IAVIStream* iface) This->lpPrev = NULL; } ICCompressEnd(This->hic); - This->hic = (HIC)NULL; + This->hic = NULL; } if (This->lpbiCur != NULL) { GlobalFreePtr(This->lpbiCur); @@ -258,7 +258,7 @@ static HRESULT WINAPI ICMStream_fnCreate(IAVIStream *iface, LPARAM lParam1, 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 @@ static LONG WINAPI ICMStream_fnFindSample(IAVIStream *iface, LONG pos, 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 @@ static HRESULT WINAPI ICMStream_fnReadFormat(IAVIStream *iface, LONG pos, 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 @@ static HRESULT WINAPI ICMStream_fnSetFormat(IAVIStream *iface, LONG pos, 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 @@ static HRESULT WINAPI ICMStream_fnRead(IAVIStream *iface, LONG start, } /* 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 @@ static HRESULT AVIFILE_OpenGetFrame(IAVIStreamImpl *This) 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 --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index a4bd33f33fe..6730c5e67ba 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -259,9 +259,9 @@ static ULONG WINAPI IAVIFile_fnRelease(IAVIFile *iface) 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 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, 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 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, /* 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 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This) /* 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 --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index cef888a6940..42cc46a3fa3 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -950,5 +950,5 @@ void ANIMATE_Register(void) void ANIMATE_Unregister(void) { - UnregisterClassA(ANIMATE_CLASSA, (HINSTANCE)NULL); + UnregisterClassA(ANIMATE_CLASSA, NULL); } diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 883329c03cb..00c769f5cac 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -2285,5 +2285,5 @@ void COMBOEX_Register (void) void COMBOEX_Unregister (void) { - UnregisterClassW (WC_COMBOBOXEXW, (HINSTANCE)NULL); + UnregisterClassW (WC_COMBOBOXEXW, NULL); } diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index e39bcd64060..c279c4e5e5c 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -419,7 +419,7 @@ GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, LPINT lpInfo) 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 (NULL, hwnd, (LPPOINT)&rcCtrl, 2); SubtractRect (lpRect, lpRect, &rcCtrl); } lpRun++; @@ -881,7 +881,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags, } nWidth = (INT)lpBitmapInfo->biWidth; nHeight = (INT)lpBitmapInfo->biHeight; - hdcScreen = GetDC ((HWND)0); + hdcScreen = GetDC (NULL); hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight); if (hbm) { HDC hdcDst = CreateCompatibleDC (hdcScreen); @@ -894,7 +894,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags, SelectObject (hdcDst, hbmOld); DeleteDC (hdcDst); } - ReleaseDC ((HWND)0, hdcScreen); + ReleaseDC (NULL, hdcScreen); GlobalFree ((HGLOBAL)lpBitmapInfo); FreeResource (hglb); diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 5464b9cb999..3311c7c2433 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -1103,7 +1103,7 @@ DATETIME_Size (HWND hwnd, WPARAM wParam, LPARAM lParam) /* 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 @@ VOID DATETIME_Unregister (void) { TRACE("\n"); - UnregisterClassA (DATETIMEPICK_CLASSA, (HINSTANCE)NULL); + UnregisterClassA (DATETIMEPICK_CLASSA, NULL); } diff --git a/dlls/comctl32/flatsb.c b/dlls/comctl32/flatsb.c index ea275e37e46..a348a066d17 100644 --- a/dlls/comctl32/flatsb.c +++ b/dlls/comctl32/flatsb.c @@ -251,5 +251,5 @@ FLATSB_Register (void) VOID FLATSB_Unregister (void) { - UnregisterClassA (FLATSB_CLASSA, (HINSTANCE)NULL); + UnregisterClassA (FLATSB_CLASSA, NULL); } diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index afc86970517..1f8987dc8d3 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -1799,5 +1799,5 @@ HEADER_Register (void) VOID HEADER_Unregister (void) { - UnregisterClassA (WC_HEADERA, (HINSTANCE)NULL); + UnregisterClassA (WC_HEADERA, NULL); } diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index 10675798e6d..5eb288c91e0 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -365,7 +365,7 @@ HOTKEY_SetFocus (HOTKEY_INFO *infoPtr, WPARAM wParam, LPARAM lParam) infoPtr->bFocus = TRUE; - CreateCaret (infoPtr->hwndSelf, (HBITMAP)0, 1, infoPtr->nHeight - 2); + CreateCaret (infoPtr->hwndSelf, NULL, 1, infoPtr->nHeight - 2); SetCaretPos (infoPtr->CaretPos, 3); @@ -497,5 +497,5 @@ HOTKEY_Register (void) void HOTKEY_Unregister (void) { - UnregisterClassW (HOTKEY_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (HOTKEY_CLASSW, NULL); } diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 752ea67c8c1..a03bea07bce 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -569,5 +569,5 @@ void IPADDRESS_Register (void) void IPADDRESS_Unregister (void) { - UnregisterClassW (WC_IPADDRESSW, (HINSTANCE)NULL); + UnregisterClassW (WC_IPADDRESSW, NULL); } diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 93d7a4522ec..31770b2f55e 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7011,7 +7011,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) /* 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, NULL, lpcs->hInstance, NULL); /* set header unicode format */ @@ -8783,7 +8783,7 @@ void LISTVIEW_Register(void) */ void LISTVIEW_Unregister(void) { - UnregisterClassW(WC_LISTVIEWW, (HINSTANCE)NULL); + UnregisterClassW(WC_LISTVIEWW, NULL); } /*** diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 579f6d72ee7..e4d79e4d39e 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1451,8 +1451,8 @@ MONTHCAL_LButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam) 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 @@ MONTHCAL_LButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam) 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 @@ MONTHCAL_Register(void) void MONTHCAL_Unregister(void) { - UnregisterClassA(MONTHCAL_CLASSA, (HINSTANCE)NULL); + UnregisterClassA(MONTHCAL_CLASSA, NULL); } diff --git a/dlls/comctl32/nativefont.c b/dlls/comctl32/nativefont.c index 2202adce921..c95620b5c8b 100644 --- a/dlls/comctl32/nativefont.c +++ b/dlls/comctl32/nativefont.c @@ -131,6 +131,5 @@ NATIVEFONT_Register (void) VOID NATIVEFONT_Unregister (void) { - UnregisterClassA (WC_NATIVEFONTCTLA, (HINSTANCE)NULL); + UnregisterClassA (WC_NATIVEFONTCTLA, NULL); } - diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c index d29ffd3f833..d03c35ba614 100644 --- a/dlls/comctl32/pager.c +++ b/dlls/comctl32/pager.c @@ -836,7 +836,7 @@ PAGER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) 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 @@ PAGER_Register (void) VOID PAGER_Unregister (void) { - UnregisterClassA (WC_PAGESCROLLERA, (HINSTANCE)NULL); + UnregisterClassA (WC_PAGESCROLLERA, NULL); } diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 2c50ddac982..74d9a981041 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -430,5 +430,5 @@ VOID PROGRESS_Register (void) */ VOID PROGRESS_Unregister (void) { - UnregisterClassW (PROGRESS_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (PROGRESS_CLASSW, NULL); } diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 3cb98f053a2..91d630a3949 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -4509,5 +4509,5 @@ REBAR_Register (void) VOID REBAR_Unregister (void) { - UnregisterClassA (REBARCLASSNAMEA, (HINSTANCE)NULL); + UnregisterClassA (REBARCLASSNAMEA, NULL); } diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 182fccd9ba2..2b8c6d3406d 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -1280,5 +1280,5 @@ STATUS_Register (void) void STATUS_Unregister (void) { - UnregisterClassW (STATUSCLASSNAMEW, (HINSTANCE)NULL); + UnregisterClassW (STATUSCLASSNAMEW, NULL); } diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 045cb2a8c5b..be68dcdbf2c 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -986,14 +986,14 @@ static void TAB_SetupScrolling( 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 @@ TAB_Register (void) 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 @@ TAB_Register (void) VOID TAB_Unregister (void) { - UnregisterClassA (WC_TABCONTROLA, (HINSTANCE)NULL); + UnregisterClassA (WC_TABCONTROLA, NULL); } diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c0050a1bc42..f789354755d 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -2225,7 +2225,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) nCount = ImageList_GetImageCount(himlDef); /* Add bitmaps to the default image list */ - if (lpAddBmp->hInst == (HINSTANCE)0) + if (lpAddBmp->hInst == NULL) { nIndex = ImageList_AddMasked (himlDef, (HBITMAP)lpAddBmp->nID, @@ -5959,7 +5959,7 @@ TOOLBAR_Register (void) VOID TOOLBAR_Unregister (void) { - UnregisterClassA (TOOLBARCLASSNAMEA, (HINSTANCE)NULL); + UnregisterClassA (TOOLBARCLASSNAMEA, NULL); } static HIMAGELIST TOOLBAR_InsertImageList(PIMLENTRY **pies, INT *cies, HIMAGELIST himl, INT id) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 1be2548e876..dde7b417d11 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -324,7 +324,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) GetWindowRect ((HWND)toolPtr->uId, &rc); else { rc = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2); + MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2); } rect.left = (rc.left + rc.right - size.cx) / 2; rect.top = rc.bottom + 2; @@ -353,7 +353,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) GetWindowRect ((HWND)toolPtr->uId, &rc); else { rc = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2); + MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2); } rect.bottom = rc.top - 2; rect.top = rect.bottom - size.cy; @@ -456,7 +456,7 @@ TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr) GetWindowRect ((HWND)toolPtr->uId, &rcTool); else { rcTool = toolPtr->rect; - MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rcTool, 2); + MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rcTool, 2); } GetCursorPos ((LPPOINT)&rect); @@ -2444,5 +2444,5 @@ TOOLTIPS_Register (void) VOID TOOLTIPS_Unregister (void) { - UnregisterClassA (TOOLTIPS_CLASSA, (HINSTANCE)NULL); + UnregisterClassA (TOOLTIPS_CLASSA, NULL); } diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index 9dc4e3bcb0e..a15fdee61d6 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -1737,5 +1737,5 @@ void TRACKBAR_Register (void) void TRACKBAR_Unregister (void) { - UnregisterClassW (TRACKBAR_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (TRACKBAR_CLASSW, NULL); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 448e5539715..c4e26e13bc7 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3541,7 +3541,7 @@ TREEVIEW_EditLabelA(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) 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 @@ TREEVIEW_EditLabelA(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) { DestroyWindow(hwndEdit); infoPtr->hwndEdit = 0; - return (HWND)NULL; + return NULL; } infoPtr->selectedItem = hItem; @@ -5412,7 +5412,7 @@ TREEVIEW_Register(void) VOID TREEVIEW_Unregister(void) { - UnregisterClassA(WC_TREEVIEWA, (HINSTANCE) NULL); + UnregisterClassA(WC_TREEVIEWA, NULL); } diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 3cff9ac57a1..1078e0ccdb0 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -966,5 +966,5 @@ void UPDOWN_Register(void) */ void UPDOWN_Unregister (void) { - UnregisterClassW (UPDOWN_CLASSW, (HINSTANCE)NULL); + UnregisterClassW (UPDOWN_CLASSW, NULL); } diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index 1ebdb7039ca..aaee3114e58 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -396,7 +396,7 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType) /* Initialize the dialog property */ fodInfos.DlgInfos.dwDlgProp = 0; - fodInfos.DlgInfos.hwndCustomDlg = (HWND)NULL; + fodInfos.DlgInfos.hwndCustomDlg = NULL; switch(iDlgType) { @@ -551,7 +551,7 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) } 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 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) 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 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) 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 @@ HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd) if( !(template = LockResource( fodInfos->ofnInfos->hInstance))) { COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE); - return (HWND)NULL; + return NULL; } } else @@ -718,13 +718,13 @@ HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd) 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 CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd) hwnd, FileOpenDlgProcUserTemplate, (LPARAM)fodInfos); return hChildDlg; } - return (HWND)NULL; + return NULL; } /*********************************************************************** diff --git a/dlls/ddraw/dsurface/dib.c b/dlls/ddraw/dsurface/dib.c index 6eec516af60..983af93eeda 100644 --- a/dlls/ddraw/dsurface/dib.c +++ b/dlls/ddraw/dsurface/dib.c @@ -218,7 +218,7 @@ HRESULT DIB_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl *This, 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 --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 9b91a702c51..275f1a62370 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -35,7 +35,7 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) { FIXME("(%p, %p): stub\n",hWnd,hIMC); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HIMC)NULL; + return NULL; } /*********************************************************************** @@ -71,7 +71,7 @@ HIMC WINAPI ImmCreateContext() { FIXME("(): stub\n"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HIMC)NULL; + return NULL; } /*********************************************************************** @@ -291,7 +291,7 @@ HIMC WINAPI ImmGetContext(HWND hWnd) { FIXME("(%p): stub\n", hWnd); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HIMC)NULL; + return NULL; } /*********************************************************************** @@ -344,7 +344,7 @@ HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd) { FIXME("(%p): stub\n", hWnd); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HWND)NULL; + return NULL; } /*********************************************************************** @@ -506,7 +506,7 @@ HKL WINAPI ImmInstallIMEA( debugstr_a(lpszIMEFileName), debugstr_a(lpszLayoutText) ); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HKL)NULL; + return NULL; } /*********************************************************************** @@ -519,7 +519,7 @@ HKL WINAPI ImmInstallIMEW( debugstr_w(lpszIMEFileName), debugstr_w(lpszLayoutText) ); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return (HKL)NULL; + return NULL; } /*********************************************************************** diff --git a/dlls/kernel/tests/alloc.c b/dlls/kernel/tests/alloc.c index 506daceacad..9c41c0c51a0 100644 --- a/dlls/kernel/tests/alloc.c +++ b/dlls/kernel/tests/alloc.c @@ -195,14 +195,14 @@ static void test_Global(void) 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 @@ static void test_Global(void) /* 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 @@ static void test_Global(void) /* 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 @@ static void test_Global(void) #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 @@ static void test_Local(void) /* 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 @@ static void test_Local(void) /* 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 @@ static void test_Local(void) #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 --git a/dlls/msacm/filter.c b/dlls/msacm/filter.c index 6be558687a5..638912503d7 100644 --- a/dlls/msacm/filter.c +++ b/dlls/msacm/filter.c @@ -100,7 +100,7 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, mmr = MMSYSERR_INVALPARAM; break; } - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { PWINE_ACMDRIVERID padid; mmr = ACMERR_NOTPOSSIBLE; @@ -298,7 +298,7 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd 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 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd break; case ACM_FILTERTAGDETAILSF_LARGESTSIZE: - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { ACMFILTERTAGDETAILSW tmp; DWORD ft = paftd->dwFilterTag; diff --git a/dlls/msacm/format.c b/dlls/msacm/format.c index a608d50b3e0..dd3b769db45 100644 --- a/dlls/msacm/format.c +++ b/dlls/msacm/format.c @@ -143,7 +143,7 @@ static BOOL MSACM_FillFormatTags(HWND hWnd) affd.hWnd = hWnd; affd.mode = WINE_ACMFF_TAG; - acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0); return TRUE; } @@ -166,7 +166,7 @@ static BOOL MSACM_FillFormat(HWND hWnd) CB_GETCURSEL, 0, 0), (DWORD)affd.szFormatTag); - acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0); return TRUE; } @@ -189,7 +189,7 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc) CB_GETCURSEL, 0, 0), (DWORD)affd.szFormatTag); - acmFormatTagEnumA((HACMDRIVER)0, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); return affd.ret; } @@ -332,7 +332,7 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD mmr = MMSYSERR_INVALPARAM; break; } - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { PWINE_ACMDRIVERID padid; mmr = ACMERR_NOTPOSSIBLE; @@ -552,7 +552,7 @@ MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc, 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 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd 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 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd 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 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd break; case ACM_FORMATTAGDETAILSF_LARGESTSIZE: - if (had == (HACMDRIVER)NULL) { + if (had == NULL) { ACMFORMATTAGDETAILSW tmp; DWORD ft = paftd->dwFormatTag; diff --git a/dlls/msacm/imaadp32/imaadp32.c b/dlls/msacm/imaadp32/imaadp32.c index 2592d1c1a58..a8117ffa52b 100644 --- a/dlls/msacm/imaadp32/imaadp32.c +++ b/dlls/msacm/imaadp32/imaadp32.c @@ -476,7 +476,7 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add) add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 2; /* PCM, IMA ADPCM */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = NULL; MultiByteToWideChar( CP_ACP, 0, "WINE-ADPCM", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine IMA ADPCM converter", -1, diff --git a/dlls/msacm/msacm32_main.c b/dlls/msacm/msacm32_main.c index 327b7099a4f..6b7b39bb590 100644 --- a/dlls/msacm/msacm32_main.c +++ b/dlls/msacm/msacm32_main.c @@ -52,7 +52,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) MSACM_UnregisterAllDrivers(); HeapDestroy(MSACM_hHeap); MSACM_hHeap = (HANDLE)NULL; - MSACM_hInstance32 = (HINSTANCE)NULL; + MSACM_hInstance32 = NULL; break; case DLL_THREAD_ATTACH: break; @@ -176,7 +176,7 @@ MMRESULT WINAPI acmMetrics(HACMOBJ hao, UINT uMetric, LPVOID pMetric) 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 --git a/dlls/msacm/msadp32/msadp32.c b/dlls/msacm/msadp32/msadp32.c index ce5d32b1e4b..a7a8c632a44 100644 --- a/dlls/msacm/msadp32/msadp32.c +++ b/dlls/msacm/msadp32/msadp32.c @@ -322,7 +322,7 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add) add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 2; /* PCM, MS ADPCM */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = NULL; 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 --git a/dlls/msacm/msg711/msg711.c b/dlls/msacm/msg711/msg711.c index 637eeb9ebba..18023ad2ca8 100644 --- a/dlls/msacm/msg711/msg711.c +++ b/dlls/msacm/msg711/msg711.c @@ -659,7 +659,7 @@ static LRESULT G711_DriverDetails(PACMDRIVERDETAILSW add) add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 3; /* PCM, G711 A-LAW & MU-LAW */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = NULL; MultiByteToWideChar( CP_ACP, 0, "WINE-G711", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine G711 converter", -1, diff --git a/dlls/msacm/pcmconverter.c b/dlls/msacm/pcmconverter.c index 891995f90f4..3ff546639b7 100644 --- a/dlls/msacm/pcmconverter.c +++ b/dlls/msacm/pcmconverter.c @@ -719,7 +719,7 @@ static LRESULT PCM_DriverDetails(PACMDRIVERDETAILSW add) add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CONVERTER; add->cFormatTags = 1; add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = NULL; MultiByteToWideChar( CP_ACP, 0, "WINE-PCM", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine PCM converter", -1, diff --git a/dlls/msacm/stream.c b/dlls/msacm/stream.c index 8e4c28e3e7c..498aa47174a 100644 --- a/dlls/msacm/stream.c +++ b/dlls/msacm/stream.c @@ -237,7 +237,7 @@ MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pw } errCleanUp: if (phas) - *phas = (HACMSTREAM)0; + *phas = NULL; HeapFree(MSACM_hHeap, 0, was); TRACE("=> (%d)\n", ret); return ret; diff --git a/dlls/msacm/winemp3/mpegl3.c b/dlls/msacm/winemp3/mpegl3.c index e475455531e..c0221f6073d 100644 --- a/dlls/msacm/winemp3/mpegl3.c +++ b/dlls/msacm/winemp3/mpegl3.c @@ -177,7 +177,7 @@ static LRESULT MPEG3_DriverDetails(PACMDRIVERDETAILSW add) add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC; add->cFormatTags = 2; /* PCM, MPEG3 */ add->cFilterTags = 0; - add->hicon = (HICON)0; + add->hicon = NULL; MultiByteToWideChar( CP_ACP, 0, "WINE-MPEG3", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine MPEG3 decoder", -1, diff --git a/dlls/msvideo/mciwnd.c b/dlls/msvideo/mciwnd.c index 9fcc4fb43b5..fded32419e3 100644 --- a/dlls/msvideo/mciwnd.c +++ b/dlls/msvideo/mciwnd.c @@ -101,7 +101,7 @@ HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, if (CreateWindowExA(0, "MCIWndClass", NULL, wndStyle, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwndParent, (HMENU)0, hInstance, mwi)) + hwndParent, NULL, hInstance, mwi)) return mwi->hWnd; if(mwi->lpName) HeapFree(GetProcessHeap(), 0, mwi->lpName); diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 75c2e5fb7ac..55406c41f1a 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -698,7 +698,7 @@ HANDLE VFWAPI ICImageDecompress( 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 @@ HANDLE VFWAPI ICImageDecompress( 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 @@ HANDLE VFWAPI ICImageDecompress( 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 @@ err: 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 --git a/dlls/ole32/ole2stubs.c b/dlls/ole32/ole2stubs.c index 6bc0312322f..b02761f6b84 100644 --- a/dlls/ole32/ole2stubs.c +++ b/dlls/ole32/ole2stubs.c @@ -153,7 +153,7 @@ HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel) { FIXME("(%p,%p,%x), stub!\n", rclsid, lpszLabel, fUseTypeAsLabel); - return (HGLOBAL)NULL; + return NULL; } /****************************************************************************** diff --git a/dlls/richedit/richedit.c b/dlls/richedit/richedit.c index d73ad8972ad..8232007589e 100644 --- a/dlls/richedit/richedit.c +++ b/dlls/richedit/richedit.c @@ -796,7 +796,7 @@ VOID RICHED32_Unregister(void) { TRACE("\n"); - UnregisterClassA(RICHEDIT_CLASS10A, (HINSTANCE)NULL); + UnregisterClassA(RICHEDIT_CLASS10A, NULL); } INT RICHEDIT_GetTextRange(HWND hwnd,TEXTRANGEA *tr) diff --git a/dlls/setupapi/virtcopy.c b/dlls/setupapi/virtcopy.c index dd91bec04b3..dd7575497ae 100644 --- a/dlls/setupapi/virtcopy.c +++ b/dlls/setupapi/virtcopy.c @@ -637,7 +637,7 @@ void VCP_UI_RegisterProgressClass(void) 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 --git a/dlls/shell32/control.c b/dlls/shell32/control.c index 39262a8395f..72ef303214e 100644 --- a/dlls/shell32/control.c +++ b/dlls/shell32/control.c @@ -275,7 +275,7 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst) WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hWnd, (HMENU)0, hInst, panel); + hWnd, NULL, hInst, panel); if (!panel->hWnd) return; while (GetMessageA(&msg, panel->hWnd, 0, 0)) { TranslateMessage(&msg); diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index e937f363680..e16c7d3afe9 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -122,7 +122,7 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar 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 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar { case IDOK : { - HWND htxt = (HWND)NULL ; + HWND htxt = NULL ; if ((ic = GetWindowTextLengthA (htxt = GetDlgItem (hwnd, 12298)))) { psz = malloc (ic + 2) ; @@ -195,8 +195,8 @@ INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar 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, diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index c61992ce0b4..291d9710bd7 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -329,7 +329,7 @@ static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2) { - return (HDDEDATA)0; + return NULL; } /****************************************************************** diff --git a/dlls/shlwapi/assoc.c b/dlls/shlwapi/assoc.c index d9abe9c5217..60a8fc4fc97 100644 --- a/dlls/shlwapi/assoc.c +++ b/dlls/shlwapi/assoc.c @@ -137,7 +137,7 @@ HRESULT WINAPI AssocQueryKeyW(ASSOCF flags, ASSOCKEY key, LPCWSTR pszAssoc, return E_OUTOFMEMORY; flags &= SHLWAPI_DEF_ASSOCF; - hRet = IQueryAssociations_Init(lpAssoc, flags, pszAssoc, (HKEY)0, (HWND)0); + hRet = IQueryAssociations_Init(lpAssoc, flags, pszAssoc, NULL, NULL); if (SUCCEEDED(hRet)) hRet = IQueryAssociations_GetKey(lpAssoc, flags, key, pszExtra, phkeyOut); @@ -204,7 +204,7 @@ HRESULT WINAPI AssocQueryStringW(ASSOCF flags, ASSOCSTR str, LPCWSTR pszAssoc, return E_OUTOFMEMORY; hRet = IQueryAssociations_Init(lpAssoc, flags & SHLWAPI_DEF_ASSOCF, - pszAssoc, (HKEY)0, (HWND)0); + pszAssoc, NULL, NULL); if (SUCCEEDED(hRet)) hRet = IQueryAssociations_GetString(lpAssoc, flags, str, pszExtra, @@ -291,7 +291,7 @@ HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF flags, ASSOCSTR str, HKEY hkAssoc, return E_OUTOFMEMORY; flags &= SHLWAPI_DEF_ASSOCF; - hRet = IQueryAssociations_Init(lpAssoc, flags, 0, hkAssoc, (HWND)0); + hRet = IQueryAssociations_Init(lpAssoc, flags, 0, hkAssoc, NULL); if (SUCCEEDED(hRet)) hRet = IQueryAssociations_GetString(lpAssoc, flags, str, pszExtra, diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 95c306e9054..e2217cdbf97 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -2220,7 +2220,7 @@ HICON WINAPI SHLWAPI_336(LPSHFILEOPSTRUCTW lpFileOp) 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", NULL); return pExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); } @@ -2336,7 +2336,7 @@ DWORD WINAPI SHLWAPI_364(LPCSTR src, LPSTR dst, INT n) HICON WINAPI SHLWAPI_370(HINSTANCE hInstance, LPCWSTR lpszExeFileName, UINT nIconIndex) { - GET_FUNC(pExtractIconW, shell32, "ExtractIconW", (HICON)0); + GET_FUNC(pExtractIconW, shell32, "ExtractIconW", NULL); return pExtractIconW(hInstance, lpszExeFileName, nIconIndex); } diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index 68a7b17c00f..d7c76cb8e6b 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -142,7 +142,7 @@ LONG WINAPI SHRegOpenUSKeyA( if ((ret1 != ERROR_SUCCESS) && (ret2 != ERROR_SUCCESS)) { HeapFree(GetProcessHeap(), 0, ihky); if (phNewUSKey) - *phNewUSKey = (HUSKEY)0; + *phNewUSKey = NULL; return ret2; } @@ -208,7 +208,7 @@ LONG WINAPI SHRegOpenUSKeyW( if ((ret1 != ERROR_SUCCESS) && (ret2 != ERROR_SUCCESS)) { HeapFree(GetProcessHeap(), 0, ihky); if (phNewUSKey) - *phNewUSKey = (HUSKEY)0; + *phNewUSKey = NULL; return ret2; } diff --git a/dlls/shlwapi/regstream.c b/dlls/shlwapi/regstream.c index 3f53744b91d..95113fb7184 100644 --- a/dlls/shlwapi/regstream.c +++ b/dlls/shlwapi/regstream.c @@ -325,7 +325,7 @@ static ISHRegStream rsDummyRegStream = { &DummyRegStreamVTable, 1, - (HKEY)0, + NULL, NULL, 0, 0 @@ -373,7 +373,7 @@ static IStream *IStream_Create(HKEY hKey, LPBYTE pbBuffer, DWORD dwLength) IStream * WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey, LPCSTR pszValue,DWORD dwMode) { - HKEY hStrKey = (HKEY)0; + HKEY hStrKey = NULL; LPBYTE lpBuff = NULL; DWORD dwLength, dwType; @@ -402,7 +402,7 @@ IStream * WINAPI SHOpenRegStream2A(HKEY hKey, LPCSTR pszSubkey, IStream * WINAPI SHOpenRegStream2W(HKEY hKey, LPCWSTR pszSubkey, LPCWSTR pszValue, DWORD dwMode) { - HKEY hStrKey = (HKEY)0; + HKEY hStrKey = NULL; LPBYTE lpBuff = NULL; DWORD dwLength, dwType; @@ -497,7 +497,7 @@ IStream * WINAPI SHLWAPI_12(LPBYTE lpbData, DWORD dwDataLen) if (lpbDup) { memcpy(lpbDup, lpbData, dwDataLen); - iStrmRet = IStream_Create((HKEY)0, lpbDup, dwDataLen); + iStrmRet = IStream_Create(NULL, lpbDup, dwDataLen); if (!iStrmRet) HeapFree(GetProcessHeap(), 0, lpbDup); @@ -536,7 +536,7 @@ HRESULT WINAPI SHCreateStreamWrapper(LPBYTE lpbData, DWORD dwDataLen, if(dwReserved || !lppStream) return E_INVALIDARG; - lpStream = IStream_Create((HKEY)0, lpbData, dwDataLen); + lpStream = IStream_Create(NULL, lpbData, dwDataLen); if(!lpStream) return E_OUTOFMEMORY; diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c index 829c848a458..c74b40a73ea 100644 --- a/dlls/shlwapi/tests/shreg.c +++ b/dlls/shlwapi/tests/shreg.c @@ -228,21 +228,21 @@ static void test_SHCopyKey(void) HKEY hKeySrc, hKeyDst; /* Delete existing destination sub keys */ - hKeyDst = (HKEY)0; + hKeyDst = NULL; if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) && hKeyDst) { SHDeleteKeyA(hKeyDst, NULL); RegCloseKey(hKeyDst); } - hKeyDst = (HKEY)0; + hKeyDst = NULL; if (RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) || !hKeyDst) { ok(0, "didn't open dest"); return; } - hKeySrc = (HKEY)0; + hKeySrc = NULL; if (RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc) || !hKeySrc) { ok(0, "didn't open source"); @@ -257,7 +257,7 @@ static void test_SHCopyKey(void) RegCloseKey(hKeyDst); /* Check we copied the sub keys, i.e. AeDebug from the default wine registry */ - hKeyDst = (HKEY)0; + hKeyDst = NULL; if (RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination\\AeDebug", &hKeyDst) || !hKeyDst) { ok(0, "didn't open copy"); diff --git a/dlls/ttydrv/bitmap.c b/dlls/ttydrv/bitmap.c index 2bb51f095ec..89366297897 100644 --- a/dlls/ttydrv/bitmap.c +++ b/dlls/ttydrv/bitmap.c @@ -59,7 +59,7 @@ HBITMAP TTYDRV_BITMAP_CreateDIBSection( FIXME("(%p, %p, %u, %p, %p, %ld): stub\n", physDev->hdc, bmi, usage, bits, section, offset); - return (HBITMAP) NULL; + return NULL; } /*********************************************************************** diff --git a/dlls/ttydrv/wnd.c b/dlls/ttydrv/wnd.c index 8a5a8ee8f0a..2c2387181ef 100644 --- a/dlls/ttydrv/wnd.c +++ b/dlls/ttydrv/wnd.c @@ -734,7 +734,7 @@ BOOL TTYDRV_ShowWindow( HWND hwnd, INT cmd ) * window is already the topmost window, it will not * activate it. */ - if (GetTopWindow((HWND)0)==hwnd && (wasVisible || GetActiveWindow() == hwnd)) + if (GetTopWindow(NULL)==hwnd && (wasVisible || GetActiveWindow() == hwnd)) swp |= SWP_NOACTIVATE; break; diff --git a/dlls/user/dde/client.c b/dlls/user/dde/client.c index 7c7227c2f1c..143ed827eeb 100644 --- a/dlls/user/dde/client.c +++ b/dlls/user/dde/client.c @@ -394,7 +394,7 @@ static WDML_QUEUE_STATE WDML_HandleAdviseReply(WDML_CONV* pConv, MSG* msg, WDML_ { TRACE("Returning FALSE on XTYP_ADVSTART - fAck was FALSE\n"); GlobalFree(pXAct->hMem); - pXAct->hDdeData = (HDDEDATA)0; + pXAct->hDdeData = NULL; } return WDML_QS_HANDLED; @@ -461,7 +461,7 @@ static WDML_QUEUE_STATE WDML_HandleUnadviseReply(WDML_CONV* pConv, MSG* msg, WDM if (!ddeAck.fAck) { TRACE("Returning FALSE on XTYP_ADVSTOP - fAck was FALSE\n"); - pXAct->hDdeData = (HDDEDATA)0; + pXAct->hDdeData = NULL; } else { diff --git a/dlls/user/dde/misc.c b/dlls/user/dde/misc.c index 756dd4eeead..784a02537c7 100644 --- a/dlls/user/dde/misc.c +++ b/dlls/user/dde/misc.c @@ -715,7 +715,7 @@ HDDEDATA WDML_InvokeCallback(WDML_INSTANCE* pInstance, UINT uType, UINT uFmt, H HDDEDATA ret; if (pInstance == NULL) - return (HDDEDATA)0; + return NULL; 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 @@ HSZ WDML_MakeHszFromAtom(WDML_INSTANCE* pInstance, ATOM atom) { WCHAR nameBuffer[MAX_BUFFER_LEN]; - if (!atom) return (HSZ)0; + if (!atom) return NULL; if (GlobalGetAtomNameW(atom, nameBuffer, MAX_BUFFER_LEN)) { diff --git a/dlls/user/dde/server.c b/dlls/user/dde/server.c index 3809e73f40d..ef432c956ed 100644 --- a/dlls/user/dde/server.c +++ b/dlls/user/dde/server.c @@ -174,7 +174,7 @@ HDDEDATA WINAPI DdeNameService(DWORD idInst, HSZ hsz1, HSZ hsz2, UINT afCmd) HWND hwndServer; WNDCLASSEXA wndclass; - hDdeData = (HDDEDATA)NULL; + hDdeData = NULL; TRACE("(%ld,%p,%p,%d)\n", idInst, hsz1, hsz2, afCmd); @@ -706,7 +706,7 @@ static WDML_QUEUE_STATE WDML_ServerHandleUnadvise(WDML_CONV* pConv, WDML_XACT* p { WDML_LINK* pLink; - if (pXAct->hszItem == (HSZ)0 || pXAct->wFmt == 0) + if (pXAct->hszItem == NULL || pXAct->wFmt == 0) { ERR("Unsupported yet options (null item or clipboard format)\n"); return WDML_QS_ERROR; diff --git a/dlls/user/resource.c b/dlls/user/resource.c index 2600339df25..56b5c7afa36 100644 --- a/dlls/user/resource.c +++ b/dlls/user/resource.c @@ -152,7 +152,7 @@ INT WINAPI CopyAcceleratorTableW(HACCEL src, LPACCEL dst, /* 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 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries) 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 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries) 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;icurcfg.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 = NULL; if (size != 100) { int w16b; /* number of bytes per row, aligned on word size */ @@ -417,7 +417,7 @@ HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONT* lf) HFONT hFont, hOldFont; int w, i, buf[256]; - if (!(hDC = GetDC(hWnd))) return (HFONT)0; + if (!(hDC = GetDC(hWnd))) return NULL; if (!(hFont = CreateFontIndirect(lf))) goto err1; hOldFont = SelectObject(hDC, hFont); @@ -469,7 +469,7 @@ HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONT* lf) err1: if (hDC) ReleaseDC(hWnd, hDC); - return (HFONT)0; + return NULL; } /****************************************************************** diff --git a/programs/winver/winver.c b/programs/winver/winver.c index 6eaa7caf554..8082dd504d3 100644 --- a/programs/winver/winver.c +++ b/programs/winver/winver.c @@ -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(NULL, PACKAGE_NAME, PACKAGE_STRING, 0); } /* Local Variables: */ diff --git a/windows/dialog.c b/windows/dialog.c index 3a8517a3b3b..893a211835f 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -1264,7 +1264,7 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval ) /* 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, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW); /* unblock dialog loop */ @@ -1811,7 +1811,7 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B 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 @@ static HWND DIALOG_GetNextTabItem( HWND hwndMain, HWND hwndDlg, HWND hwndCtrl, B hParent = GetParent(hParent); } if(!retWnd) - retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,(HWND)NULL,fPrevious ); + retWnd = DIALOG_GetNextTabItem(hwndMain,hwndMain,NULL,fPrevious ); } return retWnd; } diff --git a/windows/multimon.c b/windows/multimon.c index 895fe066d18..e909538228e 100644 --- a/windows/multimon.c +++ b/windows/multimon.c @@ -42,7 +42,7 @@ HMONITOR WINAPI MonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags) { return xPRIMARY_MONITOR; } - return (HMONITOR)0; + return NULL; } /*********************************************************************** @@ -58,7 +58,7 @@ HMONITOR WINAPI MonitorFromRect(LPRECT lprcScreenCoords, DWORD dwFlags) { return xPRIMARY_MONITOR; } - return (HMONITOR)0; + return NULL; } /*********************************************************************** @@ -78,7 +78,7 @@ HMONITOR WINAPI MonitorFromWindow(HWND hWnd, DWORD dwFlags) return MonitorFromRect(&wp.rcNormalPosition, dwFlags); } - return (HMONITOR)0; + return NULL; } /*********************************************************************** diff --git a/windows/painting.c b/windows/painting.c index e20f796887b..b1ac1c10b66 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -1305,8 +1305,8 @@ static BOOL PAINTING_DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM l /* 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 */