- some fixes, cleaned up includes, fixed leaks

- clean DllReferenceCount, better DllMain()
- dynamically linking LookupIconIdFromDirectoryEx32 and
  CreateIconFromResourceEx32 to USER32
- moved guid's instances to new file shellguid.c
- implemented  ShellExecuteEx32W
This commit is contained in:
Juergen Schmied 1999-01-23 14:12:48 +00:00 committed by Alexandre Julliard
parent 7b33e2b91c
commit ba28ba171f
21 changed files with 383 additions and 317 deletions

View file

@ -15,6 +15,7 @@ C_SRCS = \
iconcache.c \ iconcache.c \
pidl.c \ pidl.c \
shell32_main.c \ shell32_main.c \
shellguid.c \
shelllink.c \ shelllink.c \
shellole.c \ shellole.c \
shellord.c \ shellord.c \

View file

@ -7,11 +7,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "debug.h" #include "debug.h"
#include "shlobj.h"
#include "shell.h"
#include "winerror.h" #include "winerror.h"
#include "commctrl.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
BOOL32 HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len) BOOL32 HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len)

View file

@ -6,12 +6,14 @@
#include "windows.h" #include "windows.h"
#include "winerror.h" #include "winerror.h"
#include "debug.h" #include "debug.h"
#include "pidl.h" #include "pidl.h"
#include "shlobj.h"
#include "objbase.h" #include "objbase.h"
#include "if_macros.h"
#include "shlguid.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "shresdef.h" #include "shresdef.h"
#include "if_macros.h"
static HRESULT WINAPI IContextMenu_QueryInterface(LPCONTEXTMENU ,REFIID , LPVOID *); static HRESULT WINAPI IContextMenu_QueryInterface(LPCONTEXTMENU ,REFIID , LPVOID *);
static ULONG WINAPI IContextMenu_AddRef(LPCONTEXTMENU); static ULONG WINAPI IContextMenu_AddRef(LPCONTEXTMENU);
@ -69,19 +71,23 @@ static HRESULT WINAPI IContextMenu_QueryInterface(LPCONTEXTMENU this,REFIID riid
* IContextMenu_AddRef * IContextMenu_AddRef
*/ */
static ULONG WINAPI IContextMenu_AddRef(LPCONTEXTMENU this) static ULONG WINAPI IContextMenu_AddRef(LPCONTEXTMENU this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1); { TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
return ++(this->ref); shell32_ObjCount++;
return ++(this->ref);
} }
/************************************************************************** /**************************************************************************
* IContextMenu_Release * IContextMenu_Release
*/ */
static ULONG WINAPI IContextMenu_Release(LPCONTEXTMENU this) static ULONG WINAPI IContextMenu_Release(LPCONTEXTMENU this)
{ TRACE(shell,"(%p)->()\n",this); { TRACE(shell,"(%p)->()\n",this);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell," destroying IContextMenu(%p)\n",this); { TRACE(shell," destroying IContextMenu(%p)\n",this);
if(this->pSFParent) if(this->pSFParent)
this->pSFParent->lpvtbl->fnRelease(this->pSFParent); this->pSFParent->lpvtbl->fnRelease(this->pSFParent);
/*make sure the pidl is freed*/ /*make sure the pidl is freed*/
if(this->aPidls) if(this->aPidls)
@ -122,6 +128,7 @@ LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *a
{ cm->bAllValues &= (_ILIsValue(aPidls[u]) ? 1 : 0); { cm->bAllValues &= (_ILIsValue(aPidls[u]) ? 1 : 0);
} }
TRACE(shell,"(%p)->()\n",cm); TRACE(shell,"(%p)->()\n",cm);
shell32_ObjCount++;
return cm; return cm;
} }
/************************************************************************** /**************************************************************************
@ -201,7 +208,7 @@ static HRESULT WINAPI IContextMenu_InvokeCommand(LPCONTEXTMENU this, LPCMINVOKEC
if(HIWORD(lpcmi->lpVerb)) if(HIWORD(lpcmi->lpVerb))
{ /* get the active IShellView */ { /* get the active IShellView */
lpSB = (LPSHELLBROWSER)SendMessage32A(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0); lpSB = (LPSHELLBROWSER)SendMessage32A(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0);
IShellBrowser_QueryActiveShellView(lpSB, &lpSV); IShellBrowser_QueryActiveShellView(lpSB, &lpSV); /* does AddRef() on lpSV */
lpSV->lpvtbl->fnGetWindow(lpSV, &hWndSV); lpSV->lpvtbl->fnGetWindow(lpSV, &hWndSV);
/* these verbs are used by the filedialogs*/ /* these verbs are used by the filedialogs*/
@ -219,6 +226,7 @@ static HRESULT WINAPI IContextMenu_InvokeCommand(LPCONTEXTMENU this, LPCMINVOKEC
else else
{ FIXME(shell,"please report: unknown verb %s\n",lpcmi->lpVerb); { FIXME(shell,"please report: unknown verb %s\n",lpcmi->lpVerb);
} }
lpSV->lpvtbl->fnRelease(lpSV);
return NOERROR; return NOERROR;
} }

View file

@ -73,6 +73,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32 cfmt, const FORMATETC32 afmt[]
} }
TRACE(shell,"(%p)->()\n",ef); TRACE(shell,"(%p)->()\n",ef);
shell32_ObjCount++;
return (LPENUMFORMATETC)ef; return (LPENUMFORMATETC)ef;
} }
static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID* ppvObj) static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID* ppvObj)
@ -104,12 +105,16 @@ static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPUNKNOWN iface)
{ {
ICOM_THIS(IEnumFORMATETC,iface); ICOM_THIS(IEnumFORMATETC,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1); TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
static ULONG WINAPI IEnumFORMATETC_fnRelease(LPUNKNOWN iface) static ULONG WINAPI IEnumFORMATETC_fnRelease(LPUNKNOWN iface)
{ {
ICOM_THIS(IEnumFORMATETC,iface); ICOM_THIS(IEnumFORMATETC,iface);
TRACE(shell,"(%p)->()\n",this); TRACE(shell,"(%p)->()\n",this);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell," destroying IEnumFORMATETC(%p)\n",this); { TRACE(shell," destroying IEnumFORMATETC(%p)\n",this);
if (this->pFmt) if (this->pFmt)
@ -241,6 +246,7 @@ LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEM
dto->lpill->lpvtbl->fnAddItems(dto->lpill, apidl, cidl); dto->lpill->lpvtbl->fnAddItems(dto->lpill, apidl, cidl);
TRACE(shell,"(%p)->(sf=%p apidl=%p cidl=%u)\n",dto, psf, apidl, cidl); TRACE(shell,"(%p)->(sf=%p apidl=%p cidl=%u)\n",dto, psf, apidl, cidl);
shell32_ObjCount++;
return (LPDATAOBJECT)dto; return (LPDATAOBJECT)dto;
} }
/*************************************************************************** /***************************************************************************
@ -276,7 +282,10 @@ static HRESULT WINAPI IDataObject_fnQueryInterface (LPUNKNOWN iface, REFIID riid
static ULONG WINAPI IDataObject_fnAddRef(LPUNKNOWN iface) static ULONG WINAPI IDataObject_fnAddRef(LPUNKNOWN iface)
{ {
ICOM_THIS(IDataObject,iface); ICOM_THIS(IDataObject,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1); TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/************************************************************************** /**************************************************************************
@ -286,6 +295,9 @@ static ULONG WINAPI IDataObject_fnRelease(LPUNKNOWN iface)
{ {
ICOM_THIS(IDataObject,iface); ICOM_THIS(IDataObject,iface);
TRACE(shell,"(%p)->()\n",this); TRACE(shell,"(%p)->()\n",this);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell," destroying IDataObject(%p)\n",this); { TRACE(shell," destroying IDataObject(%p)\n",this);
IDLList_Destructor(this->lpill); IDLList_Destructor(this->lpill);

View file

@ -4,20 +4,15 @@
* Copyright 1998 Juergen Schmied <juergen.schmied@metronet.de> * Copyright 1998 Juergen Schmied <juergen.schmied@metronet.de>
*/ */
#include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ole.h"
#include "ole2.h"
#include "debug.h" #include "debug.h"
#include "shlobj.h"
#include "objbase.h" #include "objbase.h"
#include "shell.h"
#include "winerror.h" #include "winerror.h"
#include "winnls.h"
#include "winproc.h"
#include "commctrl.h"
#include "pidl.h" #include "pidl.h"
#include "shlguid.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
/* IEnumIDList Implementation */ /* IEnumIDList Implementation */
@ -75,6 +70,7 @@ LPENUMIDLIST IEnumIDList_Constructor( LPCSTR lpszPath, DWORD dwFlags)
} }
TRACE(shell,"-- (%p)->()\n",lpeidl); TRACE(shell,"-- (%p)->()\n",lpeidl);
shell32_ObjCount++;
return lpeidl; return lpeidl;
} }
@ -109,14 +105,19 @@ static HRESULT WINAPI IEnumIDList_QueryInterface(
* IEnumIDList_AddRef * IEnumIDList_AddRef
*/ */
static ULONG WINAPI IEnumIDList_AddRef(LPENUMIDLIST this) static ULONG WINAPI IEnumIDList_AddRef(LPENUMIDLIST this)
{ TRACE(shell,"(%p)->()\n",this); { TRACE(shell,"(%p)->(%u)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
* IEnumIDList_Release * IEnumIDList_Release
*/ */
static ULONG WINAPI IEnumIDList_Release(LPENUMIDLIST this) static ULONG WINAPI IEnumIDList_Release(LPENUMIDLIST this)
{ TRACE(shell,"(%p)->()\n",this); { TRACE(shell,"(%p)->(%u)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell," destroying IEnumIDList(%p)\n",this); { TRACE(shell," destroying IEnumIDList(%p)\n",this);
IEnumIDList_DeleteList(this); IEnumIDList_DeleteList(this);

View file

@ -4,22 +4,16 @@
* *
*/ */
#include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ole.h"
#include "ole2.h"
#include "debug.h" #include "debug.h"
#include "shlobj.h"
#include "objbase.h" #include "objbase.h"
#include "shell.h"
#include "winerror.h" #include "winerror.h"
#include "winnls.h"
#include "winproc.h"
#include "commctrl.h"
#include "pidl.h"
#include "pidl.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "shlguid.h"
#include "shlobj.h"
/****************************************************************************** /******************************************************************************
@ -58,8 +52,9 @@ LPEXTRACTICON IExtractIcon_Constructor(LPCITEMIDLIST pidl)
pdump(pidl); pdump(pidl);
TRACE(shell,"(%p)\n",ei); TRACE(shell,"(%p)\n",ei);
return ei; shell32_ObjCount++;
return ei;
} }
/************************************************************************** /**************************************************************************
* IExtractIcon_QueryInterface * IExtractIcon_QueryInterface
@ -91,14 +86,20 @@ static HRESULT WINAPI IExtractIcon_QueryInterface( LPEXTRACTICON this, REFIID ri
* IExtractIcon_AddRef * IExtractIcon_AddRef
*/ */
static ULONG WINAPI IExtractIcon_AddRef(LPEXTRACTICON this) static ULONG WINAPI IExtractIcon_AddRef(LPEXTRACTICON this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1); { TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
return ++(this->ref);
shell32_ObjCount++;
return ++(this->ref);
} }
/************************************************************************** /**************************************************************************
* IExtractIcon_Release * IExtractIcon_Release
*/ */
static ULONG WINAPI IExtractIcon_Release(LPEXTRACTICON this) static ULONG WINAPI IExtractIcon_Release(LPEXTRACTICON this)
{ TRACE(shell,"(%p)->()\n",this); { TRACE(shell,"(%p)->()\n",this);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell," destroying IExtractIcon(%p)\n",this); { TRACE(shell," destroying IExtractIcon(%p)\n",this);
SHFree(this->pidl); SHFree(this->pidl);

View file

@ -1,7 +1,8 @@
/* /*
* shell icon cache (SIC) * shell icon cache (SIC)
* *
* * FIXME
* since dll geting never unloaded the iconcache will never be freed
*/ */
#include <string.h> #include <string.h>
#include "windows.h" #include "windows.h"
@ -374,7 +375,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32* RetPtr, UINT
{ WARN(shell,"no matching real address for icongroup!\n"); { WARN(shell,"no matching real address for icongroup!\n");
goto end_4; /* failure */ goto end_4; /* failure */
} }
RetPtr[i] = LookupIconIdFromDirectoryEx32(igdata, TRUE, cxDesired, cyDesired, LR_DEFAULTCOLOR); RetPtr[i] = pLookupIconIdFromDirectoryEx32(igdata, TRUE, cxDesired, cyDesired, LR_DEFAULTCOLOR);
} }
if (!(iconresdir=GetResDirEntryW(rootresdir,RT_ICON32W,(DWORD)rootresdir,FALSE))) if (!(iconresdir=GetResDirEntryW(rootresdir,RT_ICON32W,(DWORD)rootresdir,FALSE)))
@ -402,7 +403,7 @@ HGLOBAL32 WINAPI ICO_ExtractIconEx(LPCSTR lpszExeFileName, HICON32* RetPtr, UINT
RetPtr[i]=0; RetPtr[i]=0;
continue; continue;
} }
RetPtr[i] = CreateIconFromResourceEx32(idata,idataent->Size,TRUE,0x00030000, cxDesired, cyDesired, LR_DEFAULTCOLOR); RetPtr[i] = pCreateIconFromResourceEx32(idata,idataent->Size,TRUE,0x00030000, cxDesired, cyDesired, LR_DEFAULTCOLOR);
} }
hRet = RetPtr[0]; /* return first icon */ hRet = RetPtr[0]; /* return first icon */
goto end_3; /* sucess */ goto end_3; /* sucess */

View file

@ -4,34 +4,28 @@
* 1998 Marcus Meissner * 1998 Marcus Meissner
* 1998 Juergen Schmied (jsch) * <juergen.schmied@metronet.de> * 1998 Juergen Schmied (jsch) * <juergen.schmied@metronet.de>
*/ */
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <ctype.h>
#include "windows.h" #include "windows.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "winerror.h" #include "winerror.h"
#include "file.h"
#include "shell.h"
#include "heap.h" #include "heap.h"
#include "module.h"
#include "neexe.h"
#include "resource.h" #include "resource.h"
#include "dlgs.h" #include "dlgs.h"
#include "win.h" #include "win.h"
#include "cursoricon.h"
#include "sysmetrics.h" #include "sysmetrics.h"
#include "shlobj.h"
#include "debug.h" #include "debug.h"
#include "winreg.h" #include "winreg.h"
#include "imagelist.h"
#include "sysmetrics.h"
#include "commctrl.h"
#include "authors.h" #include "authors.h"
#include "shell.h"
#include "pidl.h" #include "pidl.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "shlguid.h"
/************************************************************************* /*************************************************************************
* CommandLineToArgvW [SHELL32.7] * CommandLineToArgvW [SHELL32.7]
*/ */
@ -692,8 +686,8 @@ ShellExecute32W(
/************************************************************************* /*************************************************************************
* AboutDlgProc32 (not an exported API function) * AboutDlgProc32 (not an exported API function)
*/ */
LRESULT WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam, BOOL32 WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
LPARAM lParam ) LPARAM lParam )
{ HWND32 hWndCtl; { HWND32 hWndCtl;
char Template[512], AppTitle[512]; char Template[512], AppTitle[512];
@ -959,72 +953,114 @@ DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath)
return NOERROR; return NOERROR;
} }
/*************************************************************************
* global variables of the shell32.dll
*
*/
void (WINAPI* pDLLInitComctl)(LPVOID);
INT32 (WINAPI* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon);
INT32 (WINAPI* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
HIMAGELIST (WINAPI * pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
HICON32 (WINAPI * pImageList_GetIcon) (HIMAGELIST, INT32, UINT32);
INT32 (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
void (CALLBACK* pDLLInitComctl)(LPVOID); LPVOID (WINAPI* pCOMCTL32_Alloc) (INT32);
INT32 (CALLBACK* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon); BOOL32 (WINAPI* pCOMCTL32_Free) (LPVOID);
INT32 (CALLBACK* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
HIMAGELIST (CALLBACK * pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
HICON32 (CALLBACK * pImageList_GetIcon) (HIMAGELIST, INT32, UINT32);
INT32 (CALLBACK* pImageList_GetImageCount)(HIMAGELIST);
LPVOID (CALLBACK* pCOMCTL32_Alloc) (INT32); HDPA (WINAPI* pDPA_Create) (INT32);
BOOL32 (CALLBACK* pCOMCTL32_Free) (LPVOID); INT32 (WINAPI* pDPA_InsertPtr) (const HDPA, INT32, LPVOID);
BOOL32 (WINAPI* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT32);
BOOL32 (WINAPI* pDPA_Destroy) (const HDPA);
INT32 (WINAPI *pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
HDPA (CALLBACK* pDPA_Create) (INT32); /* user32 */
INT32 (CALLBACK* pDPA_InsertPtr) (const HDPA, INT32, LPVOID); HICON32* (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
BOOL32 (CALLBACK* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM); HICON32* (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
LPVOID (CALLBACK* pDPA_GetPtr) (const HDPA, INT32);
BOOL32 (CALLBACK* pDPA_Destroy) (const HDPA); static BOOL32 bShell32IsInitialized = 0;
INT32 (CALLBACK *pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32); static HINSTANCE32 hComctl32;
static BOOL32 bShell32IsInitialized=0; static INT32 shell32_RefCount = 0;
INT32 shell32_ObjCount = 0;
HINSTANCE32 shell32_hInstance;
/************************************************************************* /*************************************************************************
* SHELL32 LibMain * SHELL32 LibMain
* *
* FIXME
* at the moment the icons are extracted from shell32.dll
* free the imagelists
*/ */
HINSTANCE32 shell32_hInstance;
BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ HINSTANCE32 hComctl32; { HMODULE32 hUser32;
TRACE(shell,"0x%x 0x%lx %p\n", hinstDLL, fdwReason, lpvReserved); TRACE(shell,"0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
shell32_hInstance = hinstDLL; shell32_hInstance = hinstDLL;
if (fdwReason==DLL_PROCESS_ATTACH && !bShell32IsInitialized) switch (fdwReason)
{ hComctl32 = LoadLibrary32A("COMCTL32.DLL"); { case DLL_PROCESS_ATTACH:
if (hComctl32) if (!bShell32IsInitialized)
{ pDLLInitComctl=GetProcAddress32(hComctl32,"InitCommonControlsEx"); { hComctl32 = LoadLibrary32A("COMCTL32.DLL");
if (pDLLInitComctl) hUser32 = GetModuleHandle32A("USER32");
{ pDLLInitComctl(NULL); if (hComctl32 && hUser32)
} { pDLLInitComctl=GetProcAddress32(hComctl32,"InitCommonControlsEx");
pImageList_Create=GetProcAddress32(hComctl32,"ImageList_Create"); if (pDLLInitComctl)
pImageList_AddIcon=GetProcAddress32(hComctl32,"ImageList_AddIcon"); { pDLLInitComctl(NULL);
pImageList_ReplaceIcon=GetProcAddress32(hComctl32,"ImageList_ReplaceIcon"); }
pImageList_GetIcon=GetProcAddress32(hComctl32,"ImageList_GetIcon"); pImageList_Create=GetProcAddress32(hComctl32,"ImageList_Create");
pImageList_GetImageCount=GetProcAddress32(hComctl32,"ImageList_GetImageCount"); pImageList_AddIcon=GetProcAddress32(hComctl32,"ImageList_AddIcon");
pImageList_ReplaceIcon=GetProcAddress32(hComctl32,"ImageList_ReplaceIcon");
pImageList_GetIcon=GetProcAddress32(hComctl32,"ImageList_GetIcon");
pImageList_GetImageCount=GetProcAddress32(hComctl32,"ImageList_GetImageCount");
/* imports by ordinal, pray that it works*/ /* imports by ordinal, pray that it works*/
pCOMCTL32_Alloc=GetProcAddress32(hComctl32, (LPCSTR)71L); pCOMCTL32_Alloc=GetProcAddress32(hComctl32, (LPCSTR)71L);
pCOMCTL32_Free=GetProcAddress32(hComctl32, (LPCSTR)73L); pCOMCTL32_Free=GetProcAddress32(hComctl32, (LPCSTR)73L);
pDPA_Create=GetProcAddress32(hComctl32, (LPCSTR)328L); pDPA_Create=GetProcAddress32(hComctl32, (LPCSTR)328L);
pDPA_Destroy=GetProcAddress32(hComctl32, (LPCSTR)329L); pDPA_Destroy=GetProcAddress32(hComctl32, (LPCSTR)329L);
pDPA_GetPtr=GetProcAddress32(hComctl32, (LPCSTR)332L); pDPA_GetPtr=GetProcAddress32(hComctl32, (LPCSTR)332L);
pDPA_InsertPtr=GetProcAddress32(hComctl32, (LPCSTR)334L); pDPA_InsertPtr=GetProcAddress32(hComctl32, (LPCSTR)334L);
pDPA_Sort=GetProcAddress32(hComctl32, (LPCSTR)338L); pDPA_Sort=GetProcAddress32(hComctl32, (LPCSTR)338L);
pDPA_Search=GetProcAddress32(hComctl32, (LPCSTR)339L); pDPA_Search=GetProcAddress32(hComctl32, (LPCSTR)339L);
/* user32 */
pLookupIconIdFromDirectoryEx32=GetProcAddress32(hUser32,"LookupIconIdFromDirectoryEx");
pCreateIconFromResourceEx32=GetProcAddress32(hUser32,"CreateIconFromResourceEx");
}
else
{ ERR(shell,"P A N I C SHELL32 loading failed\n");
return FALSE;
}
SIC_Initialize();
bShell32IsInitialized = TRUE;
}
shell32_RefCount++;
break;
FreeLibrary32(hComctl32); case DLL_THREAD_ATTACH:
} shell32_RefCount++;
else break;
{ /* panic, imediately exit wine*/
ERR(shell,"P A N I C error getting functionpointers\n"); case DLL_THREAD_DETACH:
exit (1); shell32_RefCount--;
} break;
SIC_Initialize();
bShell32IsInitialized = TRUE; case DLL_PROCESS_DETACH:
} shell32_RefCount--;
return TRUE; if ( !shell32_RefCount )
{ FreeLibrary32(hComctl32);
bShell32IsInitialized = FALSE;
if (pdesktopfolder)
{ pdesktopfolder->lpvtbl->fnRelease(pdesktopfolder);
}
/* this one is here ot check if AddRef/Release is balanced */
if (shell32_ObjCount)
{ FIXME(shell,"%u objects left\n", shell32_ObjCount);
}
}
TRACE(shell, "refcount=%u objcount=%u \n", shell32_RefCount, shell32_ObjCount);
break;
}
return TRUE;
} }

View file

@ -9,29 +9,32 @@
* global SHELL32.DLL variables * global SHELL32.DLL variables
*/ */
extern HINSTANCE32 shell32_hInstance; extern HINSTANCE32 shell32_hInstance;
extern UINT32 shell32_DllRefCount; extern INT32 shell32_ObjCount;
extern HIMAGELIST ShellSmallIconList; extern HIMAGELIST ShellSmallIconList;
extern HIMAGELIST ShellBigIconList; extern HIMAGELIST ShellBigIconList;
/******************************************* /*******************************************
* pointer to functions dynamically loaded * pointer to functions dynamically loaded
*/ */
extern void (CALLBACK* pDLLInitComctl)(LPVOID); extern void (WINAPI* pDLLInitComctl)(LPVOID);
extern INT32 (CALLBACK* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon); extern INT32 (WINAPI* pImageList_AddIcon) (HIMAGELIST himl, HICON32 hIcon);
extern INT32 (CALLBACK* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32); extern INT32 (WINAPI* pImageList_ReplaceIcon) (HIMAGELIST, INT32, HICON32);
extern HIMAGELIST (CALLBACK* pImageList_Create) (INT32,INT32,UINT32,INT32,INT32); extern HIMAGELIST (WINAPI* pImageList_Create) (INT32,INT32,UINT32,INT32,INT32);
extern HICON32 (CALLBACK* pImageList_GetIcon) (HIMAGELIST, INT32, UINT32); extern HICON32 (WINAPI* pImageList_GetIcon) (HIMAGELIST, INT32, UINT32);
extern INT32 (CALLBACK* pImageList_GetImageCount)(HIMAGELIST); extern INT32 (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
extern LPVOID (CALLBACK* pCOMCTL32_Alloc) (INT32); extern LPVOID (WINAPI* pCOMCTL32_Alloc) (INT32);
extern BOOL32 (CALLBACK* pCOMCTL32_Free) (LPVOID); extern BOOL32 (WINAPI* pCOMCTL32_Free) (LPVOID);
extern HDPA (CALLBACK* pDPA_Create) (INT32); extern HDPA (WINAPI* pDPA_Create) (INT32);
extern INT32 (CALLBACK* pDPA_InsertPtr) (const HDPA, INT32, LPVOID); extern INT32 (WINAPI* pDPA_InsertPtr) (const HDPA, INT32, LPVOID);
extern BOOL32 (CALLBACK* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM); extern BOOL32 (WINAPI* pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);
extern LPVOID (CALLBACK* pDPA_GetPtr) (const HDPA, INT32); extern LPVOID (WINAPI* pDPA_GetPtr) (const HDPA, INT32);
extern BOOL32 (CALLBACK* pDPA_Destroy) (const HDPA); extern BOOL32 (WINAPI* pDPA_Destroy) (const HDPA);
extern INT32 (CALLBACK* pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32); extern INT32 (WINAPI* pDPA_Search) (const HDPA, LPVOID, INT32, PFNDPACOMPARE, LPARAM, UINT32);
extern HICON32* (WINAPI *pLookupIconIdFromDirectoryEx32)(LPBYTE dir, BOOL32 bIcon, INT32 width, INT32 height, UINT32 cFlag);
extern HICON32* (WINAPI *pCreateIconFromResourceEx32)(LPBYTE bits,UINT32 cbSize, BOOL32 bIcon, DWORD dwVersion, INT32 width, INT32 height,UINT32 cFlag);
LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl); LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl); LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl);

10
dlls/shell32/shellguid.c Normal file
View file

@ -0,0 +1,10 @@
/*
* Shell UID
*
* 1998 Juergen Schmied (jsch) * <juergen.schmied@metronet.de>
*
* this in in a single file due to interfering definitions
*
*/
#define INITGUID
#include "shlguid.h"

View file

@ -5,23 +5,17 @@
* *
*/ */
#include <ctype.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include "ole.h"
#include "ole2.h"
#include "debug.h" #include "debug.h"
#include "winerror.h"
#include "objbase.h" #include "objbase.h"
#include "wine/obj_base.h" #include "wine/obj_base.h"
#include "wine/obj_storage.h" #include "wine/obj_storage.h"
#include "shell.h"
#include "winerror.h"
#include "winnls.h"
#include "winproc.h"
#include "commctrl.h"
#include "pidl.h"
#include "pidl.h"
#include "shell32_main.h" #include "shell32_main.h"
#include "shlguid.h"
/* IPersistFile Implementation */ /* IPersistFile Implementation */
typedef struct _IPersistFile { typedef struct _IPersistFile {
@ -45,6 +39,7 @@ LPPERSISTFILE IPersistFile_Constructor(void)
sl->lpvtbl = &pfvt; sl->lpvtbl = &pfvt;
TRACE(shell,"(%p)->()\n",sl); TRACE(shell,"(%p)->()\n",sl);
shell32_ObjCount++;
return (LPPERSISTFILE)sl; return (LPPERSISTFILE)sl;
} }
@ -83,6 +78,8 @@ static ULONG WINAPI IPersistFile_fnAddRef(LPUNKNOWN iface)
{ {
ICOM_THIS(IPersistFile,iface); ICOM_THIS(IPersistFile,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
@ -92,6 +89,9 @@ static ULONG WINAPI IPersistFile_fnRelease(LPUNKNOWN iface)
{ {
ICOM_THIS(IPersistFile,iface); ICOM_THIS(IPersistFile,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell,"-- destroying IPersistFile(%p)\n",this); { TRACE(shell,"-- destroying IPersistFile(%p)\n",this);
HeapFree(GetProcessHeap(),0,this); HeapFree(GetProcessHeap(),0,this);
@ -173,6 +173,7 @@ LPCLASSFACTORY IShellLink_CF_Constructor(void)
lpclf->ref = 1; lpclf->ref = 1;
lpclf->lpvtbl = &slcfvt; lpclf->lpvtbl = &slcfvt;
TRACE(shell,"(%p)->()\n",lpclf); TRACE(shell,"(%p)->()\n",lpclf);
shell32_ObjCount++;
return (LPCLASSFACTORY)lpclf; return (LPCLASSFACTORY)lpclf;
} }
/************************************************************************** /**************************************************************************
@ -210,6 +211,8 @@ static ULONG WINAPI IShellLink_CF_AddRef(LPUNKNOWN iface)
{ {
ICOM_THIS(IClassFactory,iface); ICOM_THIS(IClassFactory,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
@ -219,6 +222,8 @@ static ULONG WINAPI IShellLink_CF_Release(LPUNKNOWN iface)
{ {
ICOM_THIS(IClassFactory,iface); ICOM_THIS(IClassFactory,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",this); { TRACE(shell,"-- destroying IClassFactory(%p)\n",this);
HeapFree(GetProcessHeap(),0,this); HeapFree(GetProcessHeap(),0,this);
@ -349,6 +354,7 @@ LPSHELLLINK IShellLink_Constructor(void)
sl->lppf = IPersistFile_Constructor(); sl->lppf = IPersistFile_Constructor();
TRACE(shell,"(%p)->()\n",sl); TRACE(shell,"(%p)->()\n",sl);
shell32_ObjCount++;
return sl; return sl;
} }
@ -386,6 +392,8 @@ static HRESULT WINAPI IShellLink_QueryInterface(
*/ */
static ULONG WINAPI IShellLink_AddRef(LPSHELLLINK this) static ULONG WINAPI IShellLink_AddRef(LPSHELLLINK this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
@ -393,6 +401,8 @@ static ULONG WINAPI IShellLink_AddRef(LPSHELLLINK this)
*/ */
static ULONG WINAPI IShellLink_Release(LPSHELLLINK this) static ULONG WINAPI IShellLink_Release(LPSHELLLINK this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell,"-- destroying IShellLink(%p)\n",this); { TRACE(shell,"-- destroying IShellLink(%p)\n",this);
IPersistFile_Release(this->lppf); /* IPersistFile*/ IPersistFile_Release(this->lppf); /* IPersistFile*/
@ -502,6 +512,7 @@ LPCLASSFACTORY IShellLinkW_CF_Constructor(void)
lpclf->ref = 1; lpclf->ref = 1;
lpclf->lpvtbl = &slwcfvt; lpclf->lpvtbl = &slwcfvt;
TRACE(shell,"(%p)->()\n",lpclf); TRACE(shell,"(%p)->()\n",lpclf);
shell32_ObjCount++;
return (LPCLASSFACTORY)lpclf; return (LPCLASSFACTORY)lpclf;
} }
/************************************************************************** /**************************************************************************
@ -539,6 +550,8 @@ static ULONG WINAPI IShellLinkW_CF_AddRef(LPUNKNOWN iface)
{ {
ICOM_THIS(IClassFactory,iface); ICOM_THIS(IClassFactory,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
@ -548,6 +561,8 @@ static ULONG WINAPI IShellLinkW_CF_Release(LPUNKNOWN iface)
{ {
ICOM_THIS(IClassFactory,iface); ICOM_THIS(IClassFactory,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",this); { TRACE(shell,"-- destroying IClassFactory(%p)\n",this);
HeapFree(GetProcessHeap(),0,this); HeapFree(GetProcessHeap(),0,this);
@ -679,6 +694,7 @@ LPSHELLLINKW IShellLinkW_Constructor(void)
sl->lppf = IPersistFile_Constructor(); sl->lppf = IPersistFile_Constructor();
TRACE(shell,"(%p)->()\n",sl); TRACE(shell,"(%p)->()\n",sl);
shell32_ObjCount++;
return sl; return sl;
} }
@ -715,21 +731,25 @@ static HRESULT WINAPI IShellLinkW_QueryInterface(
* IShellLinkW_AddRef * IShellLinkW_AddRef
*/ */
static ULONG WINAPI IShellLinkW_AddRef(LPSHELLLINKW this) static ULONG WINAPI IShellLinkW_AddRef(LPSHELLLINKW this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
return ++(this->ref);
shell32_ObjCount++;
return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
* IClassFactory_Release * IClassFactory_Release
*/ */
static ULONG WINAPI IShellLinkW_Release(LPSHELLLINKW this) static ULONG WINAPI IShellLinkW_Release(LPSHELLLINKW this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
if (!--(this->ref))
{ TRACE(shell,"-- destroying IShellLinkW(%p)\n",this); shell32_ObjCount--;
IPersistFile_Release(this->lppf); /* IPersistFile*/ if (!--(this->ref))
HeapFree(GetProcessHeap(),0,this); { TRACE(shell,"-- destroying IShellLinkW(%p)\n",this);
return 0; IPersistFile_Release(this->lppf); /* IPersistFile*/
} HeapFree(GetProcessHeap(),0,this);
return this->ref; return 0;
}
return this->ref;
} }
static HRESULT WINAPI IShellLinkW_GetPath(LPSHELLLINKW this, LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) static HRESULT WINAPI IShellLinkW_GetPath(LPSHELLLINKW this, LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags)

View file

@ -6,21 +6,15 @@
* *
*/ */
#include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ole.h"
#include "ole2.h"
#include "debug.h" #include "debug.h"
#include "shlobj.h"
#include "objbase.h" #include "objbase.h"
#include "shell.h"
#include "winerror.h" #include "winerror.h"
#include "winnls.h"
#include "winproc.h"
#include "winversion.h" #include "winversion.h"
#include "commctrl.h"
#include "shlguid.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
/************************************************************************* /*************************************************************************
@ -229,7 +223,9 @@ LPCLASSFACTORY IClassFactory_Constructor(void)
lpclf= (_IClassFactory*)HeapAlloc(GetProcessHeap(),0,sizeof(_IClassFactory)); lpclf= (_IClassFactory*)HeapAlloc(GetProcessHeap(),0,sizeof(_IClassFactory));
lpclf->ref = 1; lpclf->ref = 1;
lpclf->lpvtbl = &clfvt; lpclf->lpvtbl = &clfvt;
TRACE(shell,"(%p)->()\n",lpclf);
TRACE(shell,"(%p)->()\n",lpclf);
shell32_ObjCount++;
return (LPCLASSFACTORY)lpclf; return (LPCLASSFACTORY)lpclf;
} }
/************************************************************************** /**************************************************************************
@ -267,6 +263,8 @@ static ULONG WINAPI IClassFactory_fnAddRef(LPUNKNOWN iface)
{ {
ICOM_THIS(IClassFactory,iface); ICOM_THIS(IClassFactory,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
/****************************************************************************** /******************************************************************************
@ -276,6 +274,8 @@ static ULONG WINAPI IClassFactory_fnRelease(LPUNKNOWN iface)
{ {
ICOM_THIS(IClassFactory,iface); ICOM_THIS(IClassFactory,iface);
TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",this); { TRACE(shell,"-- destroying IClassFactory(%p)\n",this);
HeapFree(GetProcessHeap(),0,this); HeapFree(GetProcessHeap(),0,this);

View file

@ -1,35 +1,19 @@
/* /*
* Shell Ordinal Functions * The parameters of many functions changes between different OS versions
* * (NT uses Unicode strings, 95 uses ASCII strings)
* These are completely undocumented. The meaning of the functions changes
* between different OS versions (NT uses Unicode strings, 95 uses ASCII
* strings, etc. etc.)
* *
* They are just here so that explorer.exe and iexplore.exe can be tested.
*
* Copyright 1997 Marcus Meissner * Copyright 1997 Marcus Meissner
* 1998 Jürgen Schmied * 1998 Jürgen Schmied
*/ */
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <ctype.h>
#include "windows.h" #include "windows.h"
#include "winerror.h" #include "winerror.h"
#include "file.h"
#include "shell.h"
#include "heap.h"
#include "module.h"
#include "neexe.h"
#include "resource.h"
#include "dlgs.h"
#include "win.h"
#include "cursoricon.h"
#include "shlobj.h"
#include "debug.h" #include "debug.h"
#include "winreg.h"
#include "winnls.h" #include "winnls.h"
#include "winversion.h" #include "winversion.h"
#include "heap.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
/************************************************************************* /*************************************************************************
@ -604,7 +588,7 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
STARTUPINFO32A startupinfo; STARTUPINFO32A startupinfo;
PROCESS_INFORMATION processinformation; PROCESS_INFORMATION processinformation;
FIXME(shell,"mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%sstub\n", WARN(shell,"mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n",
sei->fMask, sei->hwnd, sei->lpVerb, sei->lpFile, sei->fMask, sei->hwnd, sei->lpVerb, sei->lpFile,
sei->lpParameters, sei->lpDirectory, sei->nShow, sei->lpClass); sei->lpParameters, sei->lpDirectory, sei->nShow, sei->lpClass);
@ -630,7 +614,7 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
/* process the IDList */ /* process the IDList */
if ( (sei->fMask & SEE_MASK_INVOKEIDLIST) == SEE_MASK_INVOKEIDLIST) /*0x0c*/ if ( (sei->fMask & SEE_MASK_INVOKEIDLIST) == SEE_MASK_INVOKEIDLIST) /*0x0c*/
{ SHGetPathFromIDList32A (sei->lpIDList,szApplicationName); { SHGetPathFromIDList32A (sei->lpIDList,szApplicationName);
FIXME(shell,"-- idlist=%p (%s)\n", sei->lpIDList, szApplicationName); TRACE(shell,"-- idlist=%p (%s)\n", sei->lpIDList, szApplicationName);
} }
else else
{ if (sei->fMask & SEE_MASK_IDLIST ) { if (sei->fMask & SEE_MASK_IDLIST )
@ -657,43 +641,58 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
memmove(pos,pos+3,len); memmove(pos,pos+3,len);
} }
FIXME(shell,"-- %s\n",szCommandline); TRACE(shell,"execute: %s %s\n",szApplicationName, szCommandline);
ZeroMemory(&startupinfo,sizeof(STARTUPINFO32A)); ZeroMemory(&startupinfo,sizeof(STARTUPINFO32A));
startupinfo.cb = sizeof(STARTUPINFO32A); startupinfo.cb = sizeof(STARTUPINFO32A);
CreateProcess32A(szApplicationName[0] ? szApplicationName:NULL, return CreateProcess32A(szApplicationName[0] ? szApplicationName:NULL,
szCommandline[0] ? szCommandline : NULL, szCommandline[0] ? szCommandline : NULL,
NULL, NULL, FALSE, 0, NULL, NULL, FALSE, 0,
NULL, NULL, &startupinfo, &processinformation); NULL, NULL, &startupinfo, &processinformation);
return 0;
} }
/************************************************************************* /*************************************************************************
* ShellExecuteEx [SHELL32.293] * ShellExecuteEx32W [SHELL32.293]
* *
*/ */
BOOL32 WINAPI ShellExecuteEx32W (LPSHELLEXECUTEINFO32W sei) BOOL32 WINAPI ShellExecuteEx32W (LPSHELLEXECUTEINFO32W sei)
{ WCHAR szTemp[MAX_PATH]; { SHELLEXECUTEINFO32A seiA;
DWORD ret;
FIXME(shell,"(%p): stub\n",sei); TRACE (shell,"%p\n", sei);
if (sei->fMask & SEE_MASK_IDLIST) memcpy(&seiA, sei, sizeof(SHELLEXECUTEINFO32A));
{ SHGetPathFromIDList32W (sei->lpIDList,szTemp);
TRACE (shell,"-- idlist=%p (%s)\n", sei->lpIDList, debugstr_w(szTemp));
}
if (sei->fMask & SEE_MASK_CLASSNAME)
{ TRACE (shell,"-- classname= %s\n", debugstr_w(sei->lpClass));
}
if (sei->lpVerb)
{ TRACE (shell,"-- action=%s\n", debugstr_w(sei->lpVerb));
}
return 0; if (sei->lpVerb)
seiA.lpVerb = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpVerb);
if (sei->lpFile)
seiA.lpFile = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpFile);
if (sei->lpParameters)
seiA.lpParameters = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpParameters);
if (sei->lpDirectory)
seiA.lpDirectory = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpDirectory);
if ((sei->fMask & SEE_MASK_CLASSNAME) && sei->lpClass)
seiA.lpClass = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpClass);
else
seiA.lpClass = NULL;
ret = ShellExecuteEx32A(&seiA);
if (seiA.lpVerb) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpVerb );
if (seiA.lpFile) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpFile );
if (seiA.lpParameters) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpParameters );
if (seiA.lpDirectory) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpDirectory );
if (seiA.lpClass) HeapFree( GetProcessHeap(), 0, (LPSTR) seiA.lpClass );
return ret;
} }
static LPUNKNOWN SHELL32_IExplorerInterface=0; static LPUNKNOWN SHELL32_IExplorerInterface=0;
/************************************************************************* /*************************************************************************
* SHSetInstanceExplorer [SHELL32.176] * SHSetInstanceExplorer [SHELL32.176]

View file

@ -4,17 +4,14 @@
* Many of this functions are in SHLWAPI.DLL also * Many of this functions are in SHLWAPI.DLL also
* *
*/ */
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "windows.h" #include "windows.h"
#include "winerror.h"
#include "file.h"
#include "shell.h"
#include "shlobj.h"
#include "debug.h" #include "debug.h"
#include "winnls.h" #include "winnls.h"
#include "winversion.h" #include "winversion.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
/************************************************************************* /*************************************************************************

View file

@ -6,20 +6,18 @@
* *
*/ */
#include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ole.h"
#include "ole2.h"
#include "debug.h" #include "debug.h"
#include "shlobj.h"
#include "objbase.h"
#include "shell.h"
#include "winerror.h" #include "winerror.h"
#include "winnls.h"
#include "winproc.h" #include "wine/obj_base.h"
#include "commctrl.h" #include "shlguid.h"
#include "pidl.h" #include "pidl.h"
#include "objbase.h"
#include "shlobj.h"
#include "shell32_main.h" #include "shell32_main.h"
static HRESULT WINAPI IShellFolder_QueryInterface(LPSHELLFOLDER,REFIID,LPVOID*); static HRESULT WINAPI IShellFolder_QueryInterface(LPSHELLFOLDER,REFIID,LPVOID*);
@ -104,36 +102,36 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
sf->lpvtbl=&sfvt; sf->lpvtbl=&sfvt;
sf->sMyPath=NULL; /* path of the folder */ sf->sMyPath=NULL; /* path of the folder */
sf->pMyPidl=NULL; /* my qualified pidl */ sf->pMyPidl=NULL; /* my qualified pidl */
sf->mpSFParent=pParent; /* parrent shellfolder */
TRACE(shell,"(%p)->(parent=%p, pidl=%p)\n",sf,pParent, pidl); TRACE(shell,"(%p)->(parent=%p, pidl=%p)\n",sf,pParent, pidl);
pdump(pidl); pdump(pidl);
/* keep a copy of the pidl in the instance*/ /* keep a copy of the pidl in the instance*/
sf->mpidl = ILClone(pidl); sf->mpidl = ILClone(pidl); /* my short pidl */
if(sf->mpidl) /* do we have a pidl? */ if(sf->mpidl) /* do we have a pidl? */
{ dwSize = 0; { dwSize = 0;
if(sf->mpSFParent->sMyPath) /* get the size of the parents path */ if(pParent->sMyPath) /* get the size of the parents path */
{ dwSize += strlen(sf->mpSFParent->sMyPath) ; { dwSize += strlen(pParent->sMyPath) ;
TRACE(shell,"-- (%p)->(parent's path=%s)\n",sf, debugstr_a(sf->mpSFParent->sMyPath)); TRACE(shell,"-- (%p)->(parent's path=%s)\n",sf, debugstr_a(pParent->sMyPath));
} }
dwSize += _ILGetFolderText(sf->mpidl,NULL,0); /* add the size of the foldername*/ dwSize += _ILGetFolderText(sf->mpidl,NULL,0); /* add the size of the foldername*/
sf->sMyPath = SHAlloc(dwSize+2); /* '\0' and backslash */ sf->sMyPath = SHAlloc(dwSize+2); /* '\0' and backslash */
if(sf->sMyPath) if(sf->sMyPath)
{ int len; { int len;
*(sf->sMyPath)=0x00; *(sf->sMyPath)=0x00;
if(sf->mpSFParent->sMyPath) /* if the parent has a path, get it*/ if(pParent->sMyPath) /* if the parent has a path, get it*/
{ strcpy(sf->sMyPath, sf->mpSFParent->sMyPath); { strcpy(sf->sMyPath, pParent->sMyPath);
PathAddBackslash32A (sf->sMyPath); PathAddBackslash32A (sf->sMyPath);
} }
sf->pMyPidl = ILCombine(sf->mpSFParent->pMyPidl, pidl); sf->pMyPidl = ILCombine(pParent->pMyPidl, pidl);
len = strlen(sf->sMyPath); len = strlen(sf->sMyPath);
_ILGetFolderText(sf->mpidl, sf->sMyPath+len, dwSize-len); _ILGetFolderText(sf->mpidl, sf->sMyPath+len, dwSize-len);
TRACE(shell,"-- (%p)->(my pidl=%p, my path=%s)\n",sf, sf->pMyPidl,debugstr_a(sf->sMyPath)); TRACE(shell,"-- (%p)->(my pidl=%p, my path=%s)\n",sf, sf->pMyPidl,debugstr_a(sf->sMyPath));
pdump (sf->pMyPidl); pdump (sf->pMyPidl);
} }
} }
shell32_ObjCount++;
return sf; return sf;
} }
/************************************************************************** /**************************************************************************
@ -171,7 +169,8 @@ static HRESULT WINAPI IShellFolder_QueryInterface(
*/ */
static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER this) static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1); { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount++;
return ++(this->ref); return ++(this->ref);
} }
@ -180,6 +179,8 @@ static ULONG WINAPI IShellFolder_AddRef(LPSHELLFOLDER this)
*/ */
static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this) static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref); { TRACE(shell,"(%p)->(count=%lu)\n",this,this->ref);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell,"-- destroying IShellFolder(%p)\n",this); { TRACE(shell,"-- destroying IShellFolder(%p)\n",this);

View file

@ -2,27 +2,25 @@
* ShellView * ShellView
* *
* Copyright 1998 <juergen.schmied@metronet.de> * Copyright 1998 <juergen.schmied@metronet.de>
*
* FIXME: when the ShellView_WndProc gets a WM_NCDESTROY should we do a
* Release() ???
*
*/ */
#include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "ole.h"
#include "ole2.h"
#include "debug.h" #include "debug.h"
#include "servprov.h"
#include "shlobj.h"
#include "objbase.h"
#include "shell.h"
#include "winerror.h" #include "winerror.h"
#include "winnls.h"
#include "winproc.h"
#include "commctrl.h"
#include "shell32_main.h"
#include "pidl.h" #include "pidl.h"
#include "shresdef.h" #include "shlguid.h"
#include "shlobj.h"
#include "servprov.h"
#include "objbase.h"
#include "if_macros.h" #include "if_macros.h"
#include "shell32_main.h"
#include "shresdef.h"
/*********************************************************************** /***********************************************************************
* IShellView implementation * IShellView implementation
@ -128,6 +126,7 @@ LPSHELLVIEW IShellView_Constructor( LPSHELLFOLDER pFolder, LPCITEMIDLIST pidl)
sv->pSFParent->lpvtbl->fnAddRef(sv->pSFParent); sv->pSFParent->lpvtbl->fnAddRef(sv->pSFParent);
TRACE(shell,"(%p)->(%p pidl=%p)\n",sv, pFolder, pidl); TRACE(shell,"(%p)->(%p pidl=%p)\n",sv, pFolder, pidl);
shell32_ObjCount++;
return sv; return sv;
} }
/************************************************************************** /**************************************************************************
@ -390,13 +389,13 @@ static HRESULT ShellView_FillList(LPSHELLVIEW this)
{ ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/ { ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listviewitem*/
lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/
lvItem.iItem = ListView_GetItemCount(this->hWndList); /*add the item to the end of the list*/ lvItem.iItem = ListView_GetItemCount(this->hWndList); /*add the item to the end of the list*/
lvItem.lParam = (LPARAM)ILClone(pidl); /*set the item's data*/ lvItem.lParam = (LPARAM) pidl; /*set the item's data*/
lvItem.pszText = LPSTR_TEXTCALLBACK32A; /*get text on a callback basis*/ lvItem.pszText = LPSTR_TEXTCALLBACK32A; /*get text on a callback basis*/
lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
ListView_InsertItem32A(this->hWndList, &lvItem); ListView_InsertItem32A(this->hWndList, &lvItem);
} }
else else
SHFree(pidl); /* the listview has a COPY*/ SHFree(pidl); /* the listview has the COPY*/
} }
/*turn the listview's redrawing back on and force it to draw*/ /*turn the listview's redrawing back on and force it to draw*/
@ -1316,14 +1315,18 @@ static HRESULT WINAPI IShellView_QueryInterface(LPSHELLVIEW this,REFIID riid, LP
* IShellView::AddRef * IShellView::AddRef
*/ */
static ULONG WINAPI IShellView_AddRef(LPSHELLVIEW this) static ULONG WINAPI IShellView_AddRef(LPSHELLVIEW this)
{ TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1); { TRACE(shell,"(%p)->(count=%lu)\n",this,(this->ref)+1);
return ++(this->ref);
shell32_ObjCount++;
return ++(this->ref);
} }
/************************************************************************** /**************************************************************************
* IShellView_Release * IShellView_Release
*/ */
static ULONG WINAPI IShellView_Release(LPSHELLVIEW this) static ULONG WINAPI IShellView_Release(LPSHELLVIEW this)
{ TRACE(shell,"(%p)->()\n",this); { TRACE(shell,"(%p)->()\n",this);
shell32_ObjCount--;
if (!--(this->ref)) if (!--(this->ref))
{ TRACE(shell," destroying IShellView(%p)\n",this); { TRACE(shell," destroying IShellView(%p)\n",this);
@ -1333,6 +1336,9 @@ static ULONG WINAPI IShellView_Release(LPSHELLVIEW this)
if (this->aSelectedItems) if (this->aSelectedItems)
SHFree(this->aSelectedItems); SHFree(this->aSelectedItems);
if (this->pCommDlgBrowser)
this->pCommDlgBrowser->lpvtbl->fnRelease(this->pCommDlgBrowser);
HeapFree(GetProcessHeap(),0,this); HeapFree(GetProcessHeap(),0,this);
return 0; return 0;
} }
@ -1342,7 +1348,7 @@ static ULONG WINAPI IShellView_Release(LPSHELLVIEW this)
* ShellView_GetWindow * ShellView_GetWindow
*/ */
static HRESULT WINAPI IShellView_GetWindow(LPSHELLVIEW this,HWND32 * phWnd) static HRESULT WINAPI IShellView_GetWindow(LPSHELLVIEW this,HWND32 * phWnd)
{ TRACE(shell,"(%p) stub\n",this); { TRACE(shell,"(%p)\n",this);
*phWnd = this->hWnd; *phWnd = this->hWnd;
return S_OK; return S_OK;
@ -1439,11 +1445,10 @@ static HRESULT WINAPI IShellView_CreateViewWindow(LPSHELLVIEW this, IShellView *
IShellBrowser_AddRef(this->pShellBrowser); IShellBrowser_AddRef(this->pShellBrowser);
IShellBrowser_GetWindow(this->pShellBrowser, &(this->hWndParent)); IShellBrowser_GetWindow(this->pShellBrowser, &(this->hWndParent));
/* try to get the ICommDlgBrowserInterface */ /* try to get the ICommDlgBrowserInterface, adds a reference !!! */
this->pCommDlgBrowser=NULL; this->pCommDlgBrowser=NULL;
if ( SUCCEEDED (IShellBrowser_QueryInterface( this->pShellBrowser, if ( SUCCEEDED (IShellBrowser_QueryInterface( this->pShellBrowser,
(REFIID)&IID_ICommDlgBrowser, (REFIID)&IID_ICommDlgBrowser, (LPVOID*) &this->pCommDlgBrowser)))
(LPVOID*) &this->pCommDlgBrowser)))
{ TRACE(shell,"-- CommDlgBrowser\n"); { TRACE(shell,"-- CommDlgBrowser\n");
} }

View file

@ -11,21 +11,7 @@
#define FAR #define FAR
#define THIS_ THIS, #define THIS_ THIS,
/* fixme move to wine/obj_*.h */
DEFINE_OLEGUID(IID_IUnknown,0,0,0);
DEFINE_OLEGUID(IID_IClassFactory,1,0,0);
DEFINE_OLEGUID(IID_IMalloc,2,0,0);
DEFINE_OLEGUID(IID_IMarshal,3,0,0);
DEFINE_OLEGUID(IID_IStorage,0xb,0,0);
DEFINE_OLEGUID(IID_IStream,0xc,0,0);
DEFINE_OLEGUID(IID_IBindCtx,0xe,0,0);
DEFINE_OLEGUID(IID_IMoniker,0xf,0,0);
DEFINE_OLEGUID(IID_IRunningObject,0x10,0,0);
DEFINE_OLEGUID(IID_IRootStorage,0x12,0,0);
DEFINE_OLEGUID(IID_IMessageFilter,0x16,0,0);
DEFINE_OLEGUID(IID_IStdMarshalInfo,0x18,0,0);
DEFINE_OLEGUID(IID_IDispatch, 0x00020400,0,0); DEFINE_OLEGUID(IID_IDispatch, 0x00020400,0,0);
DEFINE_OLEGUID(IID_ITypeInfo, 0x00020401,0,0); DEFINE_OLEGUID(IID_ITypeInfo, 0x00020401,0,0);
DEFINE_OLEGUID(IID_ITypeLib, 0x00020402,0,0); DEFINE_OLEGUID(IID_ITypeLib, 0x00020402,0,0);

View file

@ -1,13 +1,56 @@
#ifndef __WINE_SHLGUID_H #ifndef __WINE_SHLGUID_H
#define __WINE_SHLGUID_H #define __WINE_SHLGUID_H
#include "initguid.h"
/* This file defines the GUID of the shell objects. In WINE we define DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
* the GUIDs where the interface is declared so this file just DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
* includes shlobj.h
*/
#include "shlobj.h" /* shell32 formatids */
DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
/* command group ids */
DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
/* shell32interface ids */
DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
#define SID_SShellBrowser IID_IShellBrowser
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
/****************************************************************************
* the following should be moved to the right place
*/
DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
DEFINE_SHLGUID(IID_IDropSource, 0x00000121L, 0, 0);
DEFINE_SHLGUID(IID_IDropTarget, 0x00000122L, 0, 0);
#endif /* __WINE_SHLGUID_H */ #endif /* __WINE_SHLGUID_H */

View file

@ -33,63 +33,6 @@ typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame; typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser; typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
/****************************************************************************
* SHELL ID
*/
/* desktop elements */
DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
/* strange Objects */
DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
DEFINE_SHLGUID(IID_IDropSource, 0x00000121L, 0, 0);
DEFINE_SHLGUID(IID_IDropTarget, 0x00000122L, 0, 0);
DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
/* shell32 formatids */
DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
/* command group ids */
DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
/* shell32interface ids */
DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
#define SID_SShellBrowser IID_IShellBrowser
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
/**************************************************************************** /****************************************************************************
* STRRET * STRRET
*/ */
@ -503,7 +446,6 @@ struct tagSHELLFOLDER {
LPSTR sMyPath; LPSTR sMyPath;
LPITEMIDLIST pMyPidl; LPITEMIDLIST pMyPidl;
LPITEMIDLIST mpidl; LPITEMIDLIST mpidl;
LPSHELLFOLDER mpSFParent;
}; };
extern LPSHELLFOLDER pdesktopfolder; extern LPSHELLFOLDER pdesktopfolder;
@ -1221,6 +1163,8 @@ typedef struct
} SHELLFLAGSTATE, * LPSHELLFLAGSTATE; } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) ;
#undef PURE #undef PURE
#undef FAR #undef FAR
#undef THIS #undef THIS

View file

@ -4259,8 +4259,8 @@ VOID WINAPI SetLastError(DWORD);
/* Declarations for functions that change between Win16 and Win32 */ /* Declarations for functions that change between Win16 and Win32 */
LRESULT WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
LRESULT WINAPI AboutDlgProc32(HWND32,UINT32,WPARAM32,LPARAM); BOOL32 WINAPI AboutDlgProc32(HWND32,UINT32,WPARAM32,LPARAM);
#define AboutDlgProc WINELIB_NAME(AboutDlgProc) #define AboutDlgProc WINELIB_NAME(AboutDlgProc)
INT16 WINAPI AccessResource16(HINSTANCE16,HRSRC16); INT16 WINAPI AccessResource16(HINSTANCE16,HRSRC16);
INT32 WINAPI AccessResource32(HMODULE32,HRSRC32); INT32 WINAPI AccessResource32(HMODULE32,HRSRC32);

View file

@ -451,7 +451,7 @@ HINSTANCE16 WINAPI FindExecutable16( LPCSTR lpFile, LPCSTR lpDirectory,
/************************************************************************* /*************************************************************************
* AboutDlgProc16 (SHELL.33) * AboutDlgProc16 (SHELL.33)
*/ */
LRESULT WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam, BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam,
LPARAM lParam ) LPARAM lParam )
{ return AboutDlgProc32( hWnd, msg, wParam, lParam ); { return AboutDlgProc32( hWnd, msg, wParam, lParam );
} }