Stubs for IQueryAssociations.

This commit is contained in:
Juergen Schmied 2000-04-28 20:22:33 +00:00 committed by Alexandre Julliard
parent 85b9293495
commit 24f4cdc69f
2 changed files with 250 additions and 0 deletions

View File

@ -11,6 +11,7 @@
#include "winerror.h"
#include "winreg.h"
#include "wine/obj_queryassociations.h"
#include "shlobj.h"
#include "shell32_main.h"
#include "shlguid.h"
@ -193,3 +194,155 @@ BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest)
return TRUE;
}
typedef struct
{ ICOM_VFIELD(IQueryAssociations);
DWORD ref;
} IQueryAssociationsImpl;
static struct ICOM_VTABLE(IQueryAssociations) qavt;
/**************************************************************************
* IQueryAssociations_Constructor
*/
IQueryAssociations* IQueryAssociations_Constructor(void)
{
IQueryAssociationsImpl* ei;
ei=(IQueryAssociationsImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IQueryAssociationsImpl));
ei->ref=1;
ICOM_VTBL(ei) = &qavt;
TRACE("(%p)\n",ei);
shell32_ObjCount++;
return (IQueryAssociations *)ei;
}
/**************************************************************************
* IQueryAssociations_QueryInterface
*/
static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
IQueryAssociations * iface,
REFIID riid,
LPVOID *ppvObj)
{
ICOM_THIS(IQueryAssociationsImpl,iface);
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
*ppvObj = NULL;
if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
{
*ppvObj = This;
}
else if(IsEqualIID(riid, &IID_IQueryAssociations)) /*IExtractIcon*/
{
*ppvObj = (IQueryAssociations*)This;
}
if(*ppvObj)
{
IQueryAssociations_AddRef((IQueryAssociations*) *ppvObj);
TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
return S_OK;
}
TRACE("-- Interface: E_NOINTERFACE\n");
return E_NOINTERFACE;
}
/**************************************************************************
* IQueryAssociations_AddRef
*/
static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations * iface)
{
ICOM_THIS(IQueryAssociationsImpl,iface);
TRACE("(%p)->(count=%lu)\n",This, This->ref );
shell32_ObjCount++;
return ++(This->ref);
}
/**************************************************************************
* IQueryAssociations_Release
*/
static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations * iface)
{
ICOM_THIS(IQueryAssociationsImpl,iface);
TRACE("(%p)->()\n",This);
shell32_ObjCount--;
if (!--(This->ref))
{
TRACE(" destroying IExtractIcon(%p)\n",This);
HeapFree(GetProcessHeap(),0,This);
return 0;
}
return This->ref;
}
static HRESULT WINAPI IQueryAssociations_fnInit(
IQueryAssociations * iface,
ASSOCF flags,
LPCWSTR pszAssoc,
HKEY hkProgid,
HWND hwnd)
{
return E_NOTIMPL;
}
static HRESULT WINAPI IQueryAssociations_fnGetString(
IQueryAssociations * iface,
ASSOCF flags,
ASSOCSTR str,
LPCWSTR pszExtra,
LPWSTR pszOut,
DWORD *pcchOut)
{
return E_NOTIMPL;
}
static HRESULT WINAPI IQueryAssociations_fnGetKey(
IQueryAssociations * iface,
ASSOCF flags,
ASSOCKEY key,
LPCWSTR pszExtra,
HKEY *phkeyOut)
{
return E_NOTIMPL;
}
static HRESULT WINAPI IQueryAssociations_fnGetData(
IQueryAssociations * iface,
ASSOCF flags,
ASSOCDATA data,
LPCWSTR pszExtra,
LPVOID pvOut,
DWORD *pcbOut)
{
return E_NOTIMPL;
}
static HRESULT WINAPI IQueryAssociations_fnGetEnum(
IQueryAssociations * iface,
ASSOCF flags,
ASSOCENUM assocenum,
LPCWSTR pszExtra,
REFIID riid,
LPVOID *ppvOut)
{
return E_NOTIMPL;
}
static struct ICOM_VTABLE(IQueryAssociations) qavt =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IQueryAssociations_fnQueryInterface,
IQueryAssociations_fnAddRef,
IQueryAssociations_fnRelease,
IQueryAssociations_fnInit,
IQueryAssociations_fnGetString,
IQueryAssociations_fnGetKey,
IQueryAssociations_fnGetData,
IQueryAssociations_fnGetEnum
};

View File

@ -0,0 +1,97 @@
/************************************************************
* IQueryAssociations
*/
#ifndef __WINE_WINE_OBJ_QUERYASSOCIATIONS_H
#define __WINE_WINE_OBJ_QUERYASSOCIATIONS_H
#include "winbase.h"
#include "wine/obj_base.h"
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
DEFINE_GUID(IID_IQueryAssociations, 0xc46ca590, 0x3c3f, 0x11d2, 0xbe, 0xe6, 0x00, 0x00, 0xf8, 0x05, 0xca, 0x57);
typedef struct IQueryAssociations IQueryAssociations,*LPQUERYASSOCIATIONS;
#define ASSOCF_INIT_BYEXENAME 0x00000002
#define ASSOCF_OPEN_BYEXENAME 0x00000002
#define ASSOCF_INIT_DEFAULTTOSTAR 0x00000004
#define ASSOCF_INIT_DEFAULTTOFOLDER 0x00000008
#define ASSOCF_NOUSERSETTINGS 0x00000010
#define ASSOCF_NOTRUNCATE 0x00000020
#define ASSOCF_VERIFY 0x00000040
#define ASSOCF_REMAPRUNDLL 0x00000080
#define ASSOCF_NOFIXUPS 0x00000100
#define ASSOCF_IGNOREBASECLASS 0x00000200
typedef DWORD ASSOCF;
typedef enum
{
ASSOCSTR_COMMAND = 1,
ASSOCSTR_EXECUTABLE,
ASSOCSTR_FRIENDLYDOCNAME,
ASSOCSTR_FRIENDLYAPPNAME,
ASSOCSTR_NOOPEN,
ASSOCSTR_SHELLNEWVALUE,
ASSOCSTR_DDECOMMAND,
ASSOCSTR_DDEIFEXEC,
ASSOCSTR_DDEAPPLICATION,
ASSOCSTR_DDETOPIC,
ASSOCSTR_MAX
} ASSOCSTR;
typedef enum
{
ASSOCKEY_SHELLEXECCLASS = 1,
ASSOCKEY_APP,
ASSOCKEY_CLASS,
ASSOCKEY_BASECLASS,
ASSOCKEY_MAX
} ASSOCKEY;
typedef enum
{
ASSOCDATA_MSIDESCRIPTOR = 1,
ASSOCDATA_NOACTIVATEHANDLER,
ASSOCDATA_QUERYCLASSSTORE,
ASSOCDATA_HASPERUSERASSOC,
ASSOCDATA_MAX
} ASSOCDATA;
typedef enum
{
ASSOCENUM_NONE
} ASSOCENUM;
#define ICOM_INTERFACE IQueryAssociations
#define IQueryAssociations_METHODS \
ICOM_METHOD4 (HRESULT, Init, ASSOCF, flags, LPCWSTR, pszAssoc, HKEY, hkProgid, HWND, hwnd) \
ICOM_METHOD5 (HRESULT, GetString, ASSOCF, flags, ASSOCSTR, str, LPCWSTR, pszExtra, LPWSTR, pszOut, DWORD*, pcchOut) \
ICOM_METHOD4 (HRESULT, GetKey, ASSOCF, flags, ASSOCKEY, key, LPCWSTR, pszExtra, HKEY*, phkeyOut) \
ICOM_METHOD5 (HRESULT, GetData, ASSOCF, flags, ASSOCDATA, data, LPCWSTR, pszExtra, LPVOID, pvOut, DWORD*, pcbOut) \
ICOM_METHOD5 (HRESULT, GetEnum, ASSOCF, flags, ASSOCENUM, assocenum, LPCWSTR, pszExtra, REFIID, riid, LPVOID*, ppvOut)
#define IQueryAssociations_IMETHODS \
IUnknown_IMETHODS \
IQueryAssociations_METHODS
ICOM_DEFINE(IQueryAssociations,IUnknown)
#undef ICOM_INTERFACE
#define IQueryAssociations_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IQueryAssociations_AddRef(p) ICOM_CALL(AddRef,p)
#define IQueryAssociations_Release(p) ICOM_CALL(Release,p)
#define IQueryAssociations_Init(p,a,b,c,d) ICOM_CALL4(Init,p,a,b,c,d)
#define IQueryAssociations_GetString(p,a,b,c,d,e) ICOM_CALL5(GetString,p,a,b,c,d,e)
#define IQueryAssociations_GetKey(p,a,b,c,d) ICOM_CALL4(GetKey,p,a,b,c,d)
#define IQueryAssociations_GetData(p,a,b,c,d,e) ICOM_CALL5(GetData,p,a,b,c,d,e)
#define IQueryAssociations_GetEnum(p,a,b,c,d,e) ICOM_CALL5(GetEnum,p,a,b,c,d,e)
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* __WINE_WINE_OBJ_QUERYASSOCIATIONS_H */