IPersistStreamInitImpl 类

此类实现 IUnknown 并提供 IPersistStreamInit 接口的默认实现。

重要

无法在 Windows 运行时中执行的应用程序中使用此类及其成员。

语法

template<class T>
class ATL_NO_VTABLE IPersistStreamInitImpl
   : public IPersistStreamInit

参数

T
你的类,派生自 IPersistStreamInitImpl

成员

公共方法

名称 描述
IPersistStreamInitImpl::GetClassID 检索对象的 CLSID。
IPersistStreamInitImpl::GetSizeMax 检索保存该对象数据所需的流的大小。 ATL 实现返回 E_NOTIMPL。
IPersistStreamInitImpl::InitNew 初始化新建的 对象。
IPersistStreamInitImpl::IsDirty 检查对象数据自上次保存以来是否已更改。
IPersistStreamInitImpl::Load 从指定的流加载对象属性。
IPersistStreamInitImpl::Save 将对象属性保存到指定的流。

备注

IPersistStreamInit 接口允许客户端请求对象将其持久数据加载并保存到单个流。 类 IPersistStreamInitImpl 提供此接口的默认实现,并通过在调试版本中将信息发送到转储设备来实现 IUnknown

相关文章ATL 教程创建 ATL 项目

继承层次结构

IPersistStreamInit

IPersistStreamInitImpl

要求

标头:atlcom.h

IPersistStreamInitImpl::GetClassID

检索对象的 CLSID。

STDMETHOD(GetClassID)(CLSID* pClassID);

注解

请参阅 Windows SDK 中的 IPersist::GetClassID

IPersistStreamInitImpl::GetSizeMax

检索保存该对象数据所需的流的大小。

STDMETHOD(GetSizeMax)(ULARGE_INTEGER FAR* pcbSize);

返回值

返回 E_NOTIMPL。

注解

请参阅 Windows SDK 中的 IPersistStreamInit::GetSizeMax

IPersistStreamInitImpl::InitNew

初始化新建的 对象。

STDMETHOD(InitNew)();

注解

请参阅 Windows SDK 中的 IPersistStreamInit::InitNew

IPersistStreamInitImpl::IsDirty

检查对象数据自上次保存以来是否已更改。

STDMETHOD(IsDirty)();

备注

请参阅 Windows SDK 中的 IPersistStreamInit::IsDirty

IPersistStreamInitImpl::Load

从指定的流加载对象属性。

STDMETHOD(Load)(LPSTREAM pStm);

备注

ATL 使用对象的属性映射来检索此信息。

请参阅 Windows SDK 中的 IPersistStreamInit::Load

IPersistStreamInitImpl::Save

将对象属性保存到指定的流。

STDMETHOD(Save)(LPSTREAM pStm, BOOL fClearDirty);

备注

ATL 使用对象的属性映射来存储此信息。

请参阅 Windows SDK 中的 IPersistStreamInit::Save

另请参阅

存储和流
类概述