forked from Mirrors/wine-wine
Implemented:
- IMoniker interface for FileMoniker,ItemMoniker,AntiMoniker and GenericCompositeMoniker - IRunningObjectTable interface, and - IBindCtx interface.oldstable
parent
44a79c4925
commit
ed494ec539
|
@ -1,8 +1,17 @@
|
|||
#ifndef __WINE_COMPOBJ_H
|
||||
#define __WINE_COMPOBJ_H
|
||||
|
||||
/* "compobj.h" is obsolete, you should include "objbase.h" instead */
|
||||
/* All private prototye functions used by OLE will be added to this header file */
|
||||
|
||||
#include "objbase.h"
|
||||
|
||||
/* This function initialize the Running Object Table */
|
||||
HRESULT WINAPI RunningObjectTableImpl_Initialize();
|
||||
|
||||
/* This function uninitialize the Running Object Table */
|
||||
HRESULT WINAPI RunningObjectTableImpl_UnInitialize();
|
||||
|
||||
/* This function decompose a String path to a String Table containing all the elements ("\" or "subDirectory" or "Directoy" or "FileName") of the path */
|
||||
int WINAPI FileMonikerImpl_DecomposePath(LPOLESTR str, LPOLESTR** stringTable);
|
||||
|
||||
#endif /* __WINE_COMPOBJ_H */
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "wine/obj_dragdrop.h"
|
||||
|
||||
HRESULT WINAPI GetClassFile(LPOLESTR filePathName,CLSID *pclsid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -28,15 +28,15 @@ HRESULT WINAPI RevokeDragDrop16(HWND16);
|
|||
HRESULT WINAPI RevokeDragDrop(HWND);
|
||||
HRESULT WINAPI DoDragDrop16(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
|
||||
HRESULT WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
|
||||
|
||||
HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,
|
||||
LPOLEMENUGROUPWIDTHS lpMenuWidths);
|
||||
HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
|
||||
HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm);
|
||||
HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths);
|
||||
HRESULT WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor);
|
||||
HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,
|
||||
HWND hwndFrame,
|
||||
HWND hwndActiveObject,
|
||||
LPOLEINPLACEFRAME lpFrame,
|
||||
LPOLEINPLACEACTIVEOBJECT lpActiveObject);
|
||||
HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject);
|
||||
|
||||
HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
|
||||
HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid);
|
||||
HRESULT WINAPI ReadClassStm(IStream *pStm,REFCLSID pclsid);
|
||||
|
||||
#endif /* __WINE_OLE2_H */
|
||||
|
||||
|
|
|
@ -817,6 +817,10 @@ HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, LPVOID pvRe
|
|||
|
||||
HRESULT WINAPI CoInitialize16(LPVOID lpReserved);
|
||||
HRESULT WINAPI CoInitialize(LPVOID lpReserved);
|
||||
HRESULT WINAPI CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit);
|
||||
|
||||
void WINAPI CoUninitialize16(void);
|
||||
void WINAPI CoUninitialize(void);
|
||||
|
||||
typedef enum tagCOINIT
|
||||
{
|
||||
|
@ -826,7 +830,6 @@ typedef enum tagCOINIT
|
|||
COINIT_SPEED_OVER_MEMORY = 0x8 /* Trade memory for speed */
|
||||
} COINIT;
|
||||
|
||||
HRESULT WINAPI CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
BOOL WINAPI CoIsOle1Class(REFCLSID rclsid);
|
||||
|
@ -850,10 +853,6 @@ HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsC
|
|||
|
||||
HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister);
|
||||
|
||||
void WINAPI CoUninitialize16(void);
|
||||
void WINAPI CoUninitialize(void);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Internal WINE API
|
||||
*/
|
||||
|
|
|
@ -384,7 +384,7 @@ ICOM_DEFINE(IParseDisplayName,IUnknown)
|
|||
#define IParseDisplayName_AddRef(p) ICOM_CALL (AddRef,p)
|
||||
#define IParseDisplayName_Release(p) ICOM_CALL (Release,p)
|
||||
/*** IParseDisplayName methods ***/
|
||||
#define IParseDisplayName_ParseDisplayName(p,a,b,c,d) ICOM_CALL4(ParseDisplayName,a,b,c,d)
|
||||
#define IParseDisplayName_ParseDisplayName(p,a,b,c,d) ICOM_CALL4(ParseDisplayName,p,a,b,c,d)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,13 @@ typedef struct IRunnableObject IRunnableObject,*LPRUNNABLEOBJECT;
|
|||
DEFINE_OLEGUID(IID_IRunningObjectTable, 0x00000010L, 0, 0);
|
||||
typedef struct IRunningObjectTable IRunningObjectTable,*LPRUNNINGOBJECTTABLE;
|
||||
|
||||
DEFINE_GUID( CLSID_FileMoniker,0x00000303,0,0,0xc0,0,0,0,0,0,0,0x46);
|
||||
|
||||
DEFINE_GUID( CLSID_ItemMoniker,0x00000304,0,0,0xc0,0,0,0,0,0,0,0x46);
|
||||
|
||||
DEFINE_GUID( CLSID_AntiMoniker,0x00000305,0,0,0xc0,0,0,0,0,0,0,0x46);
|
||||
|
||||
DEFINE_GUID( CLSID_CompositeMoniker,0x00000309,0,0,0xc0,0,0,0,0,0,0,0x46);
|
||||
|
||||
/*********************************************************************************
|
||||
* BIND_OPTS and BIND_OPTS2 structures definition
|
||||
|
@ -66,12 +72,12 @@ typedef struct tagBIND_OPTS2
|
|||
#define IBindCtx_METHODS \
|
||||
ICOM_METHOD1 (HRESULT, RegisterObjectBound, IUnknown*,punk) \
|
||||
ICOM_METHOD1 (HRESULT, RevokeObjectBound, IUnknown*,punk) \
|
||||
ICOM_METHOD (HRESULT, ReleaseObjects) \
|
||||
ICOM_METHOD (HRESULT, ReleaseBoundObjects) \
|
||||
ICOM_METHOD1 (HRESULT, SetBindOptions, LPBIND_OPTS2,pbindopts) \
|
||||
ICOM_METHOD1 (HRESULT, GetBindOptions, LPBIND_OPTS2,pbindopts) \
|
||||
ICOM_METHOD1 (HRESULT, GetRunningObjectTable,IRunningObjectTable**,pprot) \
|
||||
ICOM_METHOD2 (HRESULT, RegisterObjectParam, LPOLESTR,pszkey, IUnknown*,punk) \
|
||||
ICOM_METHOD2 (HRESULT, GetObjectParam, LPOLESTR,pszkey, IUnknown*,punk) \
|
||||
ICOM_METHOD2 (HRESULT, GetObjectParam, LPOLESTR,pszkey, IUnknown**,punk) \
|
||||
ICOM_METHOD1 (HRESULT, EnumObjectParam, IEnumString**,ppenum) \
|
||||
ICOM_METHOD1 (HRESULT, RevokeObjectParam, LPOLESTR,pszkey)
|
||||
#define IBindCtx_IMETHODS \
|
||||
|
@ -88,7 +94,7 @@ ICOM_DEFINE(IBindCtx,IUnknown)
|
|||
/* IBindCtx methods*/
|
||||
#define IBindCtx_RegisterObjectBound(p,a) ICOM_CALL1(RegisterObjectBound,p,a)
|
||||
#define IBindCtx_RevokeObjectBound(p,a) ICOM_CALL1(RevokeObjectBound,p,a)
|
||||
#define IBindCtx_ReleaseObjects(p) ICOM_CALL (ReleaseObjects,p)
|
||||
#define IBindCtx_ReleaseBoundObjects(p) ICOM_CALL (ReleaseBoundObjects,p)
|
||||
#define IBindCtx_SetBindOptions(p,a) ICOM_CALL1(SetBindOptions,p,a)
|
||||
#define IBindCtx_GetBindOptions(p,a) ICOM_CALL1(GetBindOptions,p,a)
|
||||
#define IBindCtx_GetRunningObjectTable(p,a) ICOM_CALL1(GetRunningObjectTable,p,a)
|
||||
|
@ -101,7 +107,6 @@ ICOM_DEFINE(IBindCtx,IUnknown)
|
|||
HRESULT WINAPI CreateBindCtx16(DWORD reserved, LPBC* ppbc);
|
||||
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC* ppbc);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IClassActivator interface
|
||||
*/
|
||||
|
@ -151,7 +156,6 @@ ICOM_DEFINE(IEnumMoniker,IUnknown)
|
|||
#define IEnumMoniker_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* IMoniker interface
|
||||
*/
|
||||
|
@ -203,6 +207,7 @@ ICOM_DEFINE(IMoniker,IPersistStream)
|
|||
#define IMoniker_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
||||
#define IMoniker_AddRef(p) ICOM_CALL (AddRef,p)
|
||||
#define IMoniker_Release(p) ICOM_CALL (Release,p)
|
||||
|
||||
/*** IPersist methods ***/
|
||||
#define IMoniker_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
|
||||
/*** IPersistStream methods ***/
|
||||
|
@ -211,45 +216,44 @@ ICOM_DEFINE(IMoniker,IPersistStream)
|
|||
#define IMoniker_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
|
||||
#define IMoniker_GetSizeMax(p,a) ICOM_CALL1(GetSizeMax,p,a)
|
||||
/*** IMoniker methods ***/
|
||||
#define IMoniker_BindToObject(p,a,b,c,d) ICOM_CALL(BindToObject,p,a,b,c,d)
|
||||
#define IMoniker_BindToStorage(p,a,b,c,d) ICOM_CALL(BindToStorage,p,a,b,c,d)
|
||||
#define IMoniker_Reduce(p,a,b,c,d) ICOM_CALL(Reduce,p,a,b,c,d)
|
||||
#define IMoniker_ComposeWith(p,a,b,c) ICOM_CALL(ComposeWith,p,a,b,c)
|
||||
#define IMoniker_Enum(p,a,b) ICOM_CALL(Enum,p,a,b)
|
||||
#define IMoniker_IsEqual(p,a) ICOM_CALL(IsEqual,p,a)
|
||||
#define IMoniker_Hash(p,a) ICOM_CALL(Hash,p,a)
|
||||
#define IMoniker_IsRunning(p,a,b,c) ICOM_CALL(IsRunning,p,a,b,c)
|
||||
#define IMoniker_GetTimeOfLastChange(p,a,b,c) ICOM_CALL(GetTimeOfLastChange,p,a,b,c)
|
||||
#define IMoniker_Inverse(p,a) ICOM_CALL(Inverse,p,a)
|
||||
#define IMoniker_CommonPrefixWith(p,a,b) ICOM_CALL(CommonPrefixWith,p,a,b)
|
||||
#define IMoniker_RelativePathTo(p,a,b) ICOM_CALL(RelativePathTo,p,a,b)
|
||||
#define IMoniker_GetDisplayName(p,a,b,c) ICOM_CALL(GetDisplayName,p,a,b,c)
|
||||
#define IMoniker_ParseDisplayName(p,a,b,c,d,e) ICOM_CALL(ParseDisplayName,p,a,b,c,d,e)
|
||||
#define IMoniker_IsSystemMoniker(p,a) ICOM_CALL(IsSystemMoniker,p,a)
|
||||
#define IMoniker_BindToObject(p,a,b,c,d) ICOM_CALL4(BindToObject,p,a,b,c,d)
|
||||
#define IMoniker_BindToStorage(p,a,b,c,d) ICOM_CALL4(BindToStorage,p,a,b,c,d)
|
||||
#define IMoniker_Reduce(p,a,b,c,d) ICOM_CALL4(Reduce,p,a,b,c,d)
|
||||
#define IMoniker_ComposeWith(p,a,b,c) ICOM_CALL3(ComposeWith,p,a,b,c)
|
||||
#define IMoniker_Enum(p,a,b) ICOM_CALL2(Enum,p,a,b)
|
||||
#define IMoniker_IsEqual(p,a) ICOM_CALL1(IsEqual,p,a)
|
||||
#define IMoniker_Hash(p,a) ICOM_CALL1(Hash,p,a)
|
||||
#define IMoniker_IsRunning(p,a,b,c) ICOM_CALL3(IsRunning,p,a,b,c)
|
||||
#define IMoniker_GetTimeOfLastChange(p,a,b,c) ICOM_CALL3(GetTimeOfLastChange,p,a,b,c)
|
||||
#define IMoniker_Inverse(p,a) ICOM_CALL1(Inverse,p,a)
|
||||
#define IMoniker_CommonPrefixWith(p,a,b) ICOM_CALL2(CommonPrefixWith,p,a,b)
|
||||
#define IMoniker_RelativePathTo(p,a,b) ICOM_CALL2(RelativePathTo,p,a,b)
|
||||
#define IMoniker_GetDisplayName(p,a,b,c) ICOM_CALL3(GetDisplayName,p,a,b,c)
|
||||
#define IMoniker_ParseDisplayName(p,a,b,c,d,e) ICOM_CALL5(ParseDisplayName,p,a,b,c,d,e)
|
||||
#define IMoniker_IsSystemMoniker(p,a) ICOM_CALL1(IsSystemMoniker,p,a)
|
||||
#endif
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID iidResult, LPVOID* ppvResult);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI CreateAntiMoniker(LPMONIKER* ppmk);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, LPMONIKER* ppmk);
|
||||
|
||||
HRESULT WINAPI CreateFileMoniker16(LPCOLESTR16 lpszPathName, LPMONIKER* ppmk);
|
||||
HRESULT WINAPI CreateFileMoniker(LPCOLESTR lpszPathName, LPMONIKER* ppmk);
|
||||
|
||||
HRESULT WINAPI CreateItemMoniker16(LPCOLESTR16 lpszDelim, LPCOLESTR lpszItem, LPMONIKER* ppmk);
|
||||
HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, LPMONIKER* ppmk);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk);
|
||||
|
||||
HRESULT WINAPI CreateGenericComposite(LPMONIKER pmkFirst, LPMONIKER pmkRest, LPMONIKER* ppmkComposite);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI BindMoniker(LPMONIKER pmk, DWORD grfOpt, REFIID iidResult, LPVOID* ppvResult);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI CreateClassMoniker(REFCLSID rclsid, LPMONIKER* ppmk);
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER* ppmk);
|
||||
|
||||
|
||||
/* FIXME: not implemented */
|
||||
HRESULT WINAPI MonikerCommonPrefixWith(IMoniker* pmkThis,IMoniker* pmkOther,IMoniker** ppmkCommon);
|
||||
/*****************************************************************************
|
||||
* IROTData interface
|
||||
*/
|
||||
|
@ -271,6 +275,7 @@ ICOM_DEFINE(IROTData,IUnknown)
|
|||
#define IROTData_GetComparisonData(p,a,b,c) ICOM_CALL3(GetComparisonData,p,a,b,c)
|
||||
#endif
|
||||
|
||||
#define ICOM_THIS_From_IROTData(class, name) class* This = (class*)(((void*)name)-sizeof(void*))
|
||||
|
||||
/*****************************************************************************
|
||||
* IRunnableObject interface
|
||||
|
@ -335,6 +340,8 @@ ICOM_DEFINE(IRunningObjectTable,IUnknown)
|
|||
#define IRunningObjectTable_EnumRunning(p,a) ICOM_CALL1(EnumRunning,p,a)
|
||||
#endif
|
||||
|
||||
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPVOID *pprot);
|
||||
HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPVOID *pprot);
|
||||
|
||||
/*****************************************************************************
|
||||
* Additional API
|
||||
|
|
|
@ -299,6 +299,7 @@ extern int WIN32_LastError;
|
|||
#define E_POINTER 0x80004003
|
||||
#define E_ABORT 0x80004004
|
||||
#define E_FAIL 0x80004005
|
||||
#define E_UNSPEC E_FAIL // must to be defined (used by FileMoniker, IOleLink and DoDragDrop as a return value)
|
||||
|
||||
/*#define CO_E_INIT_TLS 0x80004006
|
||||
#define CO_E_INIT_SHARED_ALLOCATOR 0x80004007
|
||||
|
@ -313,9 +314,11 @@ extern int WIN32_LastError;
|
|||
#define CO_E_INIT_SCM_MAP_VIEW_OF_FILE 0x80004010
|
||||
#define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011
|
||||
#define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012 */
|
||||
#define CO_E_ERRORINDLL 0x800401F9L
|
||||
|
||||
#define CO_E_NOTINITIALIZED 0x800401F0
|
||||
#define CO_E_ERRORINDLL 0x800401F9
|
||||
#define CO_E_OBJISREG 0x800401FB
|
||||
|
||||
#define OLE_E_ENUM_NOMORE 0x80040002
|
||||
#define OLE_E_ADVISENOTSUPPORTED 0x80040003
|
||||
#define OLE_E_NOCONNECTION 0x80040004
|
||||
|
@ -326,18 +329,46 @@ extern int WIN32_LastError;
|
|||
#define OLE_E_STATIC 0x8004000B
|
||||
#define OLE_E_PROMPTSAVECANCELLED 0x8004000C
|
||||
#define OLE_S_USEREG 0x00040000
|
||||
|
||||
#define DV_E_FORMATETC 0x80040064
|
||||
#define DV_E_DVASPECT 0x8004006B
|
||||
|
||||
#define CLASS_E_NOAGGREGATION 0x80040110
|
||||
#define CLASS_E_CLASSNOTAVAILABLE 0x80040111
|
||||
|
||||
#define DATA_S_SAMEFORMATETC 0x80040130
|
||||
|
||||
#define E_ACCESSDENIED 0x80070005
|
||||
#define E_HANDLE 0x80070006
|
||||
#define E_OUTOFMEMORY 0x8007000E
|
||||
#define E_INVALIDARG 0x80070057
|
||||
|
||||
/*#define OLE_E_FIRST 0x80040000L */
|
||||
/*#define OLE_E_LAST 0x800400FFL */
|
||||
/*#define OLE_S_FIRST 0x00040000L */
|
||||
/*#define OLE_S_LAST 0x000400FFL */
|
||||
|
||||
#define MK_S_REDUCED_TO_SELF 0x000401E2
|
||||
#define MK_S_ME 0x000401E4
|
||||
#define MK_S_HIM 0x000401E5
|
||||
#define MK_S_US 0x000401E6
|
||||
#define MK_S_MONIKERALREADYREGISTERED 0x000401E7
|
||||
|
||||
#define MK_E_EXCEEDEDDEADLINE 0x800401E1
|
||||
#define MK_E_NEEDGENERIC 0x800401E2
|
||||
#define MK_E_UNAVAILABLE 0x800401E3
|
||||
#define MK_E_SYNTAX 0x800401E4
|
||||
#define MK_E_NOOBJECT 0x800401E5
|
||||
#define MK_E_INVALIDEXTENSION 0x800401E6
|
||||
#define MK_E_INTERMEDIATEINTERFACENOTSUPPORTED 0x800401E7
|
||||
#define MK_E_NOTBINDABLE 0x800401E8
|
||||
#define MK_E_NOTBOUND 0x800401E9
|
||||
#define MK_E_CANTOPENFILE 0x800401EA
|
||||
#define MK_E_MIUSTBOTHERUSER 0x800401EB
|
||||
#define MK_E_NOINVERSE 0x800401EC
|
||||
#define MK_E_NOSTORAGE 0x800401ED
|
||||
#define MK_E_NOPREFIX 0x800401EE
|
||||
|
||||
#define STG_E_INVALIDFUNCTION 0x80030001
|
||||
#define STG_E_FILENOTFOUND 0x80030002
|
||||
#define STG_E_PATHNOTFOUND 0x80030003
|
||||
|
@ -405,11 +436,6 @@ extern int WIN32_LastError;
|
|||
#define CLASS_E_NOAGGREGATION 0x80040110
|
||||
#define CLASS_E_CLASSNOTAVAILABLE 0x80040111
|
||||
|
||||
#define MK_E_EXCEEDEDDEADLINE 0x800401E1L
|
||||
#define MK_E_SYNTAX 0x800401E4L
|
||||
#define MK_E_NOOBJECT 0x800401E5L
|
||||
#define MK_E_INVALIDEXTENSION 0x800401E6L
|
||||
#define MK_E_NOSTORAGE 0x800401EDL
|
||||
|
||||
#define OLEOBJ_E_NOVERBS 0x00040180L
|
||||
#define OLEOBJ_S_INVALIDVERB 0x00040180L
|
||||
|
|
|
@ -228,6 +228,12 @@ typedef struct {
|
|||
PACL Dacl;
|
||||
} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
|
||||
|
||||
#ifndef _ROTFLAGS_DEFINED
|
||||
#define _ROTFLAGS_DEFINED
|
||||
#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1
|
||||
#define ROTFLAGS_ALLOWANYCLIENT 0x2
|
||||
#endif // !_ROTFLAGS_DEFINED
|
||||
|
||||
#endif /* _SECURITY_DEFINED */
|
||||
|
||||
|
||||
|
|
|
@ -6,8 +6,10 @@ VPATH = @srcdir@
|
|||
MODULE = ole
|
||||
|
||||
C_SRCS = \
|
||||
antimoniker.c \
|
||||
bindctx.c \
|
||||
compobj.c \
|
||||
compositemoniker.c \
|
||||
filemoniker.c \
|
||||
guid.c \
|
||||
ifs.c \
|
||||
|
@ -23,10 +25,10 @@ C_SRCS = \
|
|||
olesvr.c \
|
||||
parsedt.c \
|
||||
safearray.c \
|
||||
storage.c \
|
||||
storage32.c \
|
||||
stg_bigblockfile.c \
|
||||
stg_stream.c \
|
||||
storage.c \
|
||||
storage32.c \
|
||||
typelib.c \
|
||||
variant.c
|
||||
|
||||
|
|
|
@ -0,0 +1,643 @@
|
|||
/***************************************************************************************
|
||||
* AntiMonikers implementation
|
||||
*
|
||||
* Copyright 1999 Noomen Hamza
|
||||
***************************************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
#include "winerror.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
#include "winuser.h"
|
||||
#include "file.h"
|
||||
#include "winreg.h"
|
||||
#include "objbase.h"
|
||||
#include "wine/obj_inplace.h"
|
||||
|
||||
/* AntiMoniker data structure */
|
||||
typedef struct AntiMonikerImpl{
|
||||
|
||||
ICOM_VTABLE(IMoniker)* lpvtbl1; /* VTable relative to the IMoniker interface.*/
|
||||
|
||||
/* The ROT (RunningObjectTable implementation) uses the IROTData interface to test whether
|
||||
* two monikers are equal. That's whay IROTData interface is implemented by monikers.
|
||||
*/
|
||||
ICOM_VTABLE(IROTData)* lpvtbl2; /* VTable relative to the IROTData interface.*/
|
||||
|
||||
ULONG ref; /* reference counter for this object */
|
||||
|
||||
} AntiMonikerImpl;
|
||||
|
||||
/********************************************************************************/
|
||||
/* AntiMoniker prototype functions : */
|
||||
|
||||
/* IUnknown prototype functions */
|
||||
static HRESULT WINAPI AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject);
|
||||
static ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker* iface);
|
||||
static ULONG WINAPI AntiMonikerImpl_Release(IMoniker* iface);
|
||||
|
||||
/* IPersist prototype functions */
|
||||
static HRESULT WINAPI AntiMonikerImpl_GetClassID(const IMoniker* iface, CLSID *pClassID);
|
||||
|
||||
/* IPersistStream prototype functions */
|
||||
static HRESULT WINAPI AntiMonikerImpl_IsDirty(IMoniker* iface);
|
||||
static HRESULT WINAPI AntiMonikerImpl_Load(IMoniker* iface, IStream* pStm);
|
||||
static HRESULT WINAPI AntiMonikerImpl_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty);
|
||||
static HRESULT WINAPI AntiMonikerImpl_GetSizeMax(IMoniker* iface, ULARGE_INTEGER* pcbSize);
|
||||
|
||||
/* IMoniker prototype functions */
|
||||
static HRESULT WINAPI AntiMonikerImpl_BindToObject(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, VOID** ppvResult);
|
||||
static HRESULT WINAPI AntiMonikerImpl_BindToStorage(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, REFIID riid, VOID** ppvResult);
|
||||
static HRESULT WINAPI AntiMonikerImpl_Reduce(IMoniker* iface,IBindCtx* pbc, DWORD dwReduceHowFar,IMoniker** ppmkToLeft, IMoniker** ppmkReduced);
|
||||
static HRESULT WINAPI AntiMonikerImpl_ComposeWith(IMoniker* iface,IMoniker* pmkRight,BOOL fOnlyIfNotGeneric, IMoniker** ppmkComposite);
|
||||
static HRESULT WINAPI AntiMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker);
|
||||
static HRESULT WINAPI AntiMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker);
|
||||
static HRESULT WINAPI AntiMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash);
|
||||
static HRESULT WINAPI AntiMonikerImpl_IsRunning(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, IMoniker* pmkNewlyRunning);
|
||||
static HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, FILETIME* pAntiTime);
|
||||
static HRESULT WINAPI AntiMonikerImpl_Inverse(IMoniker* iface,IMoniker** ppmk);
|
||||
static HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther, IMoniker** ppmkPrefix);
|
||||
static HRESULT WINAPI AntiMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath);
|
||||
static HRESULT WINAPI AntiMonikerImpl_GetDisplayName(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR *ppszDisplayName);
|
||||
static HRESULT WINAPI AntiMonikerImpl_ParseDisplayName(IMoniker* iface,IBindCtx* pbc, IMoniker* pmkToLeft, LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut);
|
||||
static HRESULT WINAPI AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys);
|
||||
|
||||
/********************************************************************************/
|
||||
/* IROTData prototype functions */
|
||||
|
||||
/* IUnknown prototype functions */
|
||||
static HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData* iface,REFIID riid,VOID** ppvObject);
|
||||
static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData* iface);
|
||||
static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface);
|
||||
|
||||
/* IROTData prototype function */
|
||||
static HRESULT WINAPI AntiMonikerROTDataImpl_GetComparaisonData(IROTData* iface,BYTE* pbData,ULONG cbMax,ULONG* pcbData);
|
||||
|
||||
/* Local function used by AntiMoniker implementation */
|
||||
HRESULT WINAPI AntiMonikerImpl_Construct(AntiMonikerImpl* iface);
|
||||
HRESULT WINAPI AntiMonikerImpl_Destroy(AntiMonikerImpl* iface);
|
||||
|
||||
/********************************************************************************/
|
||||
/* Virtual function table for the AntiMonikerImpl class witch include Ipersist,*/
|
||||
/* IPersistStream and IMoniker functions. */
|
||||
static ICOM_VTABLE(IMoniker) VT_AntiMonikerImpl =
|
||||
{
|
||||
AntiMonikerImpl_QueryInterface,
|
||||
AntiMonikerImpl_AddRef,
|
||||
AntiMonikerImpl_Release,
|
||||
AntiMonikerImpl_GetClassID,
|
||||
AntiMonikerImpl_IsDirty,
|
||||
AntiMonikerImpl_Load,
|
||||
AntiMonikerImpl_Save,
|
||||
AntiMonikerImpl_GetSizeMax,
|
||||
AntiMonikerImpl_BindToObject,
|
||||
AntiMonikerImpl_BindToStorage,
|
||||
AntiMonikerImpl_Reduce,
|
||||
AntiMonikerImpl_ComposeWith,
|
||||
AntiMonikerImpl_Enum,
|
||||
AntiMonikerImpl_IsEqual,
|
||||
AntiMonikerImpl_Hash,
|
||||
AntiMonikerImpl_IsRunning,
|
||||
AntiMonikerImpl_GetTimeOfLastChange,
|
||||
AntiMonikerImpl_Inverse,
|
||||
AntiMonikerImpl_CommonPrefixWith,
|
||||
AntiMonikerImpl_RelativePathTo,
|
||||
AntiMonikerImpl_GetDisplayName,
|
||||
AntiMonikerImpl_ParseDisplayName,
|
||||
AntiMonikerImpl_IsSystemMoniker
|
||||
};
|
||||
|
||||
/********************************************************************************/
|
||||
/* Virtual function table for the IROTData class. */
|
||||
static ICOM_VTABLE(IROTData) VT_ROTDataImpl =
|
||||
{
|
||||
AntiMonikerROTDataImpl_QueryInterface,
|
||||
AntiMonikerROTDataImpl_AddRef,
|
||||
AntiMonikerROTDataImpl_Release,
|
||||
AntiMonikerROTDataImpl_GetComparaisonData
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* AntiMoniker_QueryInterface
|
||||
*******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(AntiMonikerImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,riid,ppvObject);
|
||||
|
||||
/* Perform a sanity check on the parameters.*/
|
||||
if ( (This==0) || (ppvObject==0) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* Initialize the return parameter */
|
||||
*ppvObject = 0;
|
||||
|
||||
/* Compare the riid with the interface IDs implemented by this object.*/
|
||||
if (IsEqualIID(&IID_IUnknown, riid) ||
|
||||
IsEqualIID(&IID_IPersist, riid) ||
|
||||
IsEqualIID(&IID_IPersistStream, riid) ||
|
||||
IsEqualIID(&IID_IMoniker, riid)
|
||||
)
|
||||
*ppvObject = iface;
|
||||
else if (IsEqualIID(&IID_IROTData, riid))
|
||||
*ppvObject = (IROTData*)&(This->lpvtbl2);
|
||||
|
||||
/* Check that we obtained an interface.*/
|
||||
if ((*ppvObject)==0)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
/* Query Interface always increases the reference count by one when it is successful */
|
||||
AntiMonikerImpl_AddRef(iface);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_AddRef
|
||||
******************************************************************************/
|
||||
ULONG WINAPI AntiMonikerImpl_AddRef(IMoniker* iface)
|
||||
{
|
||||
ICOM_THIS(AntiMonikerImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Release
|
||||
******************************************************************************/
|
||||
ULONG WINAPI AntiMonikerImpl_Release(IMoniker* iface)
|
||||
{
|
||||
ICOM_THIS(AntiMonikerImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
This->ref--;
|
||||
|
||||
/* destroy the object if there's no more reference on it */
|
||||
if (This->ref==0){
|
||||
|
||||
AntiMonikerImpl_Destroy(This);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return This->ref;;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_GetClassID
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_GetClassID(const IMoniker* iface,CLSID *pClassID)
|
||||
{
|
||||
TRACE(ole,"(%p,%p),stub!\n",iface,pClassID);
|
||||
|
||||
if (pClassID==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*pClassID = CLSID_AntiMoniker;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_IsDirty
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_IsDirty(IMoniker* iface)
|
||||
{
|
||||
/* Note that the OLE-provided implementations of the IPersistStream::IsDirty
|
||||
method in the OLE-provided moniker interfaces always return S_FALSE because
|
||||
their internal state never changes. */
|
||||
|
||||
TRACE(ole,"(%p)\n",iface);
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Load
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Load(IMoniker* iface,IStream* pStm)
|
||||
{
|
||||
DWORD constant=1,dwbuffer;
|
||||
HRESULT res;
|
||||
|
||||
/* data read by this function is only a DWORD constant (must be 1) ! */
|
||||
res=IStream_Read(pStm,&dwbuffer,sizeof(DWORD),NULL);
|
||||
|
||||
if (SUCCEEDED(res)&& dwbuffer!=constant)
|
||||
return E_FAIL;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Save
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Save(IMoniker* iface,IStream* pStm,BOOL fClearDirty)
|
||||
{
|
||||
DWORD constant=1;
|
||||
HRESULT res;
|
||||
|
||||
/* data writen by this function is only a DWORD constant seted to 1 ! */
|
||||
res=IStream_Write(pStm,&constant,sizeof(constant),NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_GetSizeMax
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_GetSizeMax(IMoniker* iface,
|
||||
ULARGE_INTEGER* pcbSize)/* Pointer to size of stream needed to save object */
|
||||
{
|
||||
TRACE(ole,"(%p,%p)\n",iface,pcbSize);
|
||||
|
||||
if (pcbSize!=NULL)
|
||||
return E_POINTER;
|
||||
|
||||
/* for more details see AntiMonikerImpl_Save coments */
|
||||
|
||||
/* Normaly the sizemax must be the size of DWORD ! but I tested this function it ususlly return 16 bytes */
|
||||
/* more than the number of bytes used by AntiMoniker::Save function */
|
||||
pcbSize->LowPart = sizeof(DWORD)+16;
|
||||
|
||||
pcbSize->HighPart=0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Construct (local function)
|
||||
*******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Construct(AntiMonikerImpl* This)
|
||||
{
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
/* Initialize the virtual fgunction table. */
|
||||
This->lpvtbl1 = &VT_AntiMonikerImpl;
|
||||
This->lpvtbl2 = &VT_ROTDataImpl;
|
||||
This->ref = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Destroy (local function)
|
||||
*******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Destroy(AntiMonikerImpl* This)
|
||||
{
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
return HeapFree(GetProcessHeap(),0,This);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_BindToObject
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_BindToObject(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
IMoniker* pmkToLeft,
|
||||
REFIID riid,
|
||||
VOID** ppvResult)
|
||||
{
|
||||
TRACE(ole,"(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_BindToStorage
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_BindToStorage(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
IMoniker* pmkToLeft,
|
||||
REFIID riid,
|
||||
VOID** ppvResult)
|
||||
{
|
||||
TRACE(ole,"(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvResult);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Reduce
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Reduce(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
DWORD dwReduceHowFar,
|
||||
IMoniker** ppmkToLeft,
|
||||
IMoniker** ppmkReduced)
|
||||
{
|
||||
TRACE(ole,"(%p,%p,%ld,%p,%p)\n",iface,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced);
|
||||
|
||||
if (ppmkReduced==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
AntiMonikerImpl_AddRef(iface);
|
||||
|
||||
*ppmkReduced=iface;
|
||||
|
||||
return MK_S_REDUCED_TO_SELF;
|
||||
}
|
||||
/******************************************************************************
|
||||
* AntiMoniker_ComposeWith
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_ComposeWith(IMoniker* iface,
|
||||
IMoniker* pmkRight,
|
||||
BOOL fOnlyIfNotGeneric,
|
||||
IMoniker** ppmkComposite)
|
||||
{
|
||||
|
||||
TRACE(ole,"(%p,%p,%d,%p)\n",iface,pmkRight,fOnlyIfNotGeneric,ppmkComposite);
|
||||
|
||||
if ((ppmkComposite==NULL)||(pmkRight==NULL))
|
||||
return E_POINTER;
|
||||
|
||||
*ppmkComposite=0;
|
||||
|
||||
if (fOnlyIfNotGeneric)
|
||||
return MK_E_NEEDGENERIC;
|
||||
else
|
||||
return CreateGenericComposite(iface,pmkRight,ppmkComposite);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Enum
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker)
|
||||
{
|
||||
TRACE(ole,"(%p,%d,%p)\n",iface,fForward,ppenumMoniker);
|
||||
|
||||
if (ppenumMoniker == NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*ppenumMoniker = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_IsEqual
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker)
|
||||
{
|
||||
DWORD mkSys;
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",iface,pmkOtherMoniker);
|
||||
|
||||
if (pmkOtherMoniker==NULL)
|
||||
return S_FALSE;
|
||||
|
||||
IMoniker_IsSystemMoniker(pmkOtherMoniker,&mkSys);
|
||||
|
||||
if (mkSys==MKSYS_ANTIMONIKER)
|
||||
return S_OK;
|
||||
else
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Hash
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
|
||||
{
|
||||
if (pdwHash==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*pdwHash=0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_IsRunning
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_IsRunning(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
IMoniker* pmkToLeft,
|
||||
IMoniker* pmkNewlyRunning)
|
||||
{
|
||||
IRunningObjectTable* rot;
|
||||
HRESULT res;
|
||||
|
||||
TRACE(ole,"(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pmkNewlyRunning);
|
||||
|
||||
if (pbc==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
res=IBindCtx_GetRunningObjectTable(pbc,&rot);
|
||||
|
||||
if (FAILED(res))
|
||||
return res;
|
||||
|
||||
res = IRunningObjectTable_IsRunning(rot,iface);
|
||||
|
||||
IRunningObjectTable_Release(rot);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_GetTimeOfLastChange
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_GetTimeOfLastChange(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
IMoniker* pmkToLeft,
|
||||
FILETIME* pAntiTime)
|
||||
{
|
||||
TRACE(ole,"(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pAntiTime);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_Inverse
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_Inverse(IMoniker* iface,IMoniker** ppmk)
|
||||
{
|
||||
TRACE(ole,"(%p,%p)\n",iface,ppmk);
|
||||
|
||||
if (ppmk==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*ppmk=0;
|
||||
|
||||
return MK_E_NOINVERSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_CommonPrefixWith
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** ppmkPrefix)
|
||||
{
|
||||
DWORD mkSys;
|
||||
|
||||
IMoniker_IsSystemMoniker(pmkOther,&mkSys);
|
||||
|
||||
if(mkSys==MKSYS_ITEMMONIKER){
|
||||
|
||||
IMoniker_AddRef(iface);
|
||||
|
||||
*ppmkPrefix=iface;
|
||||
|
||||
IMoniker_AddRef(iface);
|
||||
|
||||
return MK_S_US;
|
||||
}
|
||||
else
|
||||
return MonikerCommonPrefixWith(iface,pmkOther,ppmkPrefix);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_RelativePathTo
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath)
|
||||
{
|
||||
TRACE(ole,"(%p,%p,%p)\n",iface,pmOther,ppmkRelPath);
|
||||
|
||||
if (ppmkRelPath==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
IMoniker_AddRef(pmOther);
|
||||
|
||||
*ppmkRelPath=pmOther;
|
||||
|
||||
return MK_S_HIM;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_GetDisplayName
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_GetDisplayName(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
IMoniker* pmkToLeft,
|
||||
LPOLESTR *ppszDisplayName)
|
||||
{
|
||||
WCHAR back[]={'\\','.','.',0};
|
||||
|
||||
TRACE(ole,"(%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,ppszDisplayName);
|
||||
|
||||
if (ppszDisplayName==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
if (pmkToLeft!=NULL){
|
||||
FIXME(ole,"() pmkToLeft!=NULL not implemented \n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
*ppszDisplayName=CoTaskMemAlloc(sizeof(back));
|
||||
|
||||
if (*ppszDisplayName==NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
lstrcpyW(*ppszDisplayName,back);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_ParseDisplayName
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_ParseDisplayName(IMoniker* iface,
|
||||
IBindCtx* pbc,
|
||||
IMoniker* pmkToLeft,
|
||||
LPOLESTR pszDisplayName,
|
||||
ULONG* pchEaten,
|
||||
IMoniker** ppmkOut)
|
||||
{
|
||||
TRACE(ole,"(%p,%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMoniker_IsSystemMonker
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys)
|
||||
{
|
||||
TRACE(ole,"(%p,%p)\n",iface,pwdMksys);
|
||||
|
||||
if (!pwdMksys)
|
||||
return E_POINTER;
|
||||
|
||||
(*pwdMksys)=MKSYS_ANTIMONIKER;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* AntiMonikerIROTData_QueryInterface
|
||||
*******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject)
|
||||
{
|
||||
|
||||
ICOM_THIS_From_IROTData(IMoniker, iface);
|
||||
|
||||
TRACE(ole,"(%p,%p,%p)\n",iface,riid,ppvObject);
|
||||
|
||||
return AntiMonikerImpl_QueryInterface(This, riid, ppvObject);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AntiMonikerIROTData_AddRef
|
||||
*/
|
||||
ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
|
||||
{
|
||||
ICOM_THIS_From_IROTData(IMoniker, iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",iface);
|
||||
|
||||
return AntiMonikerImpl_AddRef(This);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AntiMonikerIROTData_Release
|
||||
*/
|
||||
ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface)
|
||||
{
|
||||
ICOM_THIS_From_IROTData(IMoniker, iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",iface);
|
||||
|
||||
return AntiMonikerImpl_Release(This);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* AntiMonikerIROTData_GetComparaisonData
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI AntiMonikerROTDataImpl_GetComparaisonData(IROTData* iface,
|
||||
BYTE* pbData,
|
||||
ULONG cbMax,
|
||||
ULONG* pcbData)
|
||||
{
|
||||
FIXME(ole,"(),stub!\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateAntiMoniker [OLE.55]
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI CreateAntiMoniker(LPMONIKER * ppmk)
|
||||
{
|
||||
AntiMonikerImpl* newAntiMoniker = 0;
|
||||
HRESULT hr = S_OK;
|
||||
IID riid=IID_IMoniker;
|
||||
|
||||
TRACE(ole,"(%p)\n",ppmk);
|
||||
|
||||
newAntiMoniker = HeapAlloc(GetProcessHeap(), 0, sizeof(AntiMonikerImpl));
|
||||
|
||||
if (newAntiMoniker == 0)
|
||||
return STG_E_INSUFFICIENTMEMORY;
|
||||
|
||||
hr = AntiMonikerImpl_Construct(newAntiMoniker);
|
||||
|
||||
if (FAILED(hr)){
|
||||
|
||||
HeapFree(GetProcessHeap(),0,newAntiMoniker);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = AntiMonikerImpl_QueryInterface((IMoniker*)newAntiMoniker,&riid,(void**)ppmk);
|
||||
|
||||
return hr;
|
||||
}
|
407
ole/bindctx.c
407
ole/bindctx.c
|
@ -4,8 +4,6 @@
|
|||
* Copyright 1999 Noomen Hamza
|
||||
***************************************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "winerror.h"
|
||||
|
@ -13,36 +11,59 @@
|
|||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
|
||||
/* represent the first size table and it's increment block size */
|
||||
#define BLOCK_TAB_SIZE 10
|
||||
#define MAX_TAB_SIZE 0xFFFFFFFF
|
||||
|
||||
/* data structure of the BindCtx table elements */
|
||||
typedef struct BindCtxObject{
|
||||
|
||||
IUnknown* pObj; /* point on a bound object */
|
||||
|
||||
LPOLESTR pkeyObj; /* key associated to this bound object */
|
||||
|
||||
BYTE regType; /* registration type: 1 if RegisterObjectParam and 0 if RegisterObjectBound */
|
||||
|
||||
} BindCtxObject;
|
||||
|
||||
/* BindCtx data strucrture */
|
||||
typedef struct BindCtxImpl{
|
||||
|
||||
ICOM_VTABLE(IBindCtx)* lpvtbl;
|
||||
ICOM_VTABLE(IBindCtx)* lpvtbl; /* VTable relative to the IBindCtx interface.*/
|
||||
|
||||
ULONG ref;
|
||||
ULONG ref; /* reference counter for this object */
|
||||
|
||||
BindCtxObject* bindCtxTable; /* this is a table in witch all bounded objects are stored*/
|
||||
DWORD bindCtxTableLastIndex; /* first free index in the table */
|
||||
DWORD bindCtxTableSize; /* size table */
|
||||
|
||||
BIND_OPTS2 bindOption2; /* a structure witch contains the bind options*/
|
||||
|
||||
} BindCtxImpl;
|
||||
|
||||
/* IBindCtx prototype functions : */
|
||||
|
||||
HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx* iface,REFIID riid,void** ppvObject);
|
||||
ULONG WINAPI BindCtxImpl_AddRef(IBindCtx* iface);
|
||||
ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface);
|
||||
HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk);
|
||||
HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx* iface, IUnknown* punk);
|
||||
HRESULT WINAPI BindCtxImpl_ReleaseObjects(IBindCtx* iface);
|
||||
HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts);
|
||||
HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts);
|
||||
HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot);
|
||||
HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown* punk);
|
||||
HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown* punk);
|
||||
HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx* iface,IEnumString** ppenum);
|
||||
HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR pszkey);
|
||||
|
||||
HRESULT WINAPI CreateBindCtx16(DWORD reserved, LPBC * ppbc);
|
||||
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc);
|
||||
|
||||
/* IUnknown functions*/
|
||||
static HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx* iface,REFIID riid,void** ppvObject);
|
||||
static ULONG WINAPI BindCtxImpl_AddRef(IBindCtx* iface);
|
||||
static ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface);
|
||||
/* IBindCtx functions */
|
||||
static HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk);
|
||||
static HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx* iface, IUnknown* punk);
|
||||
static HRESULT WINAPI BindCtxImpl_ReleaseBoundObjects(IBindCtx* iface);
|
||||
static HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts);
|
||||
static HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts);
|
||||
static HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot);
|
||||
static HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown* punk);
|
||||
static HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown** punk);
|
||||
static HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx* iface,IEnumString** ppenum);
|
||||
static HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR pszkey);
|
||||
/* Local functions*/
|
||||
HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This);
|
||||
HRESULT WINAPI BindCtxImpl_Destroy(BindCtxImpl* This);
|
||||
HRESULT WINAPI BindCtxImpl_GetObjectIndex(BindCtxImpl* This,IUnknown* punk,LPOLESTR pszkey,DWORD *index);
|
||||
|
||||
// Virtual function table for the BindCtx class.
|
||||
/* Virtual function table for the BindCtx class. */
|
||||
static ICOM_VTABLE(IBindCtx) VT_BindCtxImpl =
|
||||
{
|
||||
BindCtxImpl_QueryInterface,
|
||||
|
@ -50,7 +71,7 @@ static ICOM_VTABLE(IBindCtx) VT_BindCtxImpl =
|
|||
BindCtxImpl_Release,
|
||||
BindCtxImpl_RegisterObjectBound,
|
||||
BindCtxImpl_RevokeObjectBound,
|
||||
BindCtxImpl_ReleaseObjects,
|
||||
BindCtxImpl_ReleaseBoundObjects,
|
||||
BindCtxImpl_SetBindOptions,
|
||||
BindCtxImpl_GetBindOptions,
|
||||
BindCtxImpl_GetRunningObjectTable,
|
||||
|
@ -66,35 +87,40 @@ static ICOM_VTABLE(IBindCtx) VT_BindCtxImpl =
|
|||
HRESULT WINAPI BindCtxImpl_QueryInterface(IBindCtx* iface,REFIID riid,void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,riid,ppvObject);
|
||||
// Perform a sanity check on the parameters.
|
||||
if ( (This==0) || (ppvObject==0) ) return E_INVALIDARG;
|
||||
|
||||
/* Perform a sanity check on the parameters.*/
|
||||
if ( (This==0) || (ppvObject==0) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
// Initialize the return parameter.
|
||||
/* Initialize the return parameter.*/
|
||||
*ppvObject = 0;
|
||||
|
||||
// Compare the riid with the interface IDs implemented by this object.
|
||||
if (memcmp(&IID_IUnknown, riid, sizeof(IID_IUnknown)) == 0)
|
||||
/* Compare the riid with the interface IDs implemented by this object.*/
|
||||
if (IsEqualIID(&IID_IUnknown, riid))
|
||||
*ppvObject = (IBindCtx*)This;
|
||||
else
|
||||
if (memcmp(&IID_IBindCtx, riid, sizeof(IID_IBindCtx)) == 0)
|
||||
if (IsEqualIID(&IID_IBindCtx, riid))
|
||||
*ppvObject = (IBindCtx*)This;
|
||||
|
||||
// Check that we obtained an interface.
|
||||
if ((*ppvObject)==0) return E_NOINTERFACE;
|
||||
/* Check that we obtained an interface.*/
|
||||
if ((*ppvObject)==0)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
// Query Interface always increases the reference count by one when it is successful
|
||||
/* Query Interface always increases the reference count by one when it is successful */
|
||||
BindCtxImpl_AddRef(iface);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_ _AddRef
|
||||
* BindCtx_AddRef
|
||||
******************************************************************************/
|
||||
ULONG WINAPI BindCtxImpl_AddRef(IBindCtx* iface)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
return ++(This->ref);
|
||||
|
@ -106,12 +132,18 @@ ULONG WINAPI BindCtxImpl_AddRef(IBindCtx* iface)
|
|||
ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
This->ref--;
|
||||
|
||||
if (This->ref==0){
|
||||
|
||||
/* release all registred objects */
|
||||
BindCtxImpl_ReleaseBoundObjects((IBindCtx*)This);
|
||||
|
||||
BindCtxImpl_Destroy(This);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return This->ref;;
|
||||
|
@ -119,28 +151,50 @@ ULONG WINAPI BindCtxImpl_Release(IBindCtx* iface)
|
|||
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_Construct
|
||||
* BindCtx_Construct (local function)
|
||||
*******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_Construct(BindCtxImpl* This)
|
||||
{
|
||||
FIXME(ole,"(%p),stub!\n",This);
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
memset(This, 0, sizeof(BindCtxImpl));
|
||||
|
||||
//Initialize the virtual fgunction table.
|
||||
/* Initialize the virtual function table.*/
|
||||
This->lpvtbl = &VT_BindCtxImpl;
|
||||
This->ref = 0;
|
||||
|
||||
return E_NOTIMPL;
|
||||
/* Initialize the BIND_OPTS2 structure */
|
||||
This->bindOption2.cbStruct = sizeof(BIND_OPTS2);
|
||||
This->bindOption2.grfFlags = 0;
|
||||
This->bindOption2.grfMode = STGM_READWRITE;
|
||||
This->bindOption2.dwTickCountDeadline = 0;
|
||||
|
||||
This->bindOption2.dwTrackFlags = 0;
|
||||
This->bindOption2.dwClassContext = CLSCTX_SERVER;
|
||||
This->bindOption2.locale = 1033;
|
||||
This->bindOption2.pServerInfo = 0;
|
||||
|
||||
/* Initialize the bindctx table */
|
||||
This->bindCtxTableSize=BLOCK_TAB_SIZE;
|
||||
This->bindCtxTableLastIndex=0;
|
||||
This->bindCtxTable= HeapAlloc(GetProcessHeap(), 0,This->bindCtxTableSize*sizeof(BindCtxObject));
|
||||
|
||||
if (This->bindCtxTable==NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_Destroy
|
||||
* BindCtx_Destroy (local function)
|
||||
*******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_Destroy(BindCtxImpl* This)
|
||||
{
|
||||
FIXME(ole,"(%p),stub!\n",This);
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
SEGPTR_FREE(This);
|
||||
/* free the table space memory */
|
||||
HeapFree(GetProcessHeap(),0,This->bindCtxTable);
|
||||
|
||||
/* free the bindctx structure */
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -151,10 +205,40 @@ HRESULT WINAPI BindCtxImpl_Destroy(BindCtxImpl* This)
|
|||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,punk);
|
||||
|
||||
return E_NOTIMPL;
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
DWORD lastIndex=This->bindCtxTableLastIndex;
|
||||
BindCtxObject cell;
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",This,punk);
|
||||
|
||||
if (punk==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
IUnknown_AddRef(punk);
|
||||
|
||||
/* put the object in the first free element in the table */
|
||||
This->bindCtxTable[lastIndex].pObj = punk;
|
||||
This->bindCtxTable[lastIndex].pkeyObj = NULL;
|
||||
This->bindCtxTable[lastIndex].regType = 0;
|
||||
cell=This->bindCtxTable[lastIndex];
|
||||
lastIndex= ++This->bindCtxTableLastIndex;
|
||||
|
||||
if (lastIndex == This->bindCtxTableSize){ /* the table is full so it must be resized */
|
||||
|
||||
if (This->bindCtxTableSize > (MAX_TAB_SIZE-BLOCK_TAB_SIZE)){
|
||||
FIXME(ole,"This->bindCtxTableSize: %ld is out of data limite \n",This->bindCtxTableSize);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
This->bindCtxTableSize+=BLOCK_TAB_SIZE; /* new table size */
|
||||
|
||||
This->bindCtxTable = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,This->bindCtxTable,
|
||||
This->bindCtxTableSize * sizeof(BindCtxObject));
|
||||
if (!This->bindCtxTable)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -162,21 +246,45 @@ HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk)
|
|||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx* iface, IUnknown* punk)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,punk);
|
||||
DWORD index,j;
|
||||
|
||||
return E_NOTIMPL;
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",This,punk);
|
||||
|
||||
/* check if the object was registred or not */
|
||||
if (BindCtxImpl_GetObjectIndex(This,punk,NULL,&index)==S_FALSE)
|
||||
|
||||
return MK_E_NOTBOUND;
|
||||
|
||||
IUnknown_Release(This->bindCtxTable[index].pObj);
|
||||
|
||||
/* left-shift all elements in the rigth side of the curent revoked object */
|
||||
for(j=index; j<This->bindCtxTableLastIndex-1; j++)
|
||||
This->bindCtxTable[j]= This->bindCtxTable[j+1];
|
||||
|
||||
This->bindCtxTableLastIndex--;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_ReleaseObjects
|
||||
* BindCtx_ReleaseBoundObjects
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_ReleaseObjects(IBindCtx* iface)
|
||||
HRESULT WINAPI BindCtxImpl_ReleaseBoundObjects(IBindCtx* iface)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p),stub!\n",This);
|
||||
DWORD i;
|
||||
|
||||
return E_NOTIMPL;
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
for(i=0;i<This->bindCtxTableLastIndex;i++)
|
||||
IUnknown_Release(This->bindCtxTable[i].pObj);
|
||||
|
||||
This->bindCtxTableLastIndex = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -185,9 +293,15 @@ HRESULT WINAPI BindCtxImpl_ReleaseObjects(IBindCtx* iface)
|
|||
HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,pbindopts);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE(ole,"(%p,%p)\n",This,pbindopts);
|
||||
|
||||
if (pbindopts==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
This->bindOption2=*pbindopts;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -196,9 +310,15 @@ HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts
|
|||
HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,pbindopts);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE(ole,"(%p,%p)\n",This,pbindopts);
|
||||
|
||||
if (pbindopts==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*pbindopts=This->bindOption2;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -206,10 +326,18 @@ HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts
|
|||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectTable** pprot)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,pprot);
|
||||
HRESULT res;
|
||||
|
||||
return E_NOTIMPL;
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",This,pprot);
|
||||
|
||||
if (pprot==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
res=GetRunningObjectTable(0,(LPVOID*)pprot);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -218,44 +346,152 @@ HRESULT WINAPI BindCtxImpl_GetRunningObjectTable(IBindCtx* iface,IRunningObjectT
|
|||
HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown* punk)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p,%p),stub!\n",This,pszkey,punk);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,pszkey,punk);
|
||||
|
||||
if (punk==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
IUnknown_AddRef(punk);
|
||||
|
||||
This->bindCtxTable[This->bindCtxTableLastIndex].pObj = punk;
|
||||
This->bindCtxTable[This->bindCtxTableLastIndex].regType = 1;
|
||||
|
||||
if (pszkey==NULL)
|
||||
|
||||
This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj=NULL;
|
||||
|
||||
else{
|
||||
|
||||
This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj=
|
||||
HeapAlloc(GetProcessHeap(),0,(sizeof(WCHAR)*(1+lstrlenW(pszkey))));
|
||||
|
||||
if (This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj==NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
lstrcpyW(This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj,pszkey);
|
||||
}
|
||||
|
||||
This->bindCtxTableLastIndex++;
|
||||
|
||||
if (This->bindCtxTableLastIndex == This->bindCtxTableSize){ /* table is full ! must be resized */
|
||||
|
||||
This->bindCtxTableSize+=BLOCK_TAB_SIZE; /* new table size */
|
||||
|
||||
if (This->bindCtxTableSize > (MAX_TAB_SIZE-BLOCK_TAB_SIZE)){
|
||||
FIXME(ole,"This->bindCtxTableSize: %ld is out of data limite \n",This->bindCtxTableSize);
|
||||
return E_FAIL;
|
||||
}
|
||||
This->bindCtxTable = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,This->bindCtxTable,
|
||||
This->bindCtxTableSize * sizeof(BindCtxObject));
|
||||
if (!This->bindCtxTable)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
/******************************************************************************
|
||||
* BindCtx_GetObjectParam
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown* punk)
|
||||
HRESULT WINAPI BindCtxImpl_GetObjectParam(IBindCtx* iface,LPOLESTR pszkey, IUnknown** punk)
|
||||
{
|
||||
DWORD index;
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p,%p),stub!\n",This,pszkey,punk);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,pszkey,punk);
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_EnumObjectParam
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx* iface,IEnumString** ppenum)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,ppenum);
|
||||
if (punk==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
return E_NOTIMPL;
|
||||
*punk=0;
|
||||
|
||||
if (BindCtxImpl_GetObjectIndex(This,NULL,pszkey,&index)==S_FALSE)
|
||||
return E_FAIL;
|
||||
|
||||
IUnknown_AddRef(This->bindCtxTable[index].pObj);
|
||||
|
||||
*punk = This->bindCtxTable[index].pObj;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_RevokeObjectParam
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR pszkey)
|
||||
HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR ppenum)
|
||||
{
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
FIXME(ole,"(%p,%p),stub!\n",This,pszkey);
|
||||
DWORD index,j;
|
||||
|
||||
ICOM_THIS(BindCtxImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",This,ppenum);
|
||||
|
||||
if (BindCtxImpl_GetObjectIndex(This,NULL,ppenum,&index)==S_FALSE)
|
||||
return E_FAIL;
|
||||
|
||||
/* release the object if it's found */
|
||||
IUnknown_Release(This->bindCtxTable[index].pObj);
|
||||
|
||||
/* remove the object from the table with a left-shifting of all objects in the right side */
|
||||
for(j=index; j<This->bindCtxTableLastIndex-1; j++)
|
||||
This->bindCtxTable[j]= This->bindCtxTable[j+1];
|
||||
|
||||
This->bindCtxTableLastIndex--;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* BindCtx_EnumObjectParam
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_EnumObjectParam(IBindCtx* iface,IEnumString** pszkey)
|
||||
{
|
||||
FIXME(ole,"(%p,%p),stub!\n",iface,pszkey);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/********************************************************************************
|
||||
* GetObjectIndex (local function)
|
||||
********************************************************************************/
|
||||
HRESULT WINAPI BindCtxImpl_GetObjectIndex(BindCtxImpl* This,
|
||||
IUnknown* punk,
|
||||
LPOLESTR pszkey,
|
||||
DWORD *index)
|
||||
{
|
||||
|
||||
DWORD i;
|
||||
BYTE found=0;
|
||||
|
||||
TRACE(ole,"(%p,%p,%p,%p)\n",This,punk,pszkey,index);
|
||||
|
||||
if (punk==NULL)
|
||||
/* search object identified by a register key */
|
||||
for(i=0; ( (i<This->bindCtxTableLastIndex) && (!found));i++){
|
||||
|
||||
if(This->bindCtxTable[i].regType==1){
|
||||
|
||||
if ( ( (This->bindCtxTable[i].pkeyObj==NULL) && (pszkey==NULL) ) ||
|
||||
( (This->bindCtxTable[i].pkeyObj!=NULL) &&
|
||||
(pszkey!=NULL) &&
|
||||
(lstrcmpW(This->bindCtxTable[i].pkeyObj,pszkey)==0)
|
||||
)
|
||||
)
|
||||
|
||||
found=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* search object identified by a moniker*/
|
||||
for(i=0; ( (i<This->bindCtxTableLastIndex) && (!found));i++)
|
||||
if(This->bindCtxTable[i].pObj==punk)
|
||||
found=1;
|
||||
|
||||
if (index != NULL)
|
||||
*index=i-1;
|
||||
|
||||
if (found)
|
||||
return S_OK;
|
||||
else
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateBindCtx16
|
||||
|
@ -263,31 +499,34 @@ HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR pszkey)
|
|||
HRESULT WINAPI CreateBindCtx16(DWORD reserved, LPBC * ppbc)
|
||||
{
|
||||
FIXME(ole,"(%ld,%p),stub!\n",reserved,ppbc);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateBindCtx32
|
||||
* CreateBindCtx
|
||||
******************************************************************************/
|
||||
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC * ppbc)
|
||||
{
|
||||
BindCtxImpl* newBindCtx = 0;
|
||||
HRESULT hr = S_OK;
|
||||
HRESULT hr;
|
||||
IID riid=IID_IBindCtx;
|
||||
|
||||
TRACE(ole,"(%ld,%p)\n",reserved,ppbc);
|
||||
|
||||
newBindCtx = HeapAlloc(GetProcessHeap(), 0, sizeof(BindCtxImpl));
|
||||
|
||||
if (newBindCtx == 0)
|
||||
return STG_E_INSUFFICIENTMEMORY;
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hr = BindCtxImpl_Construct(newBindCtx);
|
||||
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
if (FAILED(hr)){
|
||||
|
||||
hr = BindCtxImpl_QueryInterface((IBindCtx*)newBindCtx,&IID_IBindCtx,(void**)ppbc);
|
||||
HeapFree(GetProcessHeap(),0,newBindCtx);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = BindCtxImpl_QueryInterface((IBindCtx*)newBindCtx,&riid,(void**)ppbc);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
140
ole/compobj.c
140
ole/compobj.c
|
@ -50,7 +50,7 @@
|
|||
#include "wine/obj_clientserver.h"
|
||||
|
||||
#include "ifs.h"
|
||||
|
||||
#include "compobj.h"
|
||||
/****************************************************************************
|
||||
* COM External Lock structures and methods declaration
|
||||
*
|
||||
|
@ -270,6 +270,8 @@ HRESULT WINAPI CoInitializeEx(
|
|||
*/
|
||||
TRACE(ole, "() - Initializing the COM libraries\n");
|
||||
|
||||
RunningObjectTableImpl_Initialize();
|
||||
|
||||
hr = S_OK;
|
||||
}
|
||||
else
|
||||
|
@ -322,6 +324,7 @@ void WINAPI CoUninitialize(void)
|
|||
*/
|
||||
TRACE(ole, "() - Releasing the COM libraries\n");
|
||||
|
||||
RunningObjectTableImpl_UnInitialize();
|
||||
/*
|
||||
* Release the references to the registered class objects.
|
||||
*/
|
||||
|
@ -738,7 +741,7 @@ HRESULT WINE_StringFromCLSID(
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
sprintf(idstr, "{%08lX-%04X-%04X-%02x%02X-",
|
||||
sprintf(idstr, "{%08lX-%04X-%04X-%02X%02X-",
|
||||
id->Data1, id->Data2, id->Data3,
|
||||
id->Data4[0], id->Data4[1]);
|
||||
s = &idstr[25];
|
||||
|
@ -894,6 +897,47 @@ HRESULT WINAPI CLSIDFromProgID(
|
|||
return ret;
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
* OleSaveToStream
|
||||
*
|
||||
* This function write a CLSID on stream
|
||||
*/
|
||||
HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid)
|
||||
{
|
||||
TRACE(ole,"(%p,%p)\n",pStm,rclsid);
|
||||
|
||||
if (rclsid==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL);
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
* OleSaveToStream
|
||||
*
|
||||
* This function read a CLSID from a stream
|
||||
*/
|
||||
HRESULT WINAPI ReadClassStm(IStream *pStm,REFCLSID rclsid)
|
||||
{
|
||||
ULONG nbByte;
|
||||
HRESULT res;
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",pStm,rclsid);
|
||||
|
||||
if (rclsid==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
res = IStream_Read(pStm,(void*)rclsid,sizeof(CLSID),&nbByte);
|
||||
|
||||
if (FAILED(res))
|
||||
return res;
|
||||
|
||||
if (nbByte != sizeof(CLSID))
|
||||
return S_FALSE;
|
||||
else
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* FIXME: this function is not declared in the WINELIB headers. But where should it go ? */
|
||||
/***********************************************************************
|
||||
* LookupETask (COMPOBJ.94)
|
||||
|
@ -1248,6 +1292,97 @@ HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext,
|
|||
return hres;
|
||||
}
|
||||
|
||||
/****************************************************************************************
|
||||
* GetClassFile
|
||||
*
|
||||
* This function supplies the CLSID associated with the given filename.
|
||||
*/
|
||||
HRESULT WINAPI GetClassFile(LPOLESTR filePathName,CLSID *pclsid)
|
||||
{
|
||||
IStorage *pstg=0;
|
||||
HRESULT res;
|
||||
int nbElm=0,length=0,i=0;
|
||||
LONG sizeProgId=20;
|
||||
LPOLESTR *pathDec=0,absFile=0,progId=0;
|
||||
WCHAR extention[100]={0};
|
||||
|
||||
TRACE(ole,"()\n");
|
||||
|
||||
/* if the file contain a storage object the return the CLSID writen by IStorage_SetClass method*/
|
||||
if((StgIsStorageFile(filePathName))==S_OK){
|
||||
|
||||
res=StgOpenStorage(filePathName,NULL,STGM_READ | STGM_SHARE_DENY_WRITE,NULL,0,&pstg);
|
||||
|
||||
if (SUCCEEDED(res))
|
||||
res=ReadClassStg(pstg,pclsid);
|
||||
|
||||
IStorage_Release(pstg);
|
||||
|
||||
return res;
|
||||
}
|
||||
/* if the file is not a storage object then attemps to match various bits in the file against a
|
||||
pattern in the registry. this case is not frequently used ! so I present only the psodocode for
|
||||
this case
|
||||
|
||||
for(i=0;i<nFileTypes;i++)
|
||||
|
||||
for(i=0;j<nPatternsForType;j++){
|
||||
|
||||
PATTERN pat;
|
||||
HANDLE hFile;
|
||||
|
||||
pat=ReadPatternFromRegistry(i,j);
|
||||
hFile=CreateFileW(filePathName,,,,,,hFile);
|
||||
SetFilePosition(hFile,pat.offset);
|
||||
ReadFile(hFile,buf,pat.size,NULL,NULL);
|
||||
if (memcmp(buf&pat.mask,pat.pattern.pat.size)==0){
|
||||
|
||||
*pclsid=ReadCLSIDFromRegistry(i);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* if the obove strategies fail then search for the extension key in the registry */
|
||||
|
||||
/* get the last element (absolute file) in the path name */
|
||||
nbElm=FileMonikerImpl_DecomposePath(filePathName,&pathDec);
|
||||
absFile=pathDec[nbElm-1];
|
||||
|
||||
/* failed if the path represente a directory and not an absolute file name*/
|
||||
if (lstrcmpW(absFile,(LPOLESTR)"\\"))
|
||||
return MK_E_INVALIDEXTENSION;
|
||||
|
||||
/* get the extension of the file */
|
||||
length=lstrlenW(absFile);
|
||||
for(i=length-1; ( (i>=0) && (extention[i]=absFile[i]) );i--);
|
||||
|
||||
/* get the progId associated to the extension */
|
||||
progId=CoTaskMemAlloc(sizeProgId);
|
||||
|
||||
res=RegQueryValueW(HKEY_CLASSES_ROOT,extention,progId,&sizeProgId);
|
||||
|
||||
if (res==ERROR_MORE_DATA){
|
||||
|
||||
CoTaskMemRealloc(progId,sizeProgId);
|
||||
|
||||
res=RegQueryValueW(HKEY_CLASSES_ROOT,extention,progId,&sizeProgId);
|
||||
}
|
||||
if (res==ERROR_SUCCESS)
|
||||
/* return the clsid associated to the progId */
|
||||
res= CLSIDFromProgID(progId,pclsid);
|
||||
|
||||
for(i=0; pathDec[i]!=NULL;i++)
|
||||
CoTaskMemFree(pathDec[i]);
|
||||
CoTaskMemFree(pathDec);
|
||||
|
||||
CoTaskMemFree(progId);
|
||||
|
||||
if (res==ERROR_SUCCESS)
|
||||
return res;
|
||||
|
||||
return MK_E_INVALIDEXTENSION;
|
||||
}
|
||||
/******************************************************************************
|
||||
* CoRegisterMessageFilter16 [COMPOBJ.27]
|
||||
*/
|
||||
|
@ -1413,7 +1548,6 @@ LPVOID WINAPI CoTaskMemAlloc(
|
|||
|
||||
return IMalloc_Alloc(lpmalloc,size);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoTaskMemFree (OLE32.44)
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
1159
ole/filemoniker.c
1159
ole/filemoniker.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
461
ole/moniker.c
461
ole/moniker.c
|
@ -5,27 +5,468 @@
|
|||
* Copyright 1999 Noomen Hamza
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "winerror.h"
|
||||
#include "wine/obj_moniker.h"
|
||||
#include "debug.h"
|
||||
#include "heap.h"
|
||||
|
||||
#define BLOCK_TAB_SIZE 20 /* represent the first size table and it's increment block size */
|
||||
|
||||
/* define the structure of the running object table elements */
|
||||
typedef struct RunObject{
|
||||
|
||||
IUnknown* pObj; /* points on a running object*/
|
||||
IMoniker* pmkObj; /* points on a moniker who identifies this object */
|
||||
FILETIME lastModifObj;
|
||||
DWORD identRegObj; /* registration key relative to this object */
|
||||
DWORD regTypeObj; /* registration type : strong or weak */
|
||||
}RunObject;
|
||||
|
||||
/* define de RunningObjectTableImpl structure */
|
||||
typedef struct RunningObjectTableImpl{
|
||||
|
||||
ICOM_VTABLE(IRunningObjectTable)* lpvtbl;
|
||||
ULONG ref;
|
||||
|
||||
RunObject* runObjTab; /* pointe to the first object in the table */
|
||||
DWORD runObjTabSize; /* current table size */
|
||||
DWORD runObjTabLastIndx; /* first free index element in the table. */
|
||||
DWORD runObjTabRegister; /* registration key of the next registred object */
|
||||
|
||||
} RunningObjectTableImpl;
|
||||
|
||||
RunningObjectTableImpl* runningObjectTableInstance=0;
|
||||
|
||||
/* IRunningObjectTable prototipe functions : */
|
||||
/* IUnknown functions*/
|
||||
static HRESULT WINAPI RunningObjectTableImpl_QueryInterface(IRunningObjectTable* iface,REFIID riid,void** ppvObject);
|
||||
static ULONG WINAPI RunningObjectTableImpl_AddRef(IRunningObjectTable* iface);
|
||||
static ULONG WINAPI RunningObjectTableImpl_Release(IRunningObjectTable* iface);
|
||||
/* IRunningObjectTable functions */
|
||||
static HRESULT WINAPI RunningObjectTableImpl_Register(IRunningObjectTable* iface, DWORD grfFlags,IUnknown* punkObject,IMoniker* pmkObjectName,DWORD* pdwRegister);
|
||||
static HRESULT WINAPI RunningObjectTableImpl_Revoke(IRunningObjectTable* iface, DWORD dwRegister);
|
||||
static HRESULT WINAPI RunningObjectTableImpl_IsRunning(IRunningObjectTable* iface, IMoniker* pmkObjectName);
|
||||
static HRESULT WINAPI RunningObjectTableImpl_GetObject(IRunningObjectTable* iface, IMoniker* pmkObjectName,IUnknown** ppunkObject);
|
||||
static HRESULT WINAPI RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface, DWORD dwRegister,FILETIME* pfiletime);
|
||||
static HRESULT WINAPI RunningObjectTableImpl_GetTimeOfLastChange(IRunningObjectTable* iface, IMoniker* pmkObjectName,FILETIME* pfiletime);
|
||||
static HRESULT WINAPI RunningObjectTableImpl_EnumRunning(IRunningObjectTable* iface, IEnumMoniker** ppenumMoniker);
|
||||
/* Local functions*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_Initialize();
|
||||
HRESULT WINAPI RunningObjectTableImpl_UnInitialize();
|
||||
HRESULT WINAPI RunningObjectTableImpl_Destroy();
|
||||
HRESULT WINAPI RunningObjectTableImpl_GetObjectIndex(RunningObjectTableImpl* This,DWORD identReg,IMoniker* pmk,DWORD *indx);
|
||||
|
||||
/* Virtual function table for the IRunningObjectTable class. */
|
||||
static ICOM_VTABLE(IRunningObjectTable) VT_RunningObjectTableImpl =
|
||||
{
|
||||
RunningObjectTableImpl_QueryInterface,
|
||||
RunningObjectTableImpl_AddRef,
|
||||
RunningObjectTableImpl_Release,
|
||||
RunningObjectTableImpl_Register,
|
||||
RunningObjectTableImpl_Revoke,
|
||||
RunningObjectTableImpl_IsRunning,
|
||||
RunningObjectTableImpl_GetObject,
|
||||
RunningObjectTableImpl_NoteChangeTime,
|
||||
RunningObjectTableImpl_GetTimeOfLastChange,
|
||||
RunningObjectTableImpl_EnumRunning
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_QueryInterface
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_QueryInterface(IRunningObjectTable* iface,REFIID riid,void** ppvObject)
|
||||
{
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,riid,ppvObject);
|
||||
|
||||
/* validate arguments*/
|
||||
if (This==0)
|
||||
return CO_E_NOTINITIALIZED;
|
||||
|
||||
if (ppvObject==0)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*ppvObject = 0;
|
||||
|
||||
if (IsEqualIID(&IID_IUnknown, riid))
|
||||
*ppvObject = (IRunningObjectTable*)This;
|
||||
else
|
||||
if (IsEqualIID(&IID_IRunningObjectTable, riid))
|
||||
*ppvObject = (IRunningObjectTable*)This;
|
||||
|
||||
if ((*ppvObject)==0)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
RunningObjectTableImpl_AddRef(iface);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_AddRef
|
||||
*/
|
||||
ULONG WINAPI RunningObjectTableImpl_AddRef(IRunningObjectTable* iface)
|
||||
{
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_Initialize
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_Destroy()
|
||||
{
|
||||
TRACE(ole,"()\n");
|
||||
|
||||
if (runningObjectTableInstance==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* free the ROT table memory */
|
||||
HeapFree(GetProcessHeap(),0,runningObjectTableInstance->runObjTab);
|
||||
|
||||
/* free the ROT structure memory */
|
||||
HeapFree(GetProcessHeap(),0,runningObjectTableInstance);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_Release
|
||||
*/
|
||||
ULONG WINAPI RunningObjectTableImpl_Release(IRunningObjectTable* iface)
|
||||
{
|
||||
DWORD i;
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p)\n",This);
|
||||
|
||||
This->ref--;
|
||||
|
||||
/* unitialize ROT structure if there's no more reference to it*/
|
||||
if (This->ref==0){
|
||||
|
||||
/* release all registred objects */
|
||||
for(i=0;i<This->runObjTabLastIndx;i++)
|
||||
{
|
||||
if (( This->runObjTab[i].regTypeObj & ROTFLAGS_REGISTRATIONKEEPSALIVE) != 0)
|
||||
IUnknown_Release(This->runObjTab[i].pObj);
|
||||
|
||||
IMoniker_Release(This->runObjTab[i].pmkObj);
|
||||
}
|
||||
/* RunningObjectTable data structure will be not destroyed here ! the destruction will be done only
|
||||
* when RunningObjectTableImpl_UnInitialize function is called
|
||||
*/
|
||||
|
||||
/* there's no more elements in the table */
|
||||
This->runObjTabRegister=0;
|
||||
This->runObjTabLastIndx=0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return This->ref;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_Initialize
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_Initialize()
|
||||
{
|
||||
TRACE(ole,"()\n");
|
||||
|
||||
/* create the unique instance of the RunningObjectTableImpl structure */
|
||||
runningObjectTableInstance = HeapAlloc(GetProcessHeap(), 0, sizeof(RunningObjectTableImpl));
|
||||
|
||||
if (runningObjectTableInstance == 0)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
/* initialize the virtual table function */
|
||||
runningObjectTableInstance->lpvtbl = &VT_RunningObjectTableImpl;
|
||||
|
||||
/* the initial reference is set to "1" ! because if set to "0" it will be not practis when */
|
||||
/* the ROT refered many times not in the same time (all the objects in the ROT will */
|
||||
/* be removed evry time the ROT is removed ) */
|
||||
runningObjectTableInstance->ref = 1;
|
||||
|
||||
/* allocate space memory for the table witch contains all the running objects */
|
||||
runningObjectTableInstance->runObjTab = HeapAlloc(GetProcessHeap(), 0, sizeof(RunObject[BLOCK_TAB_SIZE]));
|
||||
|
||||
if (runningObjectTableInstance->runObjTab == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
runningObjectTableInstance->runObjTabSize=BLOCK_TAB_SIZE;
|
||||
runningObjectTableInstance->runObjTabRegister=0;
|
||||
runningObjectTableInstance->runObjTabLastIndx=0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_UnInitialize
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_UnInitialize()
|
||||
{
|
||||
TRACE(ole,"()\n");
|
||||
|
||||
if (runningObjectTableInstance==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
RunningObjectTableImpl_Release((IRunningObjectTable*)runningObjectTableInstance);
|
||||
|
||||
RunningObjectTableImpl_Destroy();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_Register
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_Register(IRunningObjectTable* iface,
|
||||
DWORD grfFlags, /* Registration options */
|
||||
IUnknown *punkObject, /* Pointer to the object being registered */
|
||||
IMoniker *pmkObjectName, /* Pointer to the moniker of the object being registered */
|
||||
DWORD *pdwRegister) /* Pointer to the value identifying the registration */
|
||||
{
|
||||
HRESULT res=S_OK;
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%ld,%p,%p,%p)\n",This,grfFlags,punkObject,pmkObjectName,pdwRegister);
|
||||
|
||||
/* there's only tow types of register : strong and or weak registration (only one must be passed on parameter) */
|
||||
if ( ( (grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) || !(grfFlags & ROTFLAGS_ALLOWANYCLIENT)) &&
|
||||
(!(grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) || (grfFlags & ROTFLAGS_ALLOWANYCLIENT)) &&
|
||||
(grfFlags) )
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (punkObject==NULL || pmkObjectName==NULL || pdwRegister==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* verify if the object to be registred was registred befor */
|
||||
if (RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,NULL)==S_OK)
|
||||
res = MK_S_MONIKERALREADYREGISTERED;
|
||||
|
||||
/* put the new registred object in the first free element in the table */
|
||||
This->runObjTab[This->runObjTabLastIndx].pObj = punkObject;
|
||||
This->runObjTab[This->runObjTabLastIndx].pmkObj = pmkObjectName;
|
||||
This->runObjTab[This->runObjTabLastIndx].regTypeObj = grfFlags;
|
||||
This->runObjTab[This->runObjTabLastIndx].identRegObj = This->runObjTabRegister;
|
||||
CoFileTimeNow(&(This->runObjTab[This->runObjTabLastIndx].lastModifObj));
|
||||
|
||||
/* gives a registration identifier to the registred object*/
|
||||
(*pdwRegister)= This->runObjTabRegister;
|
||||
|
||||
if (This->runObjTabRegister == 0xFFFFFFFF){
|
||||
|
||||
FIXME(ole,"runObjTabRegister: %ld is out of data limite \n",This->runObjTabRegister);
|
||||
return E_FAIL;
|
||||
}
|
||||
This->runObjTabRegister++;
|
||||
This->runObjTabLastIndx++;
|
||||
|
||||
if (This->runObjTabLastIndx == This->runObjTabSize){ /* table is full ! so it must be resized */
|
||||
|
||||
This->runObjTabSize+=BLOCK_TAB_SIZE; /* newsize table */
|
||||
This->runObjTab=HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,This->runObjTab,
|
||||
This->runObjTabSize * sizeof(RunObject));
|
||||
if (!This->runObjTab)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
/* add a reference to the object in the strong registration case */
|
||||
if ((grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) !=0 )
|
||||
IUnknown_AddRef(punkObject);
|
||||
|
||||
IMoniker_AddRef(pmkObjectName);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_Revoke
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_Revoke( IRunningObjectTable* iface,
|
||||
DWORD dwRegister) /* Value identifying registration to be revoked*/
|
||||
{
|
||||
|
||||
DWORD index,j;
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%ld)\n",This,dwRegister);
|
||||
|
||||
/* verify if the object to be revoked was registred befor or not */
|
||||
if (RunningObjectTableImpl_GetObjectIndex(This,dwRegister,NULL,&index)==S_FALSE)
|
||||
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* release the object if it was registred with a strong registrantion option */
|
||||
if ((This->runObjTab[index].regTypeObj & ROTFLAGS_REGISTRATIONKEEPSALIVE)!=0)
|
||||
IUnknown_Release(This->runObjTab[index].pObj);
|
||||
|
||||
IMoniker_Release(This->runObjTab[index].pmkObj);
|
||||
|
||||
/* remove the object from the table */
|
||||
for(j=index; j<This->runObjTabLastIndx-1; j++)
|
||||
This->runObjTab[j]= This->runObjTab[j+1];
|
||||
|
||||
This->runObjTabLastIndx--;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_IsRunning
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_IsRunning( IRunningObjectTable* iface,
|
||||
IMoniker *pmkObjectName) /* Pointer to the moniker of the object whose status is desired */
|
||||
{
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",This,pmkObjectName);
|
||||
|
||||
return RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,NULL);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_GetObject
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_GetObject( IRunningObjectTable* iface,
|
||||
IMoniker *pmkObjectName,/* Pointer to the moniker on the object */
|
||||
IUnknown **ppunkObject) /* Address of output variable that receives the IUnknown interface pointer */
|
||||
{
|
||||
DWORD index;
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,pmkObjectName,ppunkObject);
|
||||
|
||||
if (ppunkObject==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*ppunkObject=0;
|
||||
|
||||
/* verify if the object was registred befor or not */
|
||||
if (RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,&index)==S_FALSE)
|
||||
return MK_E_UNAVAILABLE;
|
||||
|
||||
/* add a reference to the object then set output object argument */
|
||||
IUnknown_AddRef(This->runObjTab[index].pObj);
|
||||
*ppunkObject=This->runObjTab[index].pObj;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_NoteChangeTime
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_NoteChangeTime(IRunningObjectTable* iface,
|
||||
DWORD dwRegister, /* Value identifying registration being updated */
|
||||
FILETIME *pfiletime) /* Pointer to structure containing object's last change time */
|
||||
{
|
||||
DWORD index=-1;
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%ld,%p)\n",This,dwRegister,pfiletime);
|
||||
|
||||
/* verify if the object to be changed was registred befor or not */
|
||||
if (RunningObjectTableImpl_GetObjectIndex(This,dwRegister,NULL,&index)==S_FALSE)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* set the new value of the last time change */
|
||||
This->runObjTab[index].lastModifObj= (*pfiletime);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_GetTimeOfLastChange
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_GetTimeOfLastChange(IRunningObjectTable* iface,
|
||||
IMoniker *pmkObjectName, /* Pointer to moniker on the object whose status is desired */
|
||||
FILETIME *pfiletime) /* Pointer to structure that receives object's last change time */
|
||||
{
|
||||
DWORD index=-1;
|
||||
ICOM_THIS(RunningObjectTableImpl,iface);
|
||||
|
||||
TRACE(ole,"(%p,%p,%p)\n",This,pmkObjectName,pfiletime);
|
||||
|
||||
if (pmkObjectName==NULL || pfiletime==NULL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* verify if the object was registred befor or not */
|
||||
if (RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,&index)==S_FALSE)
|
||||
return MK_E_UNAVAILABLE;;
|
||||
|
||||
(*pfiletime)= This->runObjTab[index].lastModifObj;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RunningObjectTable_EnumRunning
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_EnumRunning(IRunningObjectTable* iface,
|
||||
IEnumMoniker **ppenumMoniker) /* Address of output variable that receives the IEnumMoniker interface pointer */
|
||||
{
|
||||
FIXME(ole,"(%p,%p) needs the IEnumMoniker implementation \n",iface,ppenumMoniker);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetObjectIndex
|
||||
*/
|
||||
HRESULT WINAPI RunningObjectTableImpl_GetObjectIndex(RunningObjectTableImpl* This,
|
||||
DWORD identReg,
|
||||
IMoniker* pmk,
|
||||
DWORD *indx)
|
||||
{
|
||||
|
||||
DWORD i;
|
||||
|
||||
TRACE(ole,"(%p,%ld,%p,%p)\n",This,identReg,pmk,indx);
|
||||
|
||||
if (pmk!=NULL)
|
||||
/* search object identified by a moniker*/
|
||||
for(i=0 ; (i < This->runObjTabLastIndx) &&(!IMoniker_IsEqual(This->runObjTab[i].pmkObj,pmk)==S_OK);i++);
|
||||
else
|
||||
/* search object identified by a register identifier*/
|
||||
for(i=0;((i<This->runObjTabLastIndx)&&(This->runObjTab[i].identRegObj!=identReg));i++);
|
||||
|
||||
if (i==This->runObjTabLastIndx) return S_FALSE;
|
||||
|
||||
if (indx != NULL) *indx=i;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetRunningObjectTable16 [OLE2.30]
|
||||
*/
|
||||
HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPVOID *pprot) {
|
||||
HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPVOID *pprot)
|
||||
{
|
||||
FIXME(ole,"(%ld,%p),stub!\n",reserved,pprot);
|
||||
return E_FAIL;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetRunningObjectTable32 (OLE2.73)
|
||||
* GetRunningObjectTable (OLE2.73)
|
||||
*/
|
||||
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPVOID *pprot) {
|
||||
FIXME(ole,"(%ld,%p),stub!\n",reserved,pprot);
|
||||
return E_FAIL;
|
||||
HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPVOID *pprot)
|
||||
{
|
||||
IID riid=IID_IRunningObjectTable;
|
||||
HRESULT res;
|
||||
|
||||
TRACE(ole,"()\n");
|
||||
|
||||
if (reserved!=0)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
if(runningObjectTableInstance==NULL)
|
||||
return CO_E_NOTINITIALIZED;
|
||||
|
||||
res = RunningObjectTableImpl_QueryInterface((IRunningObjectTable*)runningObjectTableInstance,&riid,(void**)pprot);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "windef.h"
|
||||
|
||||
#include "storage32.h"
|
||||
#include "ole2.h"
|
||||
|
||||
#define FILE_BEGIN 0
|
||||
|
||||
|
@ -5159,6 +5160,83 @@ HRESULT WINAPI WriteClassStg(IStorage* pStg, REFCLSID rclsid)
|
|||
return hRes;
|
||||
}
|
||||
|
||||
/*******************************************************************************************
|
||||
* ReadClassStg
|
||||
*
|
||||
* This method reads the CLSID previously written to a storage object with the WriteClassStg.
|
||||
*/
|
||||
HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid){
|
||||
|
||||
STATSTG pstatstg;
|
||||
HRESULT hRes;
|
||||
|
||||
TRACE(ole,"()\n");
|
||||
|
||||
if(pclsid==NULL)
|
||||
return E_POINTER;
|
||||
/*
|
||||
* read a STATSTG structure (contains the clsid) from the storage
|
||||
*/
|
||||
hRes=IStorage_Stat(pstg,&pstatstg,STATFLAG_DEFAULT);
|
||||
|
||||
if(SUCCEEDED(hRes))
|
||||
*pclsid=pstatstg.clsid;
|
||||
|
||||
return hRes;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
* OleLoadFromStream
|
||||
*
|
||||
* This function loads an object from stream
|
||||
*/
|
||||
HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj)
|
||||
{
|
||||
CLSID clsid;
|
||||
HRESULT res;
|
||||
|
||||
FIXME(ole,"(),stub!\n");
|
||||
|
||||
res=ReadClassStm(pStm,&clsid);
|
||||
|
||||
if (SUCCEEDED(res)){
|
||||
|
||||
res=CoCreateInstance(&clsid,NULL,CLSCTX_INPROC_SERVER,iidInterface,ppvObj);
|
||||
|
||||
if (SUCCEEDED(res))
|
||||
|
||||
res=IPersistStream_Load((IPersistStream*)ppvObj,pStm);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
* OleSaveToStream
|
||||
*
|
||||
* This function saves an object with the IPersistStream interface on it to the specified stream
|
||||
*/
|
||||
HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm)
|
||||
{
|
||||
|
||||
CLSID clsid;
|
||||
HRESULT res;
|
||||
|
||||
TRACE(ole,"(%p,%p)\n",pPStm,pStm);
|
||||
|
||||
res=IPersistStream_GetClassID(pPStm,&clsid);
|
||||
|
||||
if (SUCCEEDED(res)){
|
||||
|
||||
res=WriteClassStm(pStm,&clsid);
|
||||
|
||||
if (SUCCEEDED(res))
|
||||
|
||||
res=IPersistStream_Save(pPStm,pStm,FALSE);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* This method validate a STGM parameter that can contain the values below
|
||||
|
@ -5306,7 +5384,7 @@ static DWORD GetShareModeFromSTGM(DWORD stgm)
|
|||
*/
|
||||
static DWORD GetAccessModeFromSTGM(DWORD stgm)
|
||||
{
|
||||
DWORD dwDesiredAccess = 0;
|
||||
DWORD dwDesiredAccess = GENERIC_READ;
|
||||
BOOL bSTGM_WRITE = ((stgm & STGM_WRITE) == STGM_WRITE);
|
||||
BOOL bSTGM_READWRITE = ((stgm & STGM_READWRITE) == STGM_READWRITE);
|
||||
BOOL bSTGM_READ = ! (bSTGM_WRITE || bSTGM_READWRITE);
|
||||
|
|
|
@ -51,12 +51,12 @@ type win32
|
|||
48 stub CoUnloadingWOW
|
||||
49 stub CoUnmarshalHresult # stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
50 stub CoUnmarshalInterface # stdcall (ptr ptr ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
51 stub CreateAntiMoniker # stdcall (ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
51 stdcall CreateAntiMoniker(ptr) CreateAntiMoniker
|
||||
52 stdcall CreateBindCtx(long ptr) CreateBindCtx
|
||||
53 stub CreateDataAdviseHolder # stdcall (ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
54 stub CreateDataCache # stdcall (ptr ptr ptr ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
55 stdcall CreateFileMoniker(wstr ptr) CreateFileMoniker
|
||||
56 stub CreateGenericComposite # stdcall (ptr ptr ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
56 stdcall CreateGenericComposite(ptr ptr ptr) CreateGenericComposite
|
||||
57 stub CreateILockBytesOnHGlobal # stdcall (ptr long ptr) return 0,ERR_NOTIMPLEMENTED
|
||||
58 stdcall CreateItemMoniker(wstr wstr ptr) CreateItemMoniker
|
||||
59 stdcall CreateOleAdviseHolder(ptr) CreateOleAdviseHolder
|
||||
|
@ -67,7 +67,7 @@ type win32
|
|||
64 stub DllGetClassObjectWOW
|
||||
65 stdcall DoDragDrop(ptr ptr long ptr) DoDragDrop
|
||||
66 stub EnableHookObject
|
||||
67 stub GetClassFile
|
||||
67 stdcall GetClassFile(ptr ptr) GetClassFile
|
||||
68 stub GetConvertStg
|
||||
69 stub GetDocumentBitStg
|
||||
70 stub GetHGlobalFromILockBytes
|
||||
|
@ -134,8 +134,8 @@ type win32
|
|||
131 stdcall OleUninitialize() OleUninitialize
|
||||
132 stub OpenOrCreateStream
|
||||
133 stub ProgIDFromCLSID
|
||||
134 stub ReadClassStg
|
||||
135 stub ReadClassStm
|
||||
134 stdcall ReadClassStg(ptr ptr) ReadClassStg
|
||||
135 stdcall ReadClassStm(ptr ptr) ReadClassStm
|
||||
136 stub ReadFmtUserTypeStg
|
||||
137 stub ReadOleStg
|
||||
138 stub ReadStringStream
|
||||
|
@ -159,7 +159,7 @@ type win32
|
|||
156 stub UtGetDvtd16Info
|
||||
157 stub UtGetDvtd32Info
|
||||
158 stdcall WriteClassStg(ptr ptr) WriteClassStg
|
||||
159 stub WriteClassStm
|
||||
159 stdcall WriteClassStm(ptr ptr) WriteClassStm
|
||||
160 stub WriteFmtUserTypeStg
|
||||
161 stub WriteOleStg
|
||||
162 stub WriteStringStream
|
||||
|
|
Loading…
Reference in New Issue