Get shell32 to compile warning-free

Patch by Stefan Ginsberg with minor modifications by me

svn path=/trunk/; revision=34073
This commit is contained in:
Colin Finck 2008-06-24 14:37:50 +00:00
parent aa2b83d508
commit b79ef105f1
11 changed files with 16 additions and 27 deletions

View file

@ -461,7 +461,7 @@ HRESULT WINAPI SHCreateDataObject(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMID
{
if (IsEqualIID(riid, &IID_IDataObject))
{
return CIDLData_CreateFromIDArray(pidlFolder, cidl, apidl, ppv);
return CIDLData_CreateFromIDArray(pidlFolder, cidl, apidl, (IDataObject**)ppv);
}
return E_FAIL;
}

View file

@ -22,7 +22,7 @@ struct IconLocation
struct IconExtraction
{
ULONG ref;
LONG ref;
IDefaultExtractIconInit defaultExtractIconInitImpl;
IExtractIconW extractIconWImpl;
IExtractIconA extractIconAImpl;
@ -92,7 +92,7 @@ IconExtraction_DefaultExtractIconInit_AddRef(
IDefaultExtractIconInit *This)
{
struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl);
ULONG refCount = InterlockedIncrement((PLONG)&s->ref);
ULONG refCount = InterlockedIncrement(&s->ref);
TRACE("(%p)\n", This);
return refCount;
}
@ -106,7 +106,7 @@ IconExtraction_DefaultExtractIconInit_Release(
TRACE("(%p)\n", This);
refCount = InterlockedDecrement((PLONG)&s->ref);
refCount = InterlockedDecrement(&s->ref);
if (refCount == 0)
{
if (s->defaultIcon.file) CoTaskMemFree(s->defaultIcon.file);

View file

@ -614,7 +614,7 @@ SH_FileGeneralDlgProc(
*/
BOOL
SH_ShowPropertiesDialog(WCHAR * lpf)
SH_ShowPropertiesDialog(PCWSTR lpf)
{
PROPSHEETHEADERW pinfo;
HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE];
@ -635,7 +635,7 @@ SH_ShowPropertiesDialog(WCHAR * lpf)
if (lpf[0] == '"')
{
/* remove quotes from lpf */
LPWSTR src = lpf + 1;
LPCWSTR src = lpf + 1;
LPWSTR dst = wFileName;
while(*src && *src!='"')

View file

@ -1,4 +1,4 @@
<module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll" allowwarnings="true">
<module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll">
<autoregister infsection="OleControlDlls" type="Both" />
<importlibrary definition="shell32.spec.def" />
<include base="shell32">.</include>

View file

@ -246,5 +246,5 @@ INT_PTR CALLBACK SH_FileVersionDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
HPROPSHEETPAGE SH_CreatePropertySheetPage(LPSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle);
BOOL SH_ShowDriveProperties(WCHAR * drive);
BOOL SH_ShowRecycleBinProperties(WCHAR sDrive);
BOOL SH_ShowPropertiesDialog(WCHAR * lpf);
BOOL SH_ShowPropertiesDialog(PCWSTR lpf);
#endif

View file

@ -309,7 +309,7 @@ typedef struct {
IShellFolder2Vtbl *lpVtbl;
IPersistFolder2Vtbl *lpVtblPersistFolder2;
DWORD ref;
LONG ref;
CLSID *pclsid;

View file

@ -255,14 +255,12 @@ static BOOL SHELL_ConfirmIDs(int nKindOfDialog, SHELL_ConfirmIDstruc *ids)
ids->text_resource_id = IDS_DELETESELECTED_TEXT;
return TRUE;
case ASK_OVERWRITE_FILE:
ids->hIconInstance = NULL;
ids->icon_resource_id = IDI_WARNING;
ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE;
ids->caption_resource_id = IDS_OVERWRITEFILE_CAPTION;
ids->text_resource_id = IDS_OVERWRITEFILE_TEXT;
return TRUE;
case ASK_OVERWRITE_FOLDER:
ids->hIconInstance = NULL;
ids->icon_resource_id = IDI_WARNING;
ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE;
ids->caption_resource_id = IDS_OVERWRITEFILE_CAPTION;
ids->text_resource_id = IDS_OVERWRITEFOLDER_TEXT;
return TRUE;

View file

@ -1669,7 +1669,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara
return 1;
break;
case CWM_GETISHELLBROWSER:
return pThis->pShellBrowser;
return (LRESULT)pThis->pShellBrowser;
}
return DefWindowProcW(hWnd, uMessage, wParam, lParam);
}

View file

@ -122,7 +122,7 @@ IContextMenu2 *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl
HRESULT hr;
IShellFolder_AddRef(pSFParent);
cm->rfg = SFGAO_BROWSABLE | SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_CANDELETE | SFGAO_CANRENAME | SFGAO_HASPROPSHEET;
hr = IShellFolder_GetAttributesOf(pSFParent, cidl, apidl, &cm->rfg);
hr = IShellFolder_GetAttributesOf(pSFParent, cidl, (LPCITEMIDLIST *)apidl, &cm->rfg);
if (!SUCCEEDED(hr))
cm->rfg = 0; /* No action available */
}
@ -615,7 +615,7 @@ static HRESULT WINAPI ISvItemCm_fnQueryContextMenu(
indexMenu = SH_AddStaticEntryToMenu(hmenu, indexMenu, This);
SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION);
pDataObj = IDataObject_Constructor(NULL, This->pidl, This->apidl, This->cidl);
pDataObj = IDataObject_Constructor(NULL, This->pidl, (LPCITEMIDLIST *)This->apidl, This->cidl);
if (pDataObj)
{
indexMenu = SH_LoadContextMenuHandlers(This, pDataObj, hmenu, indexMenu);
@ -733,7 +733,7 @@ static void DoDelete(IContextMenu2 *iface, HWND hwnd)
PathAddBackslashW(szPath);
IPersistFolder2_Release(psf);
szTarget = build_paths_list(szPath, This->cidl, This->apidl);
szTarget = build_paths_list(szPath, This->cidl, (LPCITEMIDLIST *)This->apidl);
if (pidl)
{

View file

@ -71,15 +71,6 @@ HRESULT WINAPI SHILCreateFromPathW (
BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
/****************************************************************************
* SHChangeNotifyRegister API
*/
#define SHCNRF_InterruptLevel 0x0001
#define SHCNRF_ShellLevel 0x0002
#define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
#define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
/****************************************************************************
* Shell Common Dialogs
*/

View file

@ -133,7 +133,7 @@ typedef struct
#define CFSTR_SHELLURL "UniformResourceLocator"
#endif
#define CFSTR_FILENAMEW L"FileNameW"
#define CFSTR_FILENAMEW "FileNameW"
#define CFSTR_FILENAMEA "FileName"
#define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
#define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */