shlwapi: Remove superfluous pointer casts.
This commit is contained in:
parent
c0a9281c1e
commit
08e3742f37
|
@ -455,7 +455,7 @@ static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
|
||||||
if (IsEqualIID(riid, &IID_IUnknown) ||
|
if (IsEqualIID(riid, &IID_IUnknown) ||
|
||||||
IsEqualIID(riid, &IID_IQueryAssociations))
|
IsEqualIID(riid, &IID_IQueryAssociations))
|
||||||
{
|
{
|
||||||
*ppvObj = (IQueryAssociations*)This;
|
*ppvObj = This;
|
||||||
|
|
||||||
IQueryAssociations_AddRef((IQueryAssociations*)*ppvObj);
|
IQueryAssociations_AddRef((IQueryAssociations*)*ppvObj);
|
||||||
TRACE("Returning IQueryAssociations (%p)\n", *ppvObj);
|
TRACE("Returning IQueryAssociations (%p)\n", *ppvObj);
|
||||||
|
|
|
@ -173,7 +173,7 @@ INT_PTR WINAPI SHMessageBoxCheckExW(HWND hWnd, HINSTANCE hInst, LPCWSTR lpszName
|
||||||
d.dlgProc = dlgProc;
|
d.dlgProc = dlgProc;
|
||||||
d.lParam = lParam;
|
d.lParam = lParam;
|
||||||
d.lpszId = lpszId;
|
d.lpszId = lpszId;
|
||||||
return DialogBoxParamW(hInst, (LPCWSTR)lpszName, hWnd, SHDlgProcEx, (LPARAM)&d);
|
return DialogBoxParamW(hInst, lpszName, hWnd, SHDlgProcEx, (LPARAM)&d);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Data held by each shlwapi message box */
|
/* Data held by each shlwapi message box */
|
||||||
|
|
|
@ -1250,12 +1250,10 @@ BOOL WINAPI SHIsSameObject(IUnknown* lpInt1, IUnknown* lpInt2)
|
||||||
if (lpInt1 == lpInt2)
|
if (lpInt1 == lpInt2)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (FAILED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown,
|
if (FAILED(IUnknown_QueryInterface(lpInt1, &IID_IUnknown, &lpUnknown1)))
|
||||||
(LPVOID *)&lpUnknown1)))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (FAILED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown,
|
if (FAILED(IUnknown_QueryInterface(lpInt2, &IID_IUnknown, &lpUnknown2)))
|
||||||
(LPVOID *)&lpUnknown2)))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (lpUnknown1 == lpUnknown2)
|
if (lpUnknown1 == lpUnknown2)
|
||||||
|
@ -2236,7 +2234,7 @@ HRESULT WINAPI QISearch(
|
||||||
if (IsEqualIID(riid, xmove->refid)) {
|
if (IsEqualIID(riid, xmove->refid)) {
|
||||||
a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
|
a_vtbl = (IUnknown*)(xmove->indx + (LPBYTE)w);
|
||||||
TRACE("matched, returning (%p)\n", a_vtbl);
|
TRACE("matched, returning (%p)\n", a_vtbl);
|
||||||
*ppv = (LPVOID)a_vtbl;
|
*ppv = a_vtbl;
|
||||||
IUnknown_AddRef(a_vtbl);
|
IUnknown_AddRef(a_vtbl);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -2246,7 +2244,7 @@ HRESULT WINAPI QISearch(
|
||||||
if (IsEqualIID(riid, &IID_IUnknown)) {
|
if (IsEqualIID(riid, &IID_IUnknown)) {
|
||||||
a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
|
a_vtbl = (IUnknown*)(x->indx + (LPBYTE)w);
|
||||||
TRACE("returning first for IUnknown (%p)\n", a_vtbl);
|
TRACE("returning first for IUnknown (%p)\n", a_vtbl);
|
||||||
*ppv = (LPVOID)a_vtbl;
|
*ppv = a_vtbl;
|
||||||
IUnknown_AddRef(a_vtbl);
|
IUnknown_AddRef(a_vtbl);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -2539,7 +2537,7 @@ DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpVal
|
||||||
if (retval != ERROR_SUCCESS)
|
if (retval != ERROR_SUCCESS)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
SHGetValueW(hKey, lpSubName, lpValue, NULL, (LPBYTE)&retval, &datsize);
|
SHGetValueW(hKey, lpSubName, lpValue, NULL, &retval, &datsize);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -2618,7 +2616,7 @@ HRESULT WINAPI SHWeakQueryInterface(
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
if(pUnk && pInner) {
|
if(pUnk && pInner) {
|
||||||
hret = IUnknown_QueryInterface(pInner, riid, (LPVOID*)ppv);
|
hret = IUnknown_QueryInterface(pInner, riid, ppv);
|
||||||
if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
|
if (SUCCEEDED(hret)) IUnknown_Release(pUnk);
|
||||||
}
|
}
|
||||||
TRACE("-- 0x%08x\n", hret);
|
TRACE("-- 0x%08x\n", hret);
|
||||||
|
@ -4167,7 +4165,7 @@ BOOL WINAPI SHSkipJunction(IBindCtx *pbc, const CLSID *pclsid)
|
||||||
{
|
{
|
||||||
IUnknown* lpUnk;
|
IUnknown* lpUnk;
|
||||||
|
|
||||||
if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, (LPOLESTR)szSkipBinding, &lpUnk)))
|
if (SUCCEEDED(IBindCtx_GetObjectParam(pbc, szSkipBinding, &lpUnk)))
|
||||||
{
|
{
|
||||||
CLSID clsid;
|
CLSID clsid;
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSK
|
||||||
LONG WINAPI SHRegCloseUSKey(
|
LONG WINAPI SHRegCloseUSKey(
|
||||||
HUSKEY hUSKey) /* [I] Key to close */
|
HUSKEY hUSKey) /* [I] Key to close */
|
||||||
{
|
{
|
||||||
LPSHUSKEY hKey = (LPSHUSKEY)hUSKey;
|
LPSHUSKEY hKey = hUSKey;
|
||||||
LONG ret = ERROR_SUCCESS;
|
LONG ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
if (hKey->HKCUkey)
|
if (hKey->HKCUkey)
|
||||||
|
@ -393,8 +393,8 @@ LONG WINAPI SHRegQueryUSValueA(
|
||||||
if (ret != ERROR_SUCCESS) {
|
if (ret != ERROR_SUCCESS) {
|
||||||
if (pvDefaultData && (dwDefaultDataSize != 0)) {
|
if (pvDefaultData && (dwDefaultDataSize != 0)) {
|
||||||
maxmove = (dwDefaultDataSize >= *pcbData) ? *pcbData : dwDefaultDataSize;
|
maxmove = (dwDefaultDataSize >= *pcbData) ? *pcbData : dwDefaultDataSize;
|
||||||
src = (CHAR*)pvDefaultData;
|
src = pvDefaultData;
|
||||||
dst = (CHAR*)pvData;
|
dst = pvData;
|
||||||
for(i=0; i<maxmove; i++) *dst++ = *src++;
|
for(i=0; i<maxmove; i++) *dst++ = *src++;
|
||||||
*pcbData = maxmove;
|
*pcbData = maxmove;
|
||||||
TRACE("setting default data\n");
|
TRACE("setting default data\n");
|
||||||
|
@ -444,8 +444,8 @@ LONG WINAPI SHRegQueryUSValueW(
|
||||||
if (ret != ERROR_SUCCESS) {
|
if (ret != ERROR_SUCCESS) {
|
||||||
if (pvDefaultData && (dwDefaultDataSize != 0)) {
|
if (pvDefaultData && (dwDefaultDataSize != 0)) {
|
||||||
maxmove = (dwDefaultDataSize >= *pcbData) ? *pcbData : dwDefaultDataSize;
|
maxmove = (dwDefaultDataSize >= *pcbData) ? *pcbData : dwDefaultDataSize;
|
||||||
src = (CHAR*)pvDefaultData;
|
src = pvDefaultData;
|
||||||
dst = (CHAR*)pvData;
|
dst = pvData;
|
||||||
for(i=0; i<maxmove; i++) *dst++ = *src++;
|
for(i=0; i<maxmove; i++) *dst++ = *src++;
|
||||||
*pcbData = maxmove;
|
*pcbData = maxmove;
|
||||||
TRACE("setting default data\n");
|
TRACE("setting default data\n");
|
||||||
|
@ -934,7 +934,7 @@ LONG WINAPI SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, DWORD dwType,
|
||||||
LPVOID pvData, DWORD cbData, DWORD dwFlags)
|
LPVOID pvData, DWORD cbData, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
DWORD dummy;
|
DWORD dummy;
|
||||||
LPSHUSKEY hKey = (LPSHUSKEY)hUSKey;
|
LPSHUSKEY hKey = hUSKey;
|
||||||
LONG ret = ERROR_SUCCESS;
|
LONG ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
TRACE("(%p,%s,%d,%p,%d,%d)\n", hUSKey, debugstr_w(pszValue),
|
TRACE("(%p,%s,%d,%p,%d,%d)\n", hUSKey, debugstr_w(pszValue),
|
||||||
|
@ -2242,7 +2242,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSrcSubKey, HKEY hKeyDst, DWORD
|
||||||
DWORD dwKeyCount = 0, dwValueCount = 0, dwMaxKeyLen = 0;
|
DWORD dwKeyCount = 0, dwValueCount = 0, dwMaxKeyLen = 0;
|
||||||
DWORD dwMaxValueLen = 0, dwMaxDataLen = 0, i;
|
DWORD dwMaxValueLen = 0, dwMaxDataLen = 0, i;
|
||||||
BYTE buff[1024];
|
BYTE buff[1024];
|
||||||
LPVOID lpBuff = (LPVOID)buff;
|
LPVOID lpBuff = buff;
|
||||||
WCHAR szName[MAX_PATH], *lpszName = szName;
|
WCHAR szName[MAX_PATH], *lpszName = szName;
|
||||||
DWORD dwRet = S_OK;
|
DWORD dwRet = S_OK;
|
||||||
|
|
||||||
|
|
|
@ -1342,7 +1342,7 @@ HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, U
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRRET_CSTR:
|
case STRRET_CSTR:
|
||||||
lstrcpynA((LPSTR)dest, src->u.cStr, len);
|
lstrcpynA(dest, src->u.cStr, len);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STRRET_OFFSET:
|
case STRRET_OFFSET:
|
||||||
|
@ -1381,7 +1381,7 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
|
||||||
switch (src->uType)
|
switch (src->uType)
|
||||||
{
|
{
|
||||||
case STRRET_WSTR:
|
case STRRET_WSTR:
|
||||||
lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
|
lstrcpynW(dest, src->u.pOleStr, len);
|
||||||
CoTaskMemFree(src->u.pOleStr);
|
CoTaskMemFree(src->u.pOleStr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ static HRESULT WINAPI Read(_IDummyStream* This, LPVOID lpMem, ULONG ulSize,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char* buff = (char*)lpMem;
|
char* buff = lpMem;
|
||||||
|
|
||||||
/* Read item data */
|
/* Read item data */
|
||||||
if (!This->item->ulSize)
|
if (!This->item->ulSize)
|
||||||
|
|
|
@ -229,7 +229,7 @@ static void test_alloc_shared(void)
|
||||||
hmem=pSHAllocShared(&val,4,procid);
|
hmem=pSHAllocShared(&val,4,procid);
|
||||||
ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError());
|
ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError());
|
||||||
|
|
||||||
p=(int*)pSHLockShared(hmem,procid);
|
p=pSHLockShared(hmem,procid);
|
||||||
ok(p!=NULL,"SHLockShared failed: %u\n", GetLastError());
|
ok(p!=NULL,"SHLockShared failed: %u\n", GetLastError());
|
||||||
if (p!=NULL)
|
if (p!=NULL)
|
||||||
ok(*p==val,"Wrong value in shared memory: %d instead of %d\n",*p,val);
|
ok(*p==val,"Wrong value in shared memory: %d instead of %d\n",*p,val);
|
||||||
|
|
Loading…
Reference in New Issue