ISnapshotManager3

表示客户端控制的快照对象。 接口提供了启用、禁用和拍摄快照的函数。

语法

[id(1), helpstring("EnablePeriodicSnapshot")] HRESULT EnablePeriodicSnapshot([in] SnapshotType snapshotType, [in] ULONG interval, [in] ULONG* pids, [in] ULONG cPids);
[id(2), helpstring("DisablePeriodicSnapshot")] HRESULT DisablePeriodicSnapshot([in] SnapshotType snapshotType);
[id(3), helpstring("SnapshotOnDemand")] HRESULT SnapshotOnDemand([in] SnapshotType snapshotType, [in] ULONG* pids, [in] ULONG cPids);
[id(4), helpstring("VerifySnapshotSupported")] HRESULT VerifySnapshotSupported([in] TRACEHANDLE traceHandle, [in, out] ULONG* frequencyInSeconds, [in, out] ULONG* cProviders);
[id(5), helpstring("ConfigSnapshotByPID")] HRESULT ConfigSnapshotByPID([in] ULONG* pids, [in] ULONG cPids, [in] VARIANT_BOOL fEnable);
[id(6), helpstring("ConfigSnapshotByProcess")] HRESULT ConfigSnapshotByProcess([in] BSTR bstrProcName, [in] VARIANT_BOOL fEnable);
[id(7), helpstring("ConfigSnapshotByPIDEx")] HRESULT ConfigSnapshotByPIDEx([in] SnapshotType snapshotType, [in] ULONG* pids, [in, out] HRESULT* pResults, [in] ULONG cPids, [in] VARIANT_BOOL fEnable);
[id(8), helpstring("ConfigSnapshotByProcessEx")] HRESULT ConfigSnapshotByProcessEx([in] SnapshotType snapshotType, [in] BSTR bstrProcName, [in] VARIANT_BOOL fEnable);

函数

下表描述了该接口提供的功能。

函数 说明
ConfigSnapshotByPID 使用提供的进程 ID 配置快照。
ConfigSnapshotByPIDEx 使用提供的进程 ID 配置快照。
ConfigSnapshotByProcess 使用提供的进程名称配置快照。
ConfigSnapshotByProcessEx 使用提供的进程名称配置快照。
DisablePeriodicSnapshot 禁用定期快照。
EnablePeriodicSnapshot 启用具有给定间隔的定期快照。
SnapshotOnDemand 拍摄 Snapshot 类型的快照,并导出到跟踪缓冲区。
VerifySnapshotSupported 查询定期捕获状态限制。

注解

大部分函数需要管理员权限。