📄 objidl.idl
字号:
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: objidl.idl
//
//--------------------------------------------------------------------------
cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("// Microsoft Windows")
cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")
#if (__midl >= 501)
midl_pragma warning( disable: 2007 ) // file already imported
midl_pragma warning( disable: 2209 ) // ignored redundantly specified attributes
midl_pragma warning( disable: 2298 ) // version ignored for object interfaces
#endif
cpp_quote("#if ( _MSC_VER >= 800 )")
cpp_quote("#if _MSC_VER >= 1200")
cpp_quote("#pragma warning(push)")
cpp_quote("#endif")
cpp_quote("#pragma warning(disable:4201)")
cpp_quote("#endif")
cpp_quote("#if ( _MSC_VER >= 1020 )")
cpp_quote("#pragma once")
cpp_quote("#endif")
#ifndef DO_NO_IMPORTS
import "unknwn.idl";
import "wtypes.idl";
#endif
interface IStream;
interface IMoniker;
interface IEnumMoniker;
interface IEnumString;
interface IRunningObjectTable;
interface IStorage;
interface IEnumSTATSTG;
interface IAdviseSink;
interface IBindCtx;
interface IEnumMoniker;
interface IAsyncManager;
interface ICallFactory;
interface ISynchronize;
typedef struct _COSERVERINFO
{
DWORD dwReserved1;
LPWSTR pwszName;
COAUTHINFO * pAuthInfo;
DWORD dwReserved2;
} COSERVERINFO;
/****************************************************************************
* Component Object Interfaces
****************************************************************************/
[
local,
object,
uuid(00000003-0000-0000-C000-000000000046)
]
interface IMarshal : IUnknown
{
typedef [unique] IMarshal *LPMARSHAL;
HRESULT GetUnmarshalClass
(
[in] REFIID riid,
[in, unique] void *pv,
[in] DWORD dwDestContext,
[in, unique] void *pvDestContext,
[in] DWORD mshlflags,
[out] CLSID *pCid
);
HRESULT GetMarshalSizeMax
(
[in] REFIID riid,
[in, unique] void *pv,
[in] DWORD dwDestContext,
[in, unique] void *pvDestContext,
[in] DWORD mshlflags,
[out] DWORD *pSize
);
HRESULT MarshalInterface
(
[in, unique] IStream *pStm,
[in] REFIID riid,
[in, unique] void *pv,
[in] DWORD dwDestContext,
[in, unique] void *pvDestContext,
[in] DWORD mshlflags
);
HRESULT UnmarshalInterface
(
[in, unique] IStream *pStm,
[in] REFIID riid,
[out] void **ppv
);
HRESULT ReleaseMarshalData
(
[in, unique] IStream *pStm
);
HRESULT DisconnectObject
(
[in] DWORD dwReserved
);
}
[
local,
object,
uuid(000001cf-0000-0000-C000-000000000046)
]
interface IMarshal2 : IMarshal
{
typedef [unique] IMarshal2 *LPMARSHAL2;
}
[
local,
object,
uuid(00000002-0000-0000-C000-000000000046)
]
interface IMalloc : IUnknown
{
typedef [unique] IMalloc *LPMALLOC;
void *Alloc([in] SIZE_T cb);
void *Realloc ([in] void *pv,
[in] SIZE_T cb);
void Free([in] void *pv);
SIZE_T GetSize([in] void *pv);
int DidAlloc(void *pv);
void HeapMinimize(void);
}
[
local,
object,
uuid(0000001d-0000-0000-C000-000000000046)
]
interface IMallocSpy : IUnknown
{
typedef [unique] IMallocSpy *LPMALLOCSPY;
SIZE_T PreAlloc
(
[in] SIZE_T cbRequest
);
void *PostAlloc
(
[in] void *pActual
);
void *PreFree
(
[in] void *pRequest,
[in] BOOL fSpyed
);
void PostFree
(
[in] BOOL fSpyed
);
SIZE_T PreRealloc
(
[in] void *pRequest,
[in] SIZE_T cbRequest,
[out] void **ppNewRequest,
[in] BOOL fSpyed
);
void *PostRealloc
(
[in] void *pActual,
[in] BOOL fSpyed
);
void *PreGetSize
(
[in] void *pRequest,
[in] BOOL fSpyed
);
SIZE_T PostGetSize
(
[in] SIZE_T cbActual,
[in] BOOL fSpyed
);
void *PreDidAlloc
(
[in] void *pRequest,
[in] BOOL fSpyed
);
int PostDidAlloc
(
[in] void *pRequest,
[in] BOOL fSpyed,
[in] int fActual
);
void PreHeapMinimize(void);
void PostHeapMinimize(void);
}
[
local,
object,
uuid(00000018-0000-0000-C000-000000000046)
]
interface IStdMarshalInfo : IUnknown
{
typedef [unique] IStdMarshalInfo * LPSTDMARSHALINFO;
HRESULT GetClassForHandler
(
[in] DWORD dwDestContext,
[in, unique] void *pvDestContext,
[out] CLSID *pClsid
);
}
[
object,
local,
uuid(00000019-0000-0000-C000-000000000046)
]
interface IExternalConnection : IUnknown
{
typedef [unique] IExternalConnection* LPEXTERNALCONNECTION;
// bit flags for IExternalConnection
typedef enum tagEXTCONN
{
EXTCONN_STRONG = 0x0001, // strong connection
EXTCONN_WEAK = 0x0002, // weak connection (table, container)
EXTCONN_CALLABLE = 0x0004, // table .vs. callable
} EXTCONN;
// *** IExternalConnection methods ***
DWORD AddConnection
(
[in] DWORD extconn,
[in] DWORD reserved
);
DWORD ReleaseConnection
(
[in] DWORD extconn,
[in] DWORD reserved,
[in] BOOL fLastReleaseCloses
);
}
typedef [unique] IMultiQI* LPMULTIQI;
typedef struct tagMULTI_QI
{
const IID *pIID; // pass this one in
IUnknown *pItf; // get these out (you must set to NULL before calling)
HRESULT hr;
} MULTI_QI;
[
object,
local,
uuid(00000020-0000-0000-C000-000000000046),
#if (__midl >= 500)
async_uuid(000e0020-0000-0000-C000-000000000046)
#endif
]
interface IMultiQI : IUnknown
{
HRESULT QueryMultipleInterfaces
(
[in] ULONG cMQIs,
[in,out] MULTI_QI *pMQIs
);
}
[
object,
local,
uuid(00000021-0000-0000-C000-000000000046)
]
interface IInternalUnknown : IUnknown
{
HRESULT QueryInternalInterface(
[in] REFIID riid,
[out] void **ppv);
}
[
object,
uuid(00000100-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface IEnumUnknown : IUnknown
{
typedef [unique] IEnumUnknown *LPENUMUNKNOWN;
[local]
HRESULT Next(
[in] ULONG celt,
[out] IUnknown **rgelt,
[out] ULONG *pceltFetched);
[call_as(Next)]
HRESULT RemoteNext(
[in] ULONG celt,
[out, size_is(celt), length_is(*pceltFetched)]
IUnknown **rgelt,
[out] ULONG *pceltFetched);
HRESULT Skip(
[in] ULONG celt);
HRESULT Reset();
HRESULT Clone(
[out] IEnumUnknown **ppenum);
}
/****************************************************************************
* Binding Interfaces
****************************************************************************/
[
object,
uuid(0000000e-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface IBindCtx : IUnknown
{
typedef [unique] IBindCtx *LPBC;
typedef [unique] IBindCtx *LPBINDCTX;
typedef struct tagBIND_OPTS {
DWORD cbStruct; // sizeof(BIND_OPTS)
DWORD grfFlags;
DWORD grfMode;
DWORD dwTickCountDeadline;
} BIND_OPTS, * LPBIND_OPTS;
cpp_quote("#if defined(__cplusplus)")
cpp_quote(" typedef struct tagBIND_OPTS2 : tagBIND_OPTS{")
cpp_quote(" DWORD dwTrackFlags;")
cpp_quote(" DWORD dwClassContext;")
cpp_quote(" LCID locale;")
cpp_quote(" COSERVERINFO * pServerInfo;")
cpp_quote(" } BIND_OPTS2, * LPBIND_OPTS2;")
cpp_quote("#else")
typedef struct tagBIND_OPTS2 {
DWORD cbStruct; // sizeof(BIND_OPTS2)
DWORD grfFlags;
DWORD grfMode;
DWORD dwTickCountDeadline;
DWORD dwTrackFlags;
DWORD dwClassContext;
LCID locale;
COSERVERINFO * pServerInfo;
} BIND_OPTS2, * LPBIND_OPTS2;
cpp_quote("#endif")
typedef enum tagBIND_FLAGS
{
BIND_MAYBOTHERUSER = 1,
BIND_JUSTTESTEXISTENCE = 2
} BIND_FLAGS;
HRESULT RegisterObjectBound
(
[in, unique] IUnknown *punk
);
HRESULT RevokeObjectBound
(
[in, unique] IUnknown *punk
);
HRESULT ReleaseBoundObjects
(
void
);
[local]
HRESULT SetBindOptions
(
[in] BIND_OPTS *pbindopts
);
[call_as(SetBindOptions)]
HRESULT RemoteSetBindOptions
(
[in] BIND_OPTS2 *pbindopts
);
[local]
HRESULT GetBindOptions
(
[in, out] BIND_OPTS *pbindopts
);
[call_as(GetBindOptions)]
HRESULT RemoteGetBindOptions
(
[in, out] BIND_OPTS2 *pbindopts
);
HRESULT GetRunningObjectTable
(
[out] IRunningObjectTable **pprot
);
HRESULT RegisterObjectParam(
[in] LPOLESTR pszKey,
[in, unique] IUnknown *punk
);
HRESULT GetObjectParam(
[in] LPOLESTR pszKey,
[out] IUnknown **ppunk
);
HRESULT EnumObjectParam
(
[out] IEnumString **ppenum
);
HRESULT RevokeObjectParam
(
[in] LPOLESTR pszKey
);
}
[
object,
uuid(00000102-0000-0000-C000-000000000046),
pointer_default(unique)
]
interface IEnumMoniker : IUnknown
{
typedef [unique] IEnumMoniker *LPENUMMONIKER;
[local]
HRESULT Next(
[in] ULONG celt,
[out, size_is(celt), length_is(*pceltFetched)]
IMoniker **rgelt,
[out] ULONG *pceltFetched);
[call_as(Next)]
HRESULT RemoteNext(
[in] ULONG celt,
[out, size_is(celt), length_is(*pceltFetched)]
IMoniker **rgelt,
[out] ULONG *pceltFetched);
HRESULT Skip(
[in] ULONG celt);
HRESULT Reset();
HRESULT Clone(
[out] IEnumMoniker **ppenum);
}
[
object,
uuid(00000126-0000-0000-C000-000000000046)
]
interface IRunnableObject : IUnknown
{
typedef [unique] IRunnableObject *LPRUNNABLEOBJECT;
HRESULT GetRunningClass(
[out] LPCLSID lpClsid);
HRESULT Run(
[in] LPBINDCTX pbc);
[local]
BOOL IsRunning();
[call_as(IsRunning)]
HRESULT RemoteIsRunning();
HRESULT LockRunning(
[in] BOOL fLock,
[in] BOOL fLastUnlockCloses);
HRESULT SetContainedObject(
[in] BOOL fContained);
}
[
object,
uuid(00000010-0000-0000-C000-000000000046)
]
interface IRunningObjectTable : IUnknown
{
typedef [unique] IRunningObjectTable *LPRUNNINGOBJECTTABLE;
HRESULT Register
(
[in] DWORD grfFlags,
[in, unique] IUnknown *punkObject,
[in, unique] IMoniker *pmkObjectName,
[out] DWORD *pdwRegister
);
HRESULT Revoke
(
[in] DWORD dwRegister
);
HRESULT IsRunning
(
[in, unique] IMoniker *pmkObjectName
);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -