调试器可扩展性 [英] Debugger Extensibility

查看:102
本文介绍了调试器可扩展性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,
我在PublishProgramNode和 IDebugProgramEngines2的实现实现

- 未实现,则PublishProgramNode返回S_OK.
-当 实现了IDebugProgramEngines2,然后我接到了电话 IDebugProgramEngines2 :: EnumPossibleEngines.

但是如果我设置* pceltEngines = 1如果我设置* pceltEngines = 2,则PublishProgramNode返回E_FAIL
PusblishProgramNode正常工作并返回S_OK.

这是一个错误吗?
Hello,
I have a problem with PublishProgramNode and implementation of IDebugProgramEngines2

- when IDebugProgramEngines2 isn't implemented, the PublishProgramNode returns S_OK.
- when IDebugProgramEngines2 is implemented, then I get a call IDebugProgramEngines2::EnumPossibleEngines.

but if I set *pceltEngines = 1 the PublishProgramNode returns E_FAIL
if I set *pceltEngines = 2 the PusblishProgramNode works good and returns S_OK.

Is it a bug?

推荐答案

R_I_M

EnumPossibleEngines将被调用两次.一次返回引擎数量(将celtBuffer设置为0),然后再次接收实际的guid数组(将celtBuffer设置为第一次调用返回的数量).文档:

为了确定有多少个引擎,请将 celtBuffer 参数设置为0并将 rgguidEngines 参数设置为空值.这将返回 HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)(对于C#为0x8007007A),并且 pceltEngines 参数返回缓冲区的必要大小.

您实现了它来支持这种行为吗?

Jackson Davis
VS Debugger

R_I_M

EnumPossibleEngines will get called twice. Once to return the number of engines (with celtBuffer set to 0) and then another time to receive the actual guid array (wich celtBuffer set to the number returned from the first call. 

This is (poorly) described in the documentation:

In order to determine how many engines there are, call this method once with the celtBuffer parameter set to 0 and the rgguidEngines parameter set to a null value. This returns HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) (0x8007007A for C#), and the pceltEngines parameter returns the necessary size of the buffer.

Did you implement it to support this behavior?

Jackson Davis
VS Debugger


这篇关于调试器可扩展性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆