Removed unnecessary HANDLE typecasts.

This commit is contained in:
Francois Gouget 2002-12-02 18:10:57 +00:00 committed by Alexandre Julliard
parent 0a6c272766
commit d2667a4ce3
72 changed files with 207 additions and 208 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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,

View File

@ -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;
}

View File

@ -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 */

View File

@ -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);

View File

@ -950,5 +950,5 @@ void ANIMATE_Register(void)
void ANIMATE_Unregister(void)
{
UnregisterClassA(ANIMATE_CLASSA, (HINSTANCE)NULL);
UnregisterClassA(ANIMATE_CLASSA, NULL);
}

View File

@ -2285,5 +2285,5 @@ void COMBOEX_Register (void)
void COMBOEX_Unregister (void)
{
UnregisterClassW (WC_COMBOBOXEXW, (HINSTANCE)NULL);
UnregisterClassW (WC_COMBOBOXEXW, NULL);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -251,5 +251,5 @@ FLATSB_Register (void)
VOID
FLATSB_Unregister (void)
{
UnregisterClassA (FLATSB_CLASSA, (HINSTANCE)NULL);
UnregisterClassA (FLATSB_CLASSA, NULL);
}

View File

@ -1799,5 +1799,5 @@ HEADER_Register (void)
VOID
HEADER_Unregister (void)
{
UnregisterClassA (WC_HEADERA, (HINSTANCE)NULL);
UnregisterClassA (WC_HEADERA, NULL);
}

View File

@ -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);
}

View File

@ -569,5 +569,5 @@ void IPADDRESS_Register (void)
void IPADDRESS_Unregister (void)
{
UnregisterClassW (WC_IPADDRESSW, (HINSTANCE)NULL);
UnregisterClassW (WC_IPADDRESSW, NULL);
}

View File

@ -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);
}
/***

View File

@ -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);
}

View File

@ -131,6 +131,5 @@ NATIVEFONT_Register (void)
VOID
NATIVEFONT_Unregister (void)
{
UnregisterClassA (WC_NATIVEFONTCTLA, (HINSTANCE)NULL);
UnregisterClassA (WC_NATIVEFONTCTLA, NULL);
}

View File

@ -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);
}

View File

@ -430,5 +430,5 @@ VOID PROGRESS_Register (void)
*/
VOID PROGRESS_Unregister (void)
{
UnregisterClassW (PROGRESS_CLASSW, (HINSTANCE)NULL);
UnregisterClassW (PROGRESS_CLASSW, NULL);
}

View File

@ -4509,5 +4509,5 @@ REBAR_Register (void)
VOID
REBAR_Unregister (void)
{
UnregisterClassA (REBARCLASSNAMEA, (HINSTANCE)NULL);
UnregisterClassA (REBARCLASSNAMEA, NULL);
}

View File

@ -1280,5 +1280,5 @@ STATUS_Register (void)
void
STATUS_Unregister (void)
{
UnregisterClassW (STATUSCLASSNAMEW, (HINSTANCE)NULL);
UnregisterClassW (STATUSCLASSNAMEW, NULL);
}

View File

@ -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);
}

View File

@ -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)

View File

@ -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);
}

View File

@ -1737,5 +1737,5 @@ void TRACKBAR_Register (void)
void TRACKBAR_Unregister (void)
{
UnregisterClassW (TRACKBAR_CLASSW, (HINSTANCE)NULL);
UnregisterClassW (TRACKBAR_CLASSW, NULL);
}

View File

@ -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);
}

View File

@ -966,5 +966,5 @@ void UPDOWN_Register(void)
*/
void UPDOWN_Unregister (void)
{
UnregisterClassW (UPDOWN_CLASSW, (HINSTANCE)NULL);
UnregisterClassW (UPDOWN_CLASSW, NULL);
}

View File

@ -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;
}
/***********************************************************************

View File

@ -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;

View File

@ -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;
}
/***********************************************************************

View File

@ -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");
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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++) {

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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;

View File

@ -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;
}
/******************************************************************************

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

@ -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,

View File

@ -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;
}
/******************************************************************

View File

@ -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,

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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");

View File

@ -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;
}
/***********************************************************************

View File

@ -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;

View File

@ -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
{

View File

@ -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))
{

View File

@ -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;

View File

@ -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;i<cEntries;i++) {
@ -255,7 +255,7 @@ HACCEL WINAPI CreateAcceleratorTableW(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");
@ -268,7 +268,7 @@ HACCEL WINAPI CreateAcceleratorTableW(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));

View File

@ -122,7 +122,7 @@ static DirectDrawCreateProc pDirectDrawCreate;
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.

View File

@ -1265,7 +1265,7 @@ BOOL X11DRV_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;

View File

@ -1182,7 +1182,7 @@ static BOOL PATH_PathToRegion(GdiPath *pPath, INT nPolyFillMode,
/* Free memory for number-of-points-in-stroke array */
HeapFree( GetProcessHeap(), 0, pNumPointsInStroke );
if(hrgn==(HRGN)0)
if(hrgn==NULL)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;

View File

@ -1609,9 +1609,9 @@ BOOL WINAPI EnumEnhMetaFile(
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)

View File

@ -150,7 +150,7 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL
{
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 = 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;
}
/******************************************************************

View File

@ -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: */

View File

@ -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;
}

View File

@ -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;
}
/***********************************************************************

View File

@ -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 */