IMoniker 接口

定义

提供 IMoniker 接口的托管定义,具有 IPersistIPersistStream 中的 COM 功能。

public interface class IMoniker
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IMoniker
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
[System.Runtime.InteropServices.Guid("0000000f-0000-0000-C000-000000000046")]
public interface IMoniker
public interface IMoniker
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IMoniker = interface
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
[<System.Runtime.InteropServices.Guid("0000000f-0000-0000-C000-000000000046")>]
type IMoniker = interface
type IMoniker = interface
Public Interface IMoniker
属性

注解

有关 、IPersist接口和IPersistStream接口的详细信息IMoniker,请参阅 MSDN 库。

当本机代码中的 COM 方法返回 HRESULT 时,公共语言运行时将引发异常。 有关更多信息,请参见 How to: Map HRESULTs and Exceptions

方法

BindToObject(IBindCtx, IMoniker, Guid, Object)

使用名字对象绑定到它所标识的对象。

BindToStorage(IBindCtx, IMoniker, Guid, Object)

检索指向存储(该存储包含名字对象所标识的对象)的接口指针。

CommonPrefixWith(IMoniker, IMoniker)

基于此名字对象与另一名字对象共有的公共前缀创建新的名字对象。

ComposeWith(IMoniker, Boolean, IMoniker)

将当前名字对象与另一名字对象组合,创建一个新的复合名字对象。

Enum(Boolean, IEnumMoniker)

提供一个指向枚举器(该枚举器可枚举复合名字对象的组件)的指针。

GetClassID(Guid)

检索对象的类标识符 (CLSID)。

GetDisplayName(IBindCtx, IMoniker, String)

获取显示名称,该名称是当前名字对象的用户可读表示形式。

GetSizeMax(Int64)

返回保存该对象所需的流的大小(以字节为单位)。

GetTimeOfLastChange(IBindCtx, IMoniker, FILETIME)

提供一个数字,该数字表示当前名字对象所标识的对象的上次更改时间。

Hash(Int32)

使用该名字对象的内部状态计算 32 位整数。

Inverse(IMoniker)

提供一个名字对象,该名字对象在被复合到当前名字对象或一个结构相似的名字对象的右边时,将不复合到任何对象。

IsDirty()

检查该对象自上次保存以来所发生的更改。

IsEqual(IMoniker)

将当前名字对象与指定的名字对象进行比较,并指示它们是否相同。

IsRunning(IBindCtx, IMoniker, IMoniker)

确定由当前名字对象标识的对象当前是否已加载并正在运行。

IsSystemMoniker(Int32)

指示此名字对象是否属于系统提供的名字对象类之一。

Load(IStream)

从以前保存对象的流中初始化对象。

ParseDisplayName(IBindCtx, IMoniker, String, Int32, IMoniker)

读取指定的显示名称中 ParseDisplayName(IBindCtx, IMoniker, String, Int32, IMoniker) 能够理解的全部字符并生成一个与读取的部分相对应的名字对象。

Reduce(IBindCtx, Int32, IMoniker, IMoniker)

返回简化的名字对象,它是与当前名字对象引用同一对象但能够用相等或更高的效率绑定的另一个名字对象。

RelativePathTo(IMoniker, IMoniker)

提供一个名字对象,该名字对象在被追加到当前名字对象(或一个有相似结构的名字对象)时生成指定名字对象。

Save(IStream, Boolean)

将对象保存到指定流。

适用于