ATL 做的 COM 控件 产生 &H80004005(-2147467259).未指定的错误???

wilddragon 2001-08-13 09:43:27
我用VC ATL做了一个控件,里面用到了TCP/IP函数族,包括使用了WSASelect作为窗口事件触发器。
出现了下列问题,还望高手指点
1.我的控件在Active Test Container里面测试完全正确。
2.在VB里面报如下错误:系统错误&H80004005(-2147467259).未指定的错误。
请看MSDN里面的解释,跟没说一样,呵呵,微软好像经常干这种事情:
Standard COM Errors
The following table shows the most common standard COM errors returned by the properties and methods of the BizTalk Server objects.

Constant Value (32-bit) Description
S_OK 00000000 The standard return value used to communicate successful completion.
S_FALSE 00000001 An alternate success value, typically used to communicate successful, but non-standard completion. The precise meaning depends on the method or property in question.
E_UNEXPECTED 8000FFFF Catastrophic failure error.
E_NOTIMPL 80004001 Not implemented error.
E_OUTOFMEMORY 8007000E Out of memory error.
E_INVALIDARG 80070057 One or more arguments are not valid error.
E_NOINTERFACE 80004002 Interface not supported error.
E_POINTER 80004003 Pointer not valid error.
E_HANDLE 80070006 Handle not valid error.
E_ABORT 80004004 Operation aborted error.
E_FAIL 80004005 Unspecified error.
E_ACCESSDENIED 80070005 General access denied error.
MK_E_NOOBJECT 800401E5 The object identified by this moniker could not be found.

Additional information may be available using the global Err object. In Visual Basic, the Description property of the Err object may contain a text description of the error.

In C++, call the OLE DB method GetErrorInfo on the IErrorRecords interface to retrieve the most recently set IErrorInfo pointer in the current logical thread. The GetDescription method of the IErrorInfo interface may return a text description of the error. For more information about the GetErrorInfo method, go to the MSDN Online Library Web site (msdn.microsoft.com/library/default.asp) and browse to OLE DB Interfaces in the Platform SDK.
3.在Delphi中,设计状态时控件的m_hWnd属性为0,也就是说我不能在设计状态把WSASelect激活,当然了也没有必要。在运行态时和VB的错误类似。
还请高手指点迷津
...全文
188 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wilddragon 2001-08-16
  • 打赏
  • 举报
回复
这个错误是由于控件属性初始化失败造成的.大家以后一定的注意呀

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧