ole32: Remove some superfluous casts of void pointers and zero.
This commit is contained in:
parent
b7de266082
commit
095568dfe9
|
@ -414,7 +414,7 @@ HRESULT WINAPI OleSetClipboard(IDataObject* pDataObj)
|
|||
if (hDataObject==0)
|
||||
HANDLE_ERROR( E_OUTOFMEMORY );
|
||||
|
||||
ppDataObject = (OLEClipbrd**)GlobalLock(hDataObject);
|
||||
ppDataObject = GlobalLock(hDataObject);
|
||||
*ppDataObject = theOleClipboard;
|
||||
GlobalUnlock(hDataObject);
|
||||
|
||||
|
@ -958,7 +958,7 @@ static HRESULT OLEClipbrd_RenderFormat(IDataObject *pIDataObject, LPFORMATETC pF
|
|||
|
||||
if (SUCCEEDED(hr = IDataObject_GetData(theOleClipboard->pIDataObjectSrc, &fmt2, &std2)))
|
||||
{
|
||||
mfp = (METAFILEPICT *)GlobalLock(std2.u.hGlobal);
|
||||
mfp = GlobalLock(std2.u.hGlobal);
|
||||
}
|
||||
|
||||
if (mfp)
|
||||
|
|
|
@ -181,7 +181,7 @@ static HRESULT COMCAT_GetCategoryDesc(HKEY key, LCID lcid, PWCHAR pszDesc,
|
|||
FIXME("Simplified lcid comparison\n");
|
||||
return CAT_E_NODESCRIPTION;
|
||||
}
|
||||
pszDesc[size / sizeof(WCHAR)] = (WCHAR)0;
|
||||
pszDesc[size / sizeof(WCHAR)] = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ static HRESULT WINAPI COMCAT_ICatInformation_GetCategoryDesc(
|
|||
if (res != ERROR_SUCCESS) return CAT_E_CATIDNOEXIST;
|
||||
|
||||
/* Allocate a sensible amount of memory for the description. */
|
||||
*ppszDesc = (PWCHAR) CoTaskMemAlloc(128 * sizeof(WCHAR));
|
||||
*ppszDesc = CoTaskMemAlloc(128 * sizeof(WCHAR));
|
||||
if (*ppszDesc == NULL) {
|
||||
RegCloseKey(key);
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
|
@ -193,7 +193,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_QueryInterface(
|
|||
REFIID riid, /* [in] */
|
||||
void** ppvObject) /* [out][iid_is] (ptr to SEGPTR!) */
|
||||
{
|
||||
HGLOBALLockBytesImpl16* const This=(HGLOBALLockBytesImpl16*)MapSL((SEGPTR)iface);
|
||||
HGLOBALLockBytesImpl16* const This = MapSL((SEGPTR)iface);
|
||||
|
||||
TRACE("(%p,%s,%p)\n",iface,debugstr_guid(riid),ppvObject);
|
||||
/*
|
||||
|
|
|
@ -572,7 +572,7 @@ SEGPTR WINAPI CoMemAlloc(DWORD size, DWORD dwMemContext, DWORD x) {
|
|||
TRACE("(%d, 0x%08x, 0x%08x)\n", size, dwMemContext, x);
|
||||
hres = _xmalloc16(size, &segptr);
|
||||
if (hres != S_OK)
|
||||
return (SEGPTR)0;
|
||||
return 0;
|
||||
return segptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -1405,7 +1405,7 @@ static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lPar
|
|||
goto NEXTHOOK;
|
||||
|
||||
/* Get the menu descriptor */
|
||||
pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
|
||||
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
||||
if ( !pOleMenuDescriptor ) /* Bad descriptor! */
|
||||
goto NEXTHOOK;
|
||||
|
||||
|
@ -1524,7 +1524,7 @@ static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lPara
|
|||
}
|
||||
|
||||
/* Get the menu descriptor */
|
||||
pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
|
||||
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
||||
if ( !pOleMenuDescriptor ) /* Bad descriptor! */
|
||||
goto NEXTHOOK;
|
||||
|
||||
|
@ -1579,7 +1579,7 @@ HOLEMENU WINAPI OleCreateMenuDescriptor(
|
|||
sizeof(OleMenuDescriptor) ) ) )
|
||||
return 0;
|
||||
|
||||
pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
|
||||
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
||||
if ( !pOleMenuDescriptor )
|
||||
return 0;
|
||||
|
||||
|
@ -1664,7 +1664,7 @@ HRESULT WINAPI OleSetMenuDescriptor(
|
|||
return E_FAIL;
|
||||
|
||||
/* Get the menu descriptor */
|
||||
pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
|
||||
pOleMenuDescriptor = GlobalLock( hOleMenu );
|
||||
if ( !pOleMenuDescriptor )
|
||||
return E_UNEXPECTED;
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ HGLOBAL16 WINAPI OleMetaFilePictFromIconAndLabel16(
|
|||
hmf = CloseMetaFile(hdc);
|
||||
|
||||
hmf16 = GlobalAlloc16(0, sizeof(METAFILEPICT16));
|
||||
mf16 = (METAFILEPICT16 *)GlobalLock16(hmf16);
|
||||
mf16 = GlobalLock16(hmf16);
|
||||
mf16->mm = MM_ANISOTROPIC;
|
||||
mf16->xExt = 20; /* FIXME: bogus */
|
||||
mf16->yExt = 20; /* ditto */
|
||||
|
|
|
@ -2052,7 +2052,7 @@ static void test_freethreadedmarshaldata(IStream *pStream, MSHCTX mshctx, void *
|
|||
|
||||
size = GlobalSize(hglobal);
|
||||
|
||||
marshal_data = (char *)GlobalLock(hglobal);
|
||||
marshal_data = GlobalLock(hglobal);
|
||||
|
||||
if (mshctx == MSHCTX_INPROC)
|
||||
{
|
||||
|
|
|
@ -364,7 +364,7 @@ Moniker_GetDisplayName(IMoniker* iface, IBindCtx* pbc,
|
|||
{
|
||||
static const WCHAR wszDisplayName[] = {'*','*','G','e','m','m','a',0};
|
||||
CHECK_EXPECTED_METHOD("Moniker_GetDisplayName");
|
||||
*ppszDisplayName = (LPOLESTR)CoTaskMemAlloc(sizeof(wszDisplayName));
|
||||
*ppszDisplayName = CoTaskMemAlloc(sizeof(wszDisplayName));
|
||||
memcpy(*ppszDisplayName, wszDisplayName, sizeof(wszDisplayName));
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue