Commit 6c54ad3d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Remove superfluous pointer casts.

parent 8324ed6c
......@@ -109,7 +109,7 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
return 0;
}
response = (struct appbar_response*)return_view;
response = return_view;
ret = response->result;
*data = response->abd;
......
......@@ -167,7 +167,7 @@ static HRESULT WINAPI IAutoComplete2_fnQueryInterface(
IsEqualIID(riid, &IID_IAutoComplete) ||
IsEqualIID(riid, &IID_IAutoComplete2))
{
*ppvObj = (IAutoComplete2*)This;
*ppvObj = This;
}
else if (IsEqualIID(riid, &IID_IAutoCompleteDropDown))
{
......@@ -483,9 +483,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
}
return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
case WM_KEYUP:
GetWindowTextW( hwnd, (LPWSTR)hwndText, 255);
GetWindowTextW( hwnd, hwndText, 255);
switch(wParam) {
case VK_RETURN:
/* If quickComplete is set and control is pressed, replace the string */
......
......@@ -686,7 +686,7 @@ static BOOL BrsFolder_OnCommand( browse_info *info, UINT id )
static BOOL BrsFolder_OnSetExpanded(browse_info *info, LPVOID selection,
BOOL is_str, HTREEITEM *pItem)
{
LPITEMIDLIST pidlSelection = (LPITEMIDLIST)selection;
LPITEMIDLIST pidlSelection = selection;
LPCITEMIDLIST pidlCurrent, pidlRoot;
TVITEMEXW item;
BOOL bResult = FALSE;
......@@ -701,7 +701,7 @@ static BOOL BrsFolder_OnSetExpanded(browse_info *info, LPVOID selection,
goto done;
hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL,
(LPOLESTR)selection, NULL, &pidlSelection, NULL);
selection, NULL, &pidlSelection, NULL);
IShellFolder_Release(psfDesktop);
if (FAILED(hr))
goto done;
......@@ -751,7 +751,7 @@ static BOOL BrsFolder_OnSetExpanded(browse_info *info, LPVOID selection,
bResult = TRUE;
done:
if (pidlSelection && pidlSelection != (LPITEMIDLIST)selection)
if (pidlSelection && pidlSelection != selection)
ILFree(pidlSelection);
if (pItem)
......@@ -777,10 +777,10 @@ static BOOL BrsFolder_OnSetSelectionA(browse_info *info, LPVOID selection, BOOL
if (!is_str)
return BrsFolder_OnSetSelectionW(info, selection, is_str);
if ((length = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, NULL, 0)) &&
if ((length = MultiByteToWideChar(CP_ACP, 0, selection, -1, NULL, 0)) &&
(selectionW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR))) &&
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)selection, -1, selectionW, length))
MultiByteToWideChar(CP_ACP, 0, selection, -1, selectionW, length))
{
result = BrsFolder_OnSetSelectionW(info, selectionW, is_str);
}
......
......@@ -135,7 +135,7 @@ static LPNOTIFICATIONLIST FindNode( HANDLE hitem )
{
LPNOTIFICATIONLIST ptr;
for( ptr = head; ptr; ptr = ptr->next )
if( ptr == (LPNOTIFICATIONLIST) hitem )
if( ptr == hitem )
return ptr;
return NULL;
}
......@@ -315,16 +315,16 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
switch (typeFlag)
{
case SHCNF_PATHA:
if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1);
if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2);
if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA(dwItem1);
if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA(dwItem2);
break;
case SHCNF_PATHW:
if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1);
if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2);
if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW(dwItem1);
if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW(dwItem2);
break;
case SHCNF_IDLIST:
Pidls[0] = (LPCITEMIDLIST)dwItem1;
Pidls[1] = (LPCITEMIDLIST)dwItem2;
Pidls[0] = dwItem1;
Pidls[1] = dwItem2;
break;
case SHCNF_PRINTERA:
case SHCNF_PRINTERW:
......@@ -458,7 +458,7 @@ HANDLE WINAPI SHChangeNotification_Lock(
/* LeaveCriticalSection(&SHELL32_ChangenotifyCS); */
return (HANDLE) node;
return node;
}
/*************************************************************************
......
......@@ -244,9 +244,9 @@ static BOOL Control_CreateListView (CPanel *panel)
static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs)
{
CPanel* panel = (CPanel*)cs->lpCreateParams;
CPanel* panel = cs->lpCreateParams;
HMENU hMenu, hSubMenu;
CPlApplet* applet;
CPlApplet* applet;
MENUITEMINFOW mii;
unsigned int i;
int menucount, index;
......@@ -292,7 +292,7 @@ static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs)
if (!item)
continue;
item->applet = (CPlApplet *) applet;
item->applet = applet;
item->id = i;
mii.cbSize = sizeof(MENUITEMINFOW);
......
......@@ -205,7 +205,7 @@ static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface)
if (!refCount) {
TRACE("-- destroying IShellFolder(%p)\n", This);
SHFree(This->pidlRoot);
LocalFree((HLOCAL) This);
LocalFree(This);
}
return refCount;
}
......
......@@ -64,7 +64,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(
}
else if(IsEqualIID(riid, &IID_IEnumFORMATETC))
{
*ppvObj = (IEnumFORMATETC*)This;
*ppvObj = This;
}
if(*ppvObj)
......@@ -232,7 +232,7 @@ static HRESULT WINAPI IDataObject_fnQueryInterface(LPDATAOBJECT iface, REFIID ri
}
else if(IsEqualIID(riid, &IID_IDataObject)) /*IDataObject*/
{
*ppvObj = (IDataObject*)This;
*ppvObj = This;
}
if(*ppvObj)
......
......@@ -82,21 +82,21 @@ LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
return (LPSTR)pdata->u.drive.szDriveName;
return pdata->u.drive.szDriveName;
case PT_FOLDER:
case PT_FOLDER1:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
return (LPSTR)pdata->u.file.szNames;
return pdata->u.file.szNames;
case PT_WORKGRP:
case PT_COMP:
case PT_NETWORK:
case PT_NETPROVIDER:
case PT_SHARE:
return (LPSTR)pdata->u.network.szNames;
return pdata->u.network.szNames;
}
}
return NULL;
......@@ -160,10 +160,10 @@ LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1);
return pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1;
case PT_WORKGRP:
return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1);
return pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1;
}
}
return NULL;
......
......@@ -128,8 +128,8 @@ static ULONG WINAPI IDropTargetHelper_fnRelease (IDropTargetHelper * iface)
TRACE ("(%p)->(count=%u)\n", This, refCount + 1);
if (!refCount) {
TRACE("-- destroying (%p)\n", This);
LocalFree ((HLOCAL) This);
TRACE ("-- destroying (%p)\n", This);
LocalFree (This);
return 0;
}
return refCount;
......
......@@ -224,7 +224,7 @@ static HRESULT WINAPI IEnumIDList_fnQueryInterface(
{ *ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/
{ *ppvObj = (IEnumIDList*)This;
{ *ppvObj = This;
}
if(*ppvObj)
......
......@@ -108,15 +108,15 @@ static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFII
}
else if (IsEqualIID(riid, &IID_IPersistFile)) /*IExtractIcon*/
{
*ppvObj = (IPersistFile*)&(This->lpvtblPersistFile);
*ppvObj = &This->lpvtblPersistFile;
}
else if (IsEqualIID(riid, &IID_IExtractIconA)) /*IExtractIcon*/
{
*ppvObj = (IExtractIconA*)&(This->lpvtblExtractIconA);
*ppvObj = &This->lpvtblExtractIconA;
}
else if (IsEqualIID(riid, &IID_IExtractIconW)) /*IExtractIcon*/
{
*ppvObj = (IExtractIconW*)This;
*ppvObj = This;
}
if(*ppvObj)
......
......@@ -77,8 +77,9 @@ static CRITICAL_SECTION SHELL32_SicCS = { &critsect_debug, -1, 0, 0, 0, 0 };
* Callback for DPA_Search
*/
static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam)
{ LPSIC_ENTRY e1 = (LPSIC_ENTRY)p1, e2 = (LPSIC_ENTRY)p2;
{
LPSIC_ENTRY e1 = p1, e2 = p2;
TRACE("%p %p %8lx\n", p1, p2, lparam);
/* Icons in the cache are keyed by the name of the file they are
......
......@@ -299,7 +299,7 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
IStream_AddRef (pStream);
if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead)))
if (SUCCEEDED(IStream_Read(pStream, &wLen, 2, &dwBytesRead)))
{
TRACE("PIDL length is %d\n", wLen);
if (wLen != 0)
......@@ -354,7 +354,7 @@ HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl)
wLen = ILGetSize(pPidl);
if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL)))
if (SUCCEEDED(IStream_Write(pStream, &wLen, 2, NULL)))
{
if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL)))
ret = S_OK;
......@@ -1977,21 +1977,21 @@ LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
return (LPSTR)pdata->u.drive.szDriveName;
return pdata->u.drive.szDriveName;
case PT_FOLDER:
case PT_FOLDER1:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
return (LPSTR)pdata->u.file.szNames;
return pdata->u.file.szNames;
case PT_WORKGRP:
case PT_COMP:
case PT_NETWORK:
case PT_NETPROVIDER:
case PT_SHARE:
return (LPSTR)pdata->u.network.szNames;
return pdata->u.network.szNames;
}
return NULL;
}
......@@ -2015,10 +2015,10 @@ static LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl)
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1);
return pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1;
case PT_WORKGRP:
return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1);
return pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1;
}
return NULL;
}
......
......@@ -311,7 +311,7 @@ static ULONG ShellLink_Release( IShellLinkImpl *This )
if (This->pPidl)
ILFree(This->pPidl);
LocalFree((HANDLE)This);
LocalFree(This);
return 0;
}
......@@ -585,20 +585,20 @@ static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr )
/* convert to unicode if necessary */
if( !unicode )
{
count = MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, NULL, 0 );
count = MultiByteToWideChar( CP_ACP, 0, temp, len, NULL, 0 );
str = HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) );
if( !str )
{
HeapFree( GetProcessHeap(), 0, temp );
return E_OUTOFMEMORY;
}
MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count );
MultiByteToWideChar( CP_ACP, 0, temp, len, str, count );
HeapFree( GetProcessHeap(), 0, temp );
}
else
{
count /= 2;
str = (LPWSTR) temp;
str = temp;
}
str[count] = 0;
......@@ -637,7 +637,7 @@ static HRESULT Stream_ReadChunk( IStream* stm, LPVOID *data )
TRACE("Read %d bytes\n",chunk->size);
*data = (LPVOID) chunk;
*data = chunk;
return S_OK;
}
......@@ -1308,7 +1308,7 @@ HRESULT WINAPI IShellLink_ConstructFromFile( IUnknown* pUnkOuter, REFIID riid,
hr = E_FAIL;
if (SUCCEEDED(hr))
*ppv = (IUnknown*) psl;
*ppv = psl;
IPersistFile_Release(ppf);
}
......
......@@ -518,7 +518,7 @@ void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
void WINAPI DragFinish(HDROP h)
{
TRACE("\n");
GlobalFree((HGLOBAL)h);
GlobalFree(h);
}
/*************************************************************************
......
......@@ -382,7 +382,7 @@ int WINAPIV ShellMessageBoxW(
__ms_va_end(args);
ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType);
LocalFree((HLOCAL)pszTemp);
LocalFree(pszTemp);
return ret;
}
......@@ -440,7 +440,7 @@ int WINAPIV ShellMessageBoxA(
__ms_va_end(args);
ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType);
LocalFree((HLOCAL)pszTemp);
LocalFree(pszTemp);
return ret;
}
......@@ -663,7 +663,7 @@ static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPCSTR doc_name, LPCSTR n
/* Add the new entry into the MRU list
*/
return AddMRUData(mruhandle, (LPCVOID)buffer, *len);
return AddMRUData(mruhandle, buffer, *len);
}
/*************************************************************************
......@@ -814,15 +814,15 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
switch (uFlags)
{
case SHARD_PIDL:
SHGetPathFromIDListA((LPCITEMIDLIST) pv, doc_name);
SHGetPathFromIDListA(pv, doc_name);
break;
case SHARD_PATHA:
lstrcpynA(doc_name, (LPCSTR)pv, MAX_PATH);
lstrcpynA(doc_name, pv, MAX_PATH);
break;
case SHARD_PATHW:
WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)pv, -1, doc_name, MAX_PATH, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, pv, -1, doc_name, MAX_PATH, NULL, NULL);
break;
default:
......@@ -970,9 +970,9 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
/* Set the document path or pidl */
if (uFlags == SHARD_PIDL) {
hres = IShellLinkA_SetIDList(psl, (LPCITEMIDLIST) pv);
hres = IShellLinkA_SetIDList(psl, pv);
} else {
hres = IShellLinkA_SetPath(psl, (LPCSTR) pv);
hres = IShellLinkA_SetPath(psl, pv);
}
if(FAILED(hres)) {
/* bombed */
......@@ -1771,7 +1771,7 @@ void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
psxa->pspsx[i]->lpVtbl->Release(psxa->pspsx[i]);
}
LocalFree((HLOCAL)psxa);
LocalFree(psxa);
}
}
......
......@@ -196,7 +196,7 @@ static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface)
SHFree (This->pidlRoot);
SHFree (This->sPathTarget);
LocalFree ((HLOCAL) This);
LocalFree (This);
}
return refCount;
}
......@@ -324,7 +324,7 @@ LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path)
return NULL;
/* see if the caller bound File System Bind Data */
r = IBindCtx_GetObjectParam( pbc, (LPOLESTR) szfsbc, &param );
r = IBindCtx_GetObjectParam( pbc, szfsbc, &param );
if (FAILED(r))
return NULL;
......
......@@ -187,7 +187,7 @@ static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface)
{
TRACE ("-- destroying IShellFolder(%p)\n", This);
SHFree (This->pidlRoot);
LocalFree ((HLOCAL) This);
LocalFree (This);
}
return refCount;
}
......
......@@ -499,7 +499,7 @@ static char* UNIXFS_build_shitemid(char *pszUnixPath, void *pIDL) {
((LPSHITEMID)pIDL)->cb = cbLen;
/* Set shell32's standard SHITEMID data fields. */
pIDLData = _ILGetDataPointer((LPCITEMIDLIST)pIDL);
pIDLData = _ILGetDataPointer(pIDL);
pIDLData->type = S_ISDIR(fileStat.st_mode) ? PT_FOLDER : PT_VALUE;
pIDLData->u.file.dwFileSize = (DWORD)fileStat.st_size;
UNIXFS_seconds_since_1970_to_dos_date_time(fileStat.st_mtime, &pIDLData->u.file.uFileDate,
......@@ -1093,14 +1093,14 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetUIObjectOf(IShellFolder2* ifac
LPITEMIDLIST pidl;
if (cidl != 1) return E_INVALIDARG;
pidl = ILCombine(This->m_pidlLocation, apidl[0]);
*ppvOut = (LPVOID)IExtractIconA_Constructor(pidl);
*ppvOut = IExtractIconA_Constructor(pidl);
SHFree(pidl);
return S_OK;
} else if (IsEqualIID(&IID_IExtractIconW, riid)) {
LPITEMIDLIST pidl;
if (cidl != 1) return E_INVALIDARG;
pidl = ILCombine(This->m_pidlLocation, apidl[0]);
*ppvOut = (LPVOID)IExtractIconW_Constructor(pidl);
*ppvOut = IExtractIconW_Constructor(pidl);
SHFree(pidl);
return S_OK;
} else if (IsEqualIID(&IID_IDropTarget, riid)) {
......@@ -2287,7 +2287,7 @@ static HRESULT WINAPI UnixSubFolderIterator_IEnumIDList_Next(IEnumIDList* iface,
* and see if it passes the filter.
*/
lstrcpyA(pszRelativePath, pDirEntry->d_name);
rgelt[i] = (LPITEMIDLIST)SHAlloc(
rgelt[i] = SHAlloc(
UNIXFS_shitemid_len_from_filename(pszRelativePath, NULL, NULL)+sizeof(USHORT));
if (!UNIXFS_build_shitemid(This->m_szFolder, rgelt[i]) ||
!UNIXFS_is_pidl_of_type(rgelt[i], This->m_fFilter))
......
......@@ -126,7 +126,7 @@ static INT_PTR ConfirmMsgBox_Paint(HWND hDlg)
/* this will remap the rect to dialog coords */
MapWindowPoints(GetDlgItem(hDlg, IDD_MESSAGE), hDlg, (LPPOINT)&r, 2);
hOldFont = SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDD_MESSAGE, WM_GETFONT, 0, 0));
DrawTextW(hdc, (LPWSTR)GetPropW(hDlg, CONFIRM_MSG_PROP), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK);
DrawTextW(hdc, GetPropW(hDlg, CONFIRM_MSG_PROP), -1, &r, DT_NOPREFIX | DT_PATH_ELLIPSIS | DT_WORDBREAK);
SelectObject(hdc, hOldFont);
EndPaint(hDlg, &ps);
return TRUE;
......@@ -143,7 +143,7 @@ static INT_PTR ConfirmMsgBox_Init(HWND hDlg, LPARAM lParam)
SetWindowTextW(hDlg, info->lpszCaption);
ShowWindow(GetDlgItem(hDlg, IDD_MESSAGE), SW_HIDE);
SetPropW(hDlg, CONFIRM_MSG_PROP, (HANDLE)info->lpszText);
SetPropW(hDlg, CONFIRM_MSG_PROP, info->lpszText);
SendDlgItemMessageW(hDlg, IDD_ICON, STM_SETICON, (WPARAM)info->hIcon, 0);
/* compute the text height and resize the dialog */
......@@ -1569,12 +1569,12 @@ void WINAPI SHFreeNameMappings(HANDLE hNameMapping)
for (; i>= 0; i--)
{
LPSHNAMEMAPPINGW lp = DSA_GetItemPtr((HDSA)hNameMapping, i);
LPSHNAMEMAPPINGW lp = DSA_GetItemPtr(hNameMapping, i);
SHFree(lp->pszOldPath);
SHFree(lp->pszNewPath);
}
DSA_Destroy((HDSA)hNameMapping);
DSA_Destroy(hNameMapping);
}
}
......
......@@ -114,7 +114,7 @@ static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(
if (IsEqualIID(riid, &IID_IUnknown))
*ppV = This;
else if (IsEqualIID(riid, &IID_IFileSystemBindData))
*ppV = (IFileSystemBindData*)This;
*ppV = This;
if (*ppV)
{
......
......@@ -455,8 +455,8 @@ static INT CALLBACK ShellView_ListViewCompareItems(LPVOID lParam1, LPVOID lParam
FILETIME fd1, fd2;
char strName1[MAX_PATH], strName2[MAX_PATH];
BOOL bIsFolder1, bIsFolder2,bIsBothFolder;
LPITEMIDLIST pItemIdList1 = (LPITEMIDLIST) lParam1;
LPITEMIDLIST pItemIdList2 = (LPITEMIDLIST) lParam2;
LPITEMIDLIST pItemIdList1 = lParam1;
LPITEMIDLIST pItemIdList2 = lParam2;
LISTVIEW_SORT_INFO *pSortInfo = (LPLISTVIEW_SORT_INFO) lpData;
......@@ -945,7 +945,7 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
ShellExecuteExW(&shexinfo); /* Discard error/success info */
ILFree((LPITEMIDLIST)shexinfo.lpIDList);
ILFree(shexinfo.lpIDList);
}
}
......@@ -1029,7 +1029,7 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL
ZeroMemory(&cmi, sizeof(cmi));
cmi.cbSize = sizeof(cmi);
cmi.hwnd = This->hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */
cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand);
cmi.lpVerb = MAKEINTRESOURCEA(uCommand);
IContextMenu_InvokeCommand(pContextMenu, &cmi);
}
}
......@@ -1054,7 +1054,7 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL
ZeroMemory(&cmi, sizeof(cmi));
cmi.cbSize = sizeof(cmi);
cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand);
cmi.lpVerb = MAKEINTRESOURCEA(uCommand);
cmi.hwnd = This->hWndParent;
IContextMenu2_InvokeCommand(pCM, &cmi);
......@@ -1625,7 +1625,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara
{
case WM_NCCREATE:
lpcs = (LPCREATESTRUCTW)lParam;
pThis = (IShellViewImpl*)(lpcs->lpCreateParams);
pThis = lpcs->lpCreateParams;
SetWindowLongPtrW(hWnd, GWLP_USERDATA, (ULONG_PTR)pThis);
pThis->hWnd = hWnd; /*set the window handle*/
break;
......@@ -1687,27 +1687,27 @@ static HRESULT WINAPI IShellView_fnQueryInterface(IShellView2 * iface,REFIID rii
}
else if(IsEqualIID(riid, &IID_IShellView))
{
*ppvObj = (IShellView*)This;
*ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IShellView2))
{
*ppvObj = (IShellView2*)This;
*ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IOleCommandTarget))
{
*ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget);
*ppvObj = &This->lpvtblOleCommandTarget;
}
else if(IsEqualIID(riid, &IID_IDropTarget))
{
*ppvObj = (IDropTarget*)&(This->lpvtblDropTarget);
*ppvObj = &This->lpvtblDropTarget;
}
else if(IsEqualIID(riid, &IID_IDropSource))
{
*ppvObj = (IDropSource*)&(This->lpvtblDropSource);
*ppvObj = &This->lpvtblDropSource;
}
else if(IsEqualIID(riid, &IID_IViewObject))
{
*ppvObj = (IViewObject*)&(This->lpvtblViewObject);
*ppvObj = &This->lpvtblViewObject;
}
if(*ppvObj)
......@@ -2104,18 +2104,11 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView2* iface, LPSV2C
if (!RegisterClassW(&wc)) return E_FAIL;
}
wnd = CreateWindowExW(0,
SV_CLASS_NAME,
NULL,
WS_CHILD | WS_TABSTOP,
view_params->prcView->left,
view_params->prcView->top,
wnd = CreateWindowExW(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_TABSTOP,
view_params->prcView->left, view_params->prcView->top,
view_params->prcView->right - view_params->prcView->left,
view_params->prcView->bottom - view_params->prcView->top,
This->hWndParent,
0,
shell32_hInstance,
(LPVOID)This);
This->hWndParent, 0, shell32_hInstance, This);
CheckToolbar(This);
......
......@@ -897,15 +897,15 @@ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey)
{
if (SHELL_OsIsUnicode())
{
if (lstrcmpiW((LPCWSTR)inpRegKey, strRegistryPolicyW) &&
lstrcmpiW((LPCWSTR)inpRegKey, strPolicyW))
if (lstrcmpiW(inpRegKey, strRegistryPolicyW) &&
lstrcmpiW(inpRegKey, strPolicyW))
/* doesn't match, fail */
return 0;
}
else
{
if (lstrcmpiA((LPCSTR)inpRegKey, strRegistryPolicyA) &&
lstrcmpiA((LPCSTR)inpRegKey, strPolicyA))
if (lstrcmpiA(inpRegKey, strRegistryPolicyA) &&
lstrcmpiA(inpRegKey, strPolicyA))
/* doesn't match, fail */
return 0;
}
......
......@@ -1212,7 +1212,7 @@ typedef struct
static DWORD CALLBACK ddeThread(LPVOID arg)
{
dde_thread_info_t *info = (dde_thread_info_t *)arg;
dde_thread_info_t *info = arg;
assert(info && info->filename);
PostThreadMessage(info->threadIdParent,
WM_QUIT,
......@@ -1266,7 +1266,7 @@ static void test_dde(void)
denyNextConnection = TRUE;
ddeExec[0] = 0;
assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId));
assert(CreateThread(NULL, 0, ddeThread, &info, 0, &threadId));
while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg);
rc = msg.wParam > 32 ? 33 : msg.wParam;
if ((test->todo & 0x1)==0)
......@@ -1419,7 +1419,7 @@ static void test_dde_default_app(void)
* so don't wait for it */
SetEvent(hEvent);
assert(CreateThread(NULL, 0, ddeThread, (LPVOID)&info, 0, &threadId));
assert(CreateThread(NULL, 0, ddeThread, &info, 0, &threadId));
while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg);
rc = msg.wParam > 32 ? 33 : msg.wParam;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment