代码改变世界

What's wrong with this code

2006-05-01 23:19  atempcode  阅读(330)  评论(0编辑  收藏  举报
 1 [
 2     object,
 3     uuid(8BE3DB1A-1DB0-4529-B295-31EED6E3ABD9),
 4     dual,
 5     nonextensible,
 6     helpstring("IIPCService Interface"),
 7     pointer_default(unique)
 8 ]
 9 interface IIPCService : IDispatch{
10 
11     [id(0), helpstring("method SetServiceVerb")] 
12     HRESULT SetServiceVerb([in] DWORD dwServiceHandle , [in] BSTR bstrVerbName, [in] BYTE* pVerbValue, 
13         [in] DWORD dwVerbSize);
14 };
15 

这是一个IDL文件的一部分。在具体实现中,用时调用SetServiceVerb会导致非预期结果。这个bug就在这个IDL文件中。
明天公布答案。