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的错误类似。
还请高手指点迷津
...全文
287 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wilddragon 2001-08-16
  • 打赏
  • 举报
回复
这个错误是由于控件属性初始化失败造成的.大家以后一定的注意呀
内容概要:本文档是一份关于开发经典小游戏“贪吃蛇”的保姆级毕业设计指导文档,涵盖从游戏规则、功能设计、技术选型到核心代码实现的完整流程。文档以Python + Pygame为技术栈,详细讲解了游戏初始化、蛇的移动逻辑、食物生成、碰撞检测、计分与等级系统、键盘控制及主循环渲染等核心模块,并提供了完整的项目结构和源码示例。采用状态机管理游戏状态,使用列表模拟链表结构存储蛇身,结合方向缓冲机制优化操作体验,同时引入难度递增机制提升可玩性。文末还列举了飞机大战、扫雷、五子棋等同类课题作为拓展参考。; 适合人群:具备一定编程基础、正在进行毕业设计或课程设计的学生,尤其是对游戏开发感兴趣的初级开发者。; 使用场景及目标:①帮助学生独立完成一个功能完整、结构清晰的小游戏项目,用于毕业答辩或课程展示;②深入理解事件驱动编程、状态管理、碰撞检测、定时刷新等基础编程概念;③掌握Python + Pygame开发2D小游戏的核心技能,并具备二次开发与功能拓展能力。; 阅读建议:建议读者按照“规则→设计→代码→运行”的顺序逐步学习,动手实践每个模块并调试代码,重点关注方向缓冲、状态机、食物生成算法等设计细节,同时可尝试实现文末提出的拓展功能以增强项目亮点。

3,248

社区成员

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

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