ITracer::GetBits 方法 (wdtf.h)
GetBits 方法将 coclass 的跟踪标志集作为位掩码返回,给定指定的 TTraceLevel 值和 coclass 的 CLSID。
语法
HRESULT GetBits(
[in] CLSID ClassID,
[in] TTraceLevel Level,
[out, retval] DWORD *pBits
);
参数
[in] ClassID
请求跟踪位掩码的对象共同类的 CLSID。 此参数导致接口的 TraceLevel 路径 定义为 HKCR\CLSID<ClassID>。
[in] Level
请求的跟踪级别。 Trace_Default 值指示 GetBits 将搜索接口的 TraceLevel Path 作为默认级别。 使用 ClassID 或 pszTraceLevelPath指定 TraceLevel 路径。 .
[out, retval] pBits
返回的标志集作为位掩码。
返回值
GetBits 返回标准 HRESULT 值。
言论
GetBits 方法适用于低级别 WDTF 用法。 如果要在运行时更改对象的跟踪级别,请参阅 ITracing。
如果不存在默认跟踪级别,此方法将失败。
如果出于任何原因 GetBits 失败,则调用方应以无提示方式继续使用其创建者的跟踪位掩码。
要求
要求 | 价值 |
---|---|
目标平台 | 桌面 |
标头 | wdtf.h |