1998-11-25 17:39:47 +01:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Copyright 1997 Marcus Meissner
|
|
|
|
* Copyright 1998 Juergen Schmied
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include "debug.h"
|
1999-01-23 15:12:48 +01:00
|
|
|
#include "winerror.h"
|
|
|
|
|
1999-01-17 17:32:32 +01:00
|
|
|
#include "wine/obj_base.h"
|
|
|
|
#include "wine/obj_storage.h"
|
1999-02-24 16:58:26 +01:00
|
|
|
#include "wine/obj_shelllink.h"
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
#include "heap.h"
|
|
|
|
#include "winnls.h"
|
1999-01-23 15:12:48 +01:00
|
|
|
#include "pidl.h"
|
1998-11-25 17:39:47 +01:00
|
|
|
#include "shell32_main.h"
|
1999-01-23 15:12:48 +01:00
|
|
|
#include "shlguid.h"
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
/* link file formats */
|
|
|
|
|
|
|
|
#pragma (1);
|
|
|
|
|
|
|
|
/* lnk elements: simple link has 0x0B */
|
|
|
|
#define WORKDIR 0x10
|
|
|
|
#define ARGUMENT 0x20
|
|
|
|
#define ICON 0x40
|
|
|
|
/* startup type */
|
|
|
|
#define NORMAL 0x01
|
|
|
|
#define MAXIMIZED 0x03
|
|
|
|
#define MINIMIZED 0x07
|
|
|
|
|
|
|
|
typedef struct _LINK_HEADER
|
|
|
|
{ DWORD MagicStr; /* 0x00 'L','\0','\0','\0' */
|
|
|
|
GUID MagicGuid; /* 0x04 is CLSID_ShellLink */
|
|
|
|
DWORD Flag1; /* 0x14 describes elements following */
|
|
|
|
DWORD Flag2; /* 0x18 */
|
|
|
|
FILETIME Time1; /* 0x1c */
|
|
|
|
FILETIME Time2; /* 0x24 */
|
|
|
|
FILETIME Time3; /* 0x2c */
|
|
|
|
DWORD Unknown1; /* 0x34 */
|
|
|
|
DWORD Unknown2; /* 0x38 icon number */
|
|
|
|
DWORD Flag3; /* 0x3c startup type */
|
|
|
|
DWORD Unknown4; /* 0x40 hotkey */
|
|
|
|
DWORD Unknown5; /* 0x44 */
|
|
|
|
DWORD Unknown6; /* 0x48 */
|
|
|
|
USHORT PidlSize; /* 0x4c */
|
|
|
|
ITEMIDLIST Pidl; /* 0x4e */
|
|
|
|
} LINK_HEADER, * PLINK_HEADER;
|
|
|
|
|
|
|
|
#pragma (4);
|
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
/* IPersistFile Implementation */
|
1999-02-17 16:57:24 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
1999-02-24 16:58:26 +01:00
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VTABLE(IPersistFile)* lpvtbl;
|
|
|
|
DWORD ref;
|
|
|
|
LPSTR sPath;
|
|
|
|
LPITEMIDLIST pPidl;
|
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
} IPersistFileImpl;
|
1999-01-17 17:32:32 +01:00
|
|
|
|
|
|
|
static struct ICOM_VTABLE(IPersistFile) pfvt;
|
|
|
|
|
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* IPersistFile_Constructor
|
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
IPersistFileImpl * IPersistFile_Constructor(void)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
IPersistFileImpl* sl;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
sl = (IPersistFileImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IPersistFileImpl));
|
1998-12-14 15:51:27 +01:00
|
|
|
sl->ref = 1;
|
|
|
|
sl->lpvtbl = &pfvt;
|
1999-02-24 16:58:26 +01:00
|
|
|
sl->sPath = NULL;
|
|
|
|
sl->pPidl = NULL;
|
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
TRACE(shell,"(%p)->()\n",sl);
|
1999-01-23 15:12:48 +01:00
|
|
|
shell32_ObjCount++;
|
1999-02-24 16:58:26 +01:00
|
|
|
return sl;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* IPersistFile_QueryInterface
|
|
|
|
*/
|
1999-01-17 17:32:32 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnQueryInterface(
|
1999-02-18 14:26:22 +01:00
|
|
|
IPersistFile* iface, REFIID riid, LPVOID *ppvObj)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IPersistFileImpl,iface);
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-01-17 17:32:32 +01:00
|
|
|
char xriid[50];
|
1998-12-14 15:51:27 +01:00
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",This,xriid);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
*ppvObj = NULL;
|
|
|
|
|
|
|
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
1999-02-17 16:57:24 +01:00
|
|
|
{ *ppvObj = This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IPersistFile)) /*IPersistFile*/
|
1999-02-17 16:57:24 +01:00
|
|
|
{ *ppvObj = (LPPERSISTFILE)This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppvObj)
|
1999-01-17 17:32:32 +01:00
|
|
|
{ IPersistFile_AddRef((IPersistFile*)*ppvObj);
|
1998-12-14 15:51:27 +01:00
|
|
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IPersistFile_AddRef
|
|
|
|
*/
|
1999-02-18 14:26:22 +01:00
|
|
|
static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IPersistFileImpl,iface);
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount++;
|
1999-02-17 16:57:24 +01:00
|
|
|
return ++(This->ref);
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IPersistFile_Release
|
|
|
|
*/
|
1999-02-18 14:26:22 +01:00
|
|
|
static ULONG WINAPI IPersistFile_fnRelease(IPersistFile* iface)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IPersistFileImpl,iface);
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount--;
|
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
if (!--(This->ref))
|
|
|
|
{ TRACE(shell,"-- destroying IPersistFile(%p)\n",This);
|
1999-02-24 16:58:26 +01:00
|
|
|
if (This->sPath)
|
|
|
|
HeapFree(GetProcessHeap(),0,This->sPath);
|
|
|
|
if (This->pPidl)
|
|
|
|
SHFree(This->pPidl);
|
1999-02-17 16:57:24 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-02-17 16:57:24 +01:00
|
|
|
return This->ref;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
|
1999-02-18 14:26:22 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnGetClassID(const IPersistFile* iface, CLSID *pClassID)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
ICOM_CTHIS(IPersistFile,iface);
|
1999-02-17 16:57:24 +01:00
|
|
|
FIXME(shell,"(%p)\n",This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-01-17 17:32:32 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnIsDirty(const IPersistFile* iface)
|
|
|
|
{
|
|
|
|
ICOM_CTHIS(IPersistFile,iface);
|
1999-02-17 16:57:24 +01:00
|
|
|
FIXME(shell,"(%p)\n",This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IPersistFileImpl,iface);
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
OFSTRUCT ofs;
|
|
|
|
LPSTR sFile = HEAP_strdupWtoA ( GetProcessHeap(), 0, pszFileName);
|
1999-02-26 12:11:13 +01:00
|
|
|
HFILE hFile = OpenFile( sFile, &ofs, OF_READ );
|
|
|
|
HANDLE hMapping;
|
1999-02-24 16:58:26 +01:00
|
|
|
PLINK_HEADER pImage;
|
|
|
|
HRESULT hRet = E_FAIL;
|
|
|
|
CHAR sTemp[512];
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(%s)\n",This,sFile);
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(),0,sFile);
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
if ( !(hMapping = CreateFileMappingA(hFile,NULL,PAGE_READONLY|SEC_COMMIT,0,0,NULL)))
|
1999-02-24 16:58:26 +01:00
|
|
|
{ WARN(shell,"failed to create filemap.\n");
|
|
|
|
goto end_1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !(pImage = (PLINK_HEADER) MapViewOfFile(hMapping,FILE_MAP_READ,0,0,0)))
|
|
|
|
{ WARN(shell,"failed to mmap filemap.\n");
|
|
|
|
goto end_2;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!( (pImage->MagicStr == 0x0000004CL) && IsEqualIID(&pImage->MagicGuid, &CLSID_ShellLink)))
|
|
|
|
{ TRACE(shell,"file isn't a lnk\n");
|
|
|
|
goto end_3;
|
|
|
|
}
|
|
|
|
|
|
|
|
{ /* for debugging */
|
|
|
|
SYSTEMTIME time;
|
|
|
|
FileTimeToSystemTime (&pImage->Time1, &time);
|
1999-02-26 12:11:13 +01:00
|
|
|
GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
|
1999-02-24 16:58:26 +01:00
|
|
|
TRACE(shell, "-- time1: %s\n", sTemp);
|
|
|
|
|
|
|
|
FileTimeToSystemTime (&pImage->Time2, &time);
|
1999-02-26 12:11:13 +01:00
|
|
|
GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
|
1999-02-24 16:58:26 +01:00
|
|
|
TRACE(shell, "-- time2: %s\n", sTemp);
|
|
|
|
|
|
|
|
FileTimeToSystemTime (&pImage->Time3, &time);
|
1999-02-26 12:11:13 +01:00
|
|
|
GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, sTemp, 256);
|
1999-02-24 16:58:26 +01:00
|
|
|
TRACE(shell, "-- time3: %s\n", sTemp);
|
|
|
|
pdump (&pImage->Pidl);
|
|
|
|
}
|
|
|
|
|
|
|
|
This->pPidl = ILClone (&pImage->Pidl);
|
|
|
|
|
|
|
|
_ILGetPidlPath(&pImage->Pidl, sTemp, 512);
|
|
|
|
This->sPath = HEAP_strdupA ( GetProcessHeap(), 0, sTemp);
|
|
|
|
|
|
|
|
hRet = NOERROR;
|
|
|
|
end_3: UnmapViewOfFile(pImage);
|
|
|
|
end_2: CloseHandle(hMapping);
|
1999-02-26 12:11:13 +01:00
|
|
|
end_1: _lclose( hFile);
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
return hRet;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IPersistFileImpl,iface);
|
|
|
|
FIXME(shell,"(%p)->(%s)\n",This,debugstr_w(pszFileName));
|
1999-01-17 17:32:32 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IPersistFileImpl,iface);
|
|
|
|
FIXME(shell,"(%p)->(%s)\n",This,debugstr_w(pszFileName));
|
1999-01-17 17:32:32 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IPersistFile_fnGetCurFile(const IPersistFile* iface, LPOLESTR *ppszFileName)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_CTHIS(IPersistFileImpl,iface);
|
|
|
|
FIXME(shell,"(%p)\n",This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-01-17 17:32:32 +01:00
|
|
|
|
|
|
|
static struct ICOM_VTABLE(IPersistFile) pfvt =
|
|
|
|
{
|
1999-02-24 16:58:26 +01:00
|
|
|
IPersistFile_fnQueryInterface,
|
|
|
|
IPersistFile_fnAddRef,
|
|
|
|
IPersistFile_fnRelease,
|
|
|
|
IPersistFile_fnGetClassID,
|
|
|
|
IPersistFile_fnIsDirty,
|
|
|
|
IPersistFile_fnLoad,
|
|
|
|
IPersistFile_fnSave,
|
|
|
|
IPersistFile_fnSaveCompleted,
|
|
|
|
IPersistFile_fnGetCurFile
|
1999-01-17 17:32:32 +01:00
|
|
|
};
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
1999-01-17 17:32:32 +01:00
|
|
|
* IShellLink's IClassFactory implementation
|
1998-12-14 15:51:27 +01:00
|
|
|
*/
|
1999-02-17 16:57:24 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VTABLE(IClassFactory)* lpvtbl;
|
|
|
|
DWORD ref;
|
|
|
|
} IClassFactoryImpl;
|
1999-01-17 17:32:32 +01:00
|
|
|
|
|
|
|
static ICOM_VTABLE(IClassFactory) slcfvt;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* IShellLink_CF_Constructor
|
|
|
|
*/
|
|
|
|
|
|
|
|
LPCLASSFACTORY IShellLink_CF_Constructor(void)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
IClassFactoryImpl* lpclf;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
lpclf= (IClassFactoryImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactoryImpl));
|
1998-12-14 15:51:27 +01:00
|
|
|
lpclf->ref = 1;
|
|
|
|
lpclf->lpvtbl = &slcfvt;
|
|
|
|
TRACE(shell,"(%p)->()\n",lpclf);
|
1999-01-23 15:12:48 +01:00
|
|
|
shell32_ObjCount++;
|
1999-01-17 17:32:32 +01:00
|
|
|
return (LPCLASSFACTORY)lpclf;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/**************************************************************************
|
|
|
|
* IShellLink_CF_QueryInterface
|
|
|
|
*/
|
|
|
|
static HRESULT WINAPI IShellLink_CF_QueryInterface(
|
1999-02-17 16:57:24 +01:00
|
|
|
IClassFactory* iface, REFIID riid, LPVOID *ppvObj)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
1999-01-17 17:32:32 +01:00
|
|
|
char xriid[50];
|
1998-12-14 15:51:27 +01:00
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",This,xriid);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
*ppvObj = NULL;
|
|
|
|
|
|
|
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
1999-02-17 16:57:24 +01:00
|
|
|
{ *ppvObj = (LPUNKNOWN)This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IClassFactory)) /*IClassFactory*/
|
1999-02-17 16:57:24 +01:00
|
|
|
{ *ppvObj = (LPCLASSFACTORY)This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppvObj)
|
1999-01-17 17:32:32 +01:00
|
|
|
{ IUnknown_AddRef((IUnknown*)*ppvObj);
|
1998-12-14 15:51:27 +01:00
|
|
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLink_CF_AddRef
|
|
|
|
*/
|
1999-02-17 16:57:24 +01:00
|
|
|
static ULONG WINAPI IShellLink_CF_AddRef(IClassFactory* iface)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount++;
|
1999-02-17 16:57:24 +01:00
|
|
|
return ++(This->ref);
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLink_CF_Release
|
|
|
|
*/
|
1999-02-17 16:57:24 +01:00
|
|
|
static ULONG WINAPI IShellLink_CF_Release(IClassFactory* iface)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount--;
|
1999-02-17 16:57:24 +01:00
|
|
|
if (!--(This->ref))
|
|
|
|
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",This);
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-02-17 16:57:24 +01:00
|
|
|
return This->ref;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLink_CF_CreateInstance
|
|
|
|
*/
|
|
|
|
static HRESULT WINAPI IShellLink_CF_CreateInstance(
|
1999-02-17 16:57:24 +01:00
|
|
|
IClassFactory* iface, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
1999-01-17 17:32:32 +01:00
|
|
|
IUnknown *pObj = NULL;
|
1998-12-14 15:51:27 +01:00
|
|
|
HRESULT hres;
|
|
|
|
char xriid[50];
|
|
|
|
|
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"%p->(%p,\n\tIID:\t%s,%p)\n",This,pUnknown,xriid,ppObject);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
*ppObject = NULL;
|
|
|
|
|
|
|
|
if(pUnknown)
|
|
|
|
{ return(CLASS_E_NOAGGREGATION);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IShellLink))
|
|
|
|
{ pObj = (IUnknown *)IShellLink_Constructor();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ ERR(shell,"unknown IID requested\n\tIID:\t%s\n",xriid);
|
|
|
|
return(E_NOINTERFACE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!pObj)
|
|
|
|
{ return(E_OUTOFMEMORY);
|
|
|
|
}
|
|
|
|
|
1999-01-17 17:32:32 +01:00
|
|
|
hres = IUnknown_QueryInterface(pObj,riid, ppObject);
|
|
|
|
IUnknown_Release(pObj);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"-- Object created: (%p)->%p\n",This,*ppObject);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLink_CF_LockServer
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_CF_LockServer(IClassFactory* iface, BOOL fLock)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
|
|
|
TRACE(shell,"%p->(0x%x), not implemented\n",This, fLock);
|
1998-12-14 15:51:27 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
1999-01-17 17:32:32 +01:00
|
|
|
static ICOM_VTABLE(IClassFactory) slcfvt =
|
|
|
|
{
|
|
|
|
IShellLink_CF_QueryInterface,
|
|
|
|
IShellLink_CF_AddRef,
|
1999-02-10 07:42:03 +01:00
|
|
|
IShellLink_CF_Release,
|
1999-01-17 17:32:32 +01:00
|
|
|
IShellLink_CF_CreateInstance,
|
|
|
|
IShellLink_CF_LockServer
|
|
|
|
};
|
1998-12-14 15:51:27 +01:00
|
|
|
|
1998-11-25 17:39:47 +01:00
|
|
|
/**************************************************************************
|
1999-02-24 16:58:26 +01:00
|
|
|
* IShellLink Implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
ICOM_VTABLE(IShellLink)* lpvtbl;
|
|
|
|
DWORD ref;
|
|
|
|
IPersistFileImpl* lppf;
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
} IShellLinkImpl;
|
1999-01-17 17:32:32 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
static ICOM_VTABLE(IShellLink) slvt;
|
1998-11-25 17:39:47 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* IShellLink_Constructor
|
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
IShellLink * IShellLink_Constructor(void)
|
|
|
|
{ IShellLinkImpl * sl;
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(),0,sizeof(IShellLinkImpl));
|
1998-11-25 17:39:47 +01:00
|
|
|
sl->ref = 1;
|
|
|
|
sl->lpvtbl = &slvt;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
sl->lppf = IPersistFile_Constructor();
|
|
|
|
|
1998-11-25 17:39:47 +01:00
|
|
|
TRACE(shell,"(%p)->()\n",sl);
|
1999-01-23 15:12:48 +01:00
|
|
|
shell32_ObjCount++;
|
1999-02-24 16:58:26 +01:00
|
|
|
return (IShellLink *)sl;
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* IShellLink::QueryInterface
|
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnQueryInterface( IShellLink * iface, REFIID riid, LPVOID *ppvObj)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
char xriid[50];
|
1998-12-14 15:51:27 +01:00
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
1999-02-24 16:58:26 +01:00
|
|
|
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",This,xriid);
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
*ppvObj = NULL;
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
1999-02-24 16:58:26 +01:00
|
|
|
{ *ppvObj = This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IShellLink)) /*IShellLink*/
|
1999-02-24 16:58:26 +01:00
|
|
|
{ *ppvObj = (IShellLink *)This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IPersistFile)) /*IPersistFile*/
|
1999-02-24 16:58:26 +01:00
|
|
|
{ *ppvObj = (IPersistFile *)This->lppf;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
if(*ppvObj)
|
1999-02-24 16:58:26 +01:00
|
|
|
{ IShellLink_AddRef((IShellLink*)*ppvObj);
|
1998-12-14 15:51:27 +01:00
|
|
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
|
|
|
return E_NOINTERFACE;
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLink_AddRef
|
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
static ULONG WINAPI IShellLink_fnAddRef(IShellLink * iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount++;
|
1999-02-24 16:58:26 +01:00
|
|
|
return ++(This->ref);
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
1998-12-14 15:51:27 +01:00
|
|
|
* IShellLink_Release
|
1998-11-25 17:39:47 +01:00
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
static ULONG WINAPI IShellLink_fnRelease(IShellLink * iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount--;
|
1999-02-24 16:58:26 +01:00
|
|
|
if (!--(This->ref))
|
|
|
|
{ TRACE(shell,"-- destroying IShellLink(%p)\n",This);
|
|
|
|
IPersistFile_Release((IPersistFile*) This->lppf); /* IPersistFile*/
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
return This->ref;
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetPath(IShellLink * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",This, pszFile, cchMaxPath, pfd, fFlags);
|
|
|
|
|
|
|
|
strncpy(pszFile,This->lppf->sPath, cchMaxPath);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetIDList(IShellLink * iface, LPITEMIDLIST * ppidl)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(ppidl=%p)\n",This, ppidl);
|
|
|
|
|
|
|
|
*ppidl = ILClone(This->lppf->pPidl);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetIDList(IShellLink * iface, LPCITEMIDLIST pidl)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
TRACE (shell,"(%p)->(pidl=%p)\n",This, pidl);
|
|
|
|
|
|
|
|
if (This->lppf->pPidl)
|
|
|
|
SHFree(This->lppf->pPidl);
|
|
|
|
This->lppf->pPidl = ILClone (pidl);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetDescription(IShellLink * iface, LPSTR pszName,INT cchMaxName)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
|
1998-11-25 17:39:47 +01:00
|
|
|
strncpy(pszName,"Description, FIXME",cchMaxName);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetDescription(IShellLink * iface, LPCSTR pszName)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(desc=%s)\n",This, pszName);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetWorkingDirectory(IShellLink * iface, LPSTR pszDir,INT cchMaxPath)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->()\n",This);
|
1998-11-25 17:39:47 +01:00
|
|
|
strncpy(pszDir,"c:\\", cchMaxPath);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetWorkingDirectory(IShellLink * iface, LPCSTR pszDir)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(dir=%s)\n",This, pszDir);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetArguments(IShellLink * iface, LPSTR pszArgs,INT cchMaxPath)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p len=%u)\n",This, pszArgs, cchMaxPath);
|
1998-11-25 17:39:47 +01:00
|
|
|
strncpy(pszArgs, "", cchMaxPath);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetArguments(IShellLink * iface, LPCSTR pszArgs)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(args=%s)\n",This, pszArgs);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetHotkey(IShellLink * iface, WORD *pwHotkey)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p)\n",This, pwHotkey);
|
1998-11-25 17:39:47 +01:00
|
|
|
*pwHotkey=0x0;
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetHotkey(IShellLink * iface, WORD wHotkey)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(hotkey=%x)\n",This, wHotkey);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetShowCmd(IShellLink * iface, INT *piShowCmd)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p)\n",This, piShowCmd);
|
1998-11-25 17:39:47 +01:00
|
|
|
*piShowCmd=0;
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetShowCmd(IShellLink * iface, INT iShowCmd)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(showcmd=%x)\n",This, iShowCmd);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnGetIconLocation(IShellLink * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p len=%u iicon=%p)\n",This, pszIconPath, cchIconPath, piIcon);
|
1998-11-25 17:39:47 +01:00
|
|
|
strncpy(pszIconPath,"shell32.dll",cchIconPath);
|
|
|
|
*piIcon=1;
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetIconLocation(IShellLink * iface, LPCSTR pszIconPath,INT iIcon)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetRelativePath(IShellLink * iface, LPCSTR pszPathRel, DWORD dwReserved)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnResolve(IShellLink * iface, HWND hwnd, DWORD fFlags)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLink_fnSetPath(IShellLink * iface, LPCSTR pszFile)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(path=%s)\n",This, pszFile);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* IShellLink Implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
static ICOM_VTABLE(IShellLink) slvt =
|
|
|
|
{ IShellLink_fnQueryInterface,
|
|
|
|
IShellLink_fnAddRef,
|
|
|
|
IShellLink_fnRelease,
|
|
|
|
IShellLink_fnGetPath,
|
|
|
|
IShellLink_fnGetIDList,
|
|
|
|
IShellLink_fnSetIDList,
|
|
|
|
IShellLink_fnGetDescription,
|
|
|
|
IShellLink_fnSetDescription,
|
|
|
|
IShellLink_fnGetWorkingDirectory,
|
|
|
|
IShellLink_fnSetWorkingDirectory,
|
|
|
|
IShellLink_fnGetArguments,
|
|
|
|
IShellLink_fnSetArguments,
|
|
|
|
IShellLink_fnGetHotkey,
|
|
|
|
IShellLink_fnSetHotkey,
|
|
|
|
IShellLink_fnGetShowCmd,
|
|
|
|
IShellLink_fnSetShowCmd,
|
|
|
|
IShellLink_fnGetIconLocation,
|
|
|
|
IShellLink_fnSetIconLocation,
|
|
|
|
IShellLink_fnSetRelativePath,
|
|
|
|
IShellLink_fnResolve,
|
|
|
|
IShellLink_fnSetPath
|
|
|
|
};
|
|
|
|
|
1998-12-14 15:51:27 +01:00
|
|
|
/**************************************************************************
|
1999-01-17 17:32:32 +01:00
|
|
|
* IShellLink's IClassFactory implementation
|
1998-12-14 15:51:27 +01:00
|
|
|
*/
|
1999-01-17 17:32:32 +01:00
|
|
|
|
|
|
|
static ICOM_VTABLE(IClassFactory) slwcfvt;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* IShellLinkW_CF_Constructor
|
|
|
|
*/
|
|
|
|
|
|
|
|
LPCLASSFACTORY IShellLinkW_CF_Constructor(void)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
IClassFactoryImpl* lpclf;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
1999-02-17 16:57:24 +01:00
|
|
|
lpclf= (IClassFactoryImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IClassFactoryImpl));
|
1998-12-14 15:51:27 +01:00
|
|
|
lpclf->ref = 1;
|
|
|
|
lpclf->lpvtbl = &slwcfvt;
|
|
|
|
TRACE(shell,"(%p)->()\n",lpclf);
|
1999-01-23 15:12:48 +01:00
|
|
|
shell32_ObjCount++;
|
1999-01-17 17:32:32 +01:00
|
|
|
return (LPCLASSFACTORY)lpclf;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/**************************************************************************
|
|
|
|
* IShellLinkW_CF_QueryInterface
|
|
|
|
*/
|
|
|
|
static HRESULT WINAPI IShellLinkW_CF_QueryInterface(
|
1999-02-10 07:42:03 +01:00
|
|
|
LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
1999-01-17 17:32:32 +01:00
|
|
|
char xriid[50];
|
1998-12-14 15:51:27 +01:00
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",This,xriid);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
*ppvObj = NULL;
|
|
|
|
|
|
|
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
1999-02-17 16:57:24 +01:00
|
|
|
{ *ppvObj = (LPUNKNOWN)This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IClassFactory)) /*IClassFactory*/
|
1999-02-17 16:57:24 +01:00
|
|
|
{ *ppvObj = (LPCLASSFACTORY)This;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
|
1999-01-17 17:32:32 +01:00
|
|
|
if(*ppvObj) {
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppvObj);
|
1998-12-14 15:51:27 +01:00
|
|
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLinkW_CF_AddRef
|
|
|
|
*/
|
1999-02-10 07:42:03 +01:00
|
|
|
static ULONG WINAPI IShellLinkW_CF_AddRef(LPCLASSFACTORY iface)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount++;
|
1999-02-17 16:57:24 +01:00
|
|
|
return ++(This->ref);
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLinkW_CF_Release
|
|
|
|
*/
|
1999-02-10 07:42:03 +01:00
|
|
|
static ULONG WINAPI IShellLinkW_CF_Release(LPCLASSFACTORY iface)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount--;
|
1999-02-17 16:57:24 +01:00
|
|
|
if (!--(This->ref))
|
|
|
|
{ TRACE(shell,"-- destroying IClassFactory(%p)\n",This);
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
1998-12-14 15:51:27 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-02-17 16:57:24 +01:00
|
|
|
return This->ref;
|
1998-12-14 15:51:27 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLinkW_CF_CreateInstance
|
|
|
|
*/
|
|
|
|
static HRESULT WINAPI IShellLinkW_CF_CreateInstance(
|
1999-01-17 17:32:32 +01:00
|
|
|
LPCLASSFACTORY iface, LPUNKNOWN pUnknown, REFIID riid, LPVOID *ppObject)
|
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
1999-01-17 17:32:32 +01:00
|
|
|
IUnknown *pObj = NULL;
|
1998-12-14 15:51:27 +01:00
|
|
|
HRESULT hres;
|
|
|
|
char xriid[50];
|
|
|
|
|
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"%p->(%p,\n\tIID:\t%s,%p)\n",This,pUnknown,xriid,ppObject);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
*ppObject = NULL;
|
|
|
|
|
|
|
|
if(pUnknown)
|
|
|
|
{ return(CLASS_E_NOAGGREGATION);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IShellLinkW))
|
|
|
|
{ pObj = (IUnknown *)IShellLinkW_Constructor();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ ERR(shell,"unknown IID requested\n\tIID:\t%s\n",xriid);
|
|
|
|
return(E_NOINTERFACE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!pObj)
|
|
|
|
{ return(E_OUTOFMEMORY);
|
|
|
|
}
|
|
|
|
|
|
|
|
hres = pObj->lpvtbl->fnQueryInterface(pObj,riid, ppObject);
|
|
|
|
pObj->lpvtbl->fnRelease(pObj);
|
1999-02-17 16:57:24 +01:00
|
|
|
TRACE(shell,"-- Object created: (%p)->%p\n",This,*ppObject);
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* IShellLinkW_CF_LockServer
|
|
|
|
*/
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_CF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
1999-02-17 16:57:24 +01:00
|
|
|
ICOM_THIS(IClassFactoryImpl,iface);
|
|
|
|
TRACE(shell,"%p->(0x%x), not implemented\n",This, fLock);
|
1998-12-14 15:51:27 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
1999-01-17 17:32:32 +01:00
|
|
|
static ICOM_VTABLE(IClassFactory) slwcfvt =
|
|
|
|
{
|
|
|
|
IShellLinkW_CF_QueryInterface,
|
|
|
|
IShellLinkW_CF_AddRef,
|
1999-02-10 07:42:03 +01:00
|
|
|
IShellLinkW_CF_Release,
|
1999-01-17 17:32:32 +01:00
|
|
|
IShellLinkW_CF_CreateInstance,
|
|
|
|
IShellLinkW_CF_LockServer
|
|
|
|
};
|
|
|
|
|
1998-11-25 17:39:47 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
1999-02-24 16:58:26 +01:00
|
|
|
* IShellLink Implementation
|
|
|
|
*/
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
ICOM_VTABLE(IShellLinkW)* lpvtbl;
|
|
|
|
DWORD ref;
|
|
|
|
IPersistFileImpl* lppf;
|
|
|
|
|
|
|
|
} IShellLinkWImpl;
|
|
|
|
|
|
|
|
static ICOM_VTABLE(IShellLinkW) slvtw;
|
1998-11-25 17:39:47 +01:00
|
|
|
|
|
|
|
/**************************************************************************
|
1999-02-24 16:58:26 +01:00
|
|
|
* IShellLinkW_fnConstructor
|
1998-11-25 17:39:47 +01:00
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
IShellLinkW * IShellLinkW_Constructor(void)
|
|
|
|
{ IShellLinkWImpl* sl;
|
1998-11-25 17:39:47 +01:00
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
sl = (IShellLinkWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IShellLinkWImpl));
|
1998-11-25 17:39:47 +01:00
|
|
|
sl->ref = 1;
|
|
|
|
sl->lpvtbl = &slvtw;
|
1998-12-14 15:51:27 +01:00
|
|
|
|
|
|
|
sl->lppf = IPersistFile_Constructor();
|
|
|
|
|
1998-11-25 17:39:47 +01:00
|
|
|
TRACE(shell,"(%p)->()\n",sl);
|
1999-01-23 15:12:48 +01:00
|
|
|
shell32_ObjCount++;
|
1999-02-24 16:58:26 +01:00
|
|
|
return (IShellLinkW*)sl;
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
1999-02-24 16:58:26 +01:00
|
|
|
* IShellLinkW_fnQueryInterface
|
1998-11-25 17:39:47 +01:00
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnQueryInterface(
|
|
|
|
IShellLinkW * iface, REFIID riid, LPVOID *ppvObj)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
char xriid[50];
|
|
|
|
WINE_StringFromCLSID((LPCLSID)riid,xriid);
|
|
|
|
TRACE(shell,"(%p)->(\n\tIID:\t%s)\n",This,xriid);
|
|
|
|
|
|
|
|
*ppvObj = NULL;
|
|
|
|
|
|
|
|
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
|
|
|
|
{ *ppvObj = This;
|
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IShellLinkW)) /*IShellLinkW*/
|
|
|
|
{ *ppvObj = (IShellLinkW *)This;
|
|
|
|
}
|
|
|
|
else if(IsEqualIID(riid, &IID_IPersistFile)) /*IPersistFile*/
|
|
|
|
{ *ppvObj = (IPersistFile *)This->lppf;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppvObj)
|
|
|
|
{ IShellLink_AddRef((IShellLinkW*)*ppvObj);
|
|
|
|
TRACE(shell,"-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
TRACE(shell,"-- Interface: E_NOINTERFACE\n");
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
1999-02-24 16:58:26 +01:00
|
|
|
* IShellLinkW_fnAddRef
|
1998-11-25 17:39:47 +01:00
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount++;
|
1999-02-24 16:58:26 +01:00
|
|
|
return ++(This->ref);
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
/******************************************************************************
|
1999-02-24 16:58:26 +01:00
|
|
|
* IShellLinkW_fnRelease
|
1998-11-25 17:39:47 +01:00
|
|
|
*/
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
1999-01-23 15:12:48 +01:00
|
|
|
|
|
|
|
shell32_ObjCount--;
|
1999-02-24 16:58:26 +01:00
|
|
|
if (!--(This->ref))
|
|
|
|
{ TRACE(shell,"-- destroying IShellLinkW(%p)\n",This);
|
|
|
|
IPersistFile_Release((IPersistFile*)This->lppf); /* IPersistFile*/
|
|
|
|
HeapFree(GetProcessHeap(),0,This);
|
1999-01-23 15:12:48 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
return This->ref;
|
1998-11-25 17:39:47 +01:00
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",This, pszFile, cchMaxPath, pfd, fFlags);
|
1998-11-25 17:39:47 +01:00
|
|
|
lstrcpynAtoW(pszFile,"c:\\foo.bar", cchMaxPath);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(ppidl=%p)\n",This, ppidl);
|
1998-11-25 17:39:47 +01:00
|
|
|
*ppidl = _ILCreateDesktop();
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(pidl=%p)\n",This, pidl);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
|
1998-11-25 17:39:47 +01:00
|
|
|
lstrcpynAtoW(pszName,"Description, FIXME",cchMaxName);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(desc=%s)\n",This, debugstr_w(pszName));
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->()\n",This);
|
1998-11-25 17:39:47 +01:00
|
|
|
lstrcpynAtoW(pszDir,"c:\\", cchMaxPath);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(dir=%s)\n",This, debugstr_w(pszDir));
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p len=%u)\n",This, pszArgs, cchMaxPath);
|
1998-11-25 17:39:47 +01:00
|
|
|
lstrcpynAtoW(pszArgs, "", cchMaxPath);
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(args=%s)\n",This, debugstr_w(pszArgs));
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p)\n",This, pwHotkey);
|
1998-11-25 17:39:47 +01:00
|
|
|
*pwHotkey=0x0;
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(hotkey=%x)\n",This, wHotkey);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p)\n",This, piShowCmd);
|
1998-11-25 17:39:47 +01:00
|
|
|
*piShowCmd=0;
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(showcmd=%x)\n",This, iShowCmd);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(%p len=%u iicon=%p)\n",This, pszIconPath, cchIconPath, piIcon);
|
1998-11-25 17:39:47 +01:00
|
|
|
lstrcpynAtoW(pszIconPath,"shell32.dll",cchIconPath);
|
|
|
|
*piIcon=1;
|
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags)
|
1999-02-24 16:58:26 +01:00
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
1999-02-24 16:58:26 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IShellLinkWImpl, iface);
|
|
|
|
|
|
|
|
FIXME(shell,"(%p)->(path=%s)\n",This, debugstr_w(pszFile));
|
1998-11-25 17:39:47 +01:00
|
|
|
return NOERROR;
|
|
|
|
}
|
|
|
|
|
1999-02-24 16:58:26 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* IShellLinkW Implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
static ICOM_VTABLE(IShellLinkW) slvtw =
|
|
|
|
{ IShellLinkW_fnQueryInterface,
|
|
|
|
IShellLinkW_fnAddRef,
|
|
|
|
IShellLinkW_fnRelease,
|
|
|
|
IShellLinkW_fnGetPath,
|
|
|
|
IShellLinkW_fnGetIDList,
|
|
|
|
IShellLinkW_fnSetIDList,
|
|
|
|
IShellLinkW_fnGetDescription,
|
|
|
|
IShellLinkW_fnSetDescription,
|
|
|
|
IShellLinkW_fnGetWorkingDirectory,
|
|
|
|
IShellLinkW_fnSetWorkingDirectory,
|
|
|
|
IShellLinkW_fnGetArguments,
|
|
|
|
IShellLinkW_fnSetArguments,
|
|
|
|
IShellLinkW_fnGetHotkey,
|
|
|
|
IShellLinkW_fnSetHotkey,
|
|
|
|
IShellLinkW_fnGetShowCmd,
|
|
|
|
IShellLinkW_fnSetShowCmd,
|
|
|
|
IShellLinkW_fnGetIconLocation,
|
|
|
|
IShellLinkW_fnSetIconLocation,
|
|
|
|
IShellLinkW_fnSetRelativePath,
|
|
|
|
IShellLinkW_fnResolve,
|
|
|
|
IShellLinkW_fnSetPath
|
|
|
|
};
|
|
|
|
|