十万火急!!!高手救我!

Desertfish2 2003-08-22 02:58:39
在开发ATL控件的时候选择了“支持MFC”选项之后,

在VB,VF等开发环境里面不能使用ATL控件,VB提示

“System Error &H80004005(-2147467259),不支持此接口”

VFP提示“OLE error code 0x80004005: Unspecified error”

但是另一个早期版本没有加入MFC支持的情况下,可以被VB,VF调用

没有任何问题,只是现在这个版本完成了绝大部分的饼图、折线图、柱图、条形图的

功能,而早期的那个非MFC版本功能太少,请高手解答!救命!!!
...全文
45 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Desertfish2 2003-08-25
  • 打赏
  • 举报
回复
都是贪图MFC的好处,让我在写ATL控件的时候,加入了MFC的支持,

现在可好,客户端都不理会我的控件,真是要命。
Desertfish2 2003-08-25
  • 打赏
  • 举报
回复
啊,有没有高手回答我的问题呀,谢谢了。^_^
Desertfish2 2003-08-22
  • 打赏
  • 举报
回复
yuexiang 大哥,已经发到您的邮箱里面去了,请查收,一定要帮我呀!!
yxmaomao88 2003-08-22
  • 打赏
  • 举报
回复
把你的代码发过了,我看看(yuex@necas.nec.com.cn)
Desertfish2 2003-08-22
  • 打赏
  • 举报
回复
有没有人help一下我呀??
Desertfish2 2003-08-22
  • 打赏
  • 举报
回复
kingzai大哥:

我在ATL向导里面没有添加“HWND"属性,因此编译器也没有为我的程序添加

诸如: PROP_ENTRY("HWND", DISPID_HWND, CLSID_NULL) 的宏,而且我刚才也

将ATL目录下的那个Control.h文件的那一句可能添加这个属性的代码注释掉了,

但是在VB里面依然有错误,涛声依旧!

:“System Error &H80004005(-2147467259),不支持此接口”

我的天了,这可如何是好呀!

hydcumt 2003-08-22
  • 打赏
  • 举报
回复
COM的接口都是通过IDL写的,这样才能跨语言使用,你选择了MFC,那只能在VC上使用这个COM
kingzai 2003-08-22
  • 打赏
  • 举报
回复
BUG: "Unspecified error" When Running VB Program That Hosts an ATL
Control

----------------------------------------------------------------------------
----

The information in this article applies to:

a.. The Microsoft Active Template Library (ATL) 3.0, included with:
a.. Microsoft Visual C++, 32-bit Editions, version 6.0
b.. Microsoft Visual Basic Professional and Enterprise Editions for
Windows, version 6.0

----------------------------------------------------------------------------
----



SYMPTOMS
When you run a Visual Basic program that contains an ATL ActiveX control,
you may get the following error message:


System Error &H80004005 (-2147467259). Unspecified error.



CAUSE
If you created the control using the ATL Object Wizard and added the "HWND"
option in the Stock Properties tab, you will get an entry in the .IDL for a
[propget] function for the "Window" stock property.

In addition, the property map will contain a PROP_ENTRY(HWND...) macro. When
the control is first initialized, the persistence code will go through the
property map and call the [propput] functions for each entry via
ITypeInfo::Invoke(). Because there is no [propput] function in the .IDL for
the Window property, the type library won't have this function, and
ITypeInfo::Invoke() will fail.



RESOLUTION
Persisting an HWND doesn't make sense; just comment out the
PROP_ENTRY(HWND...) macro in the property map. To prevent this line from
being added in the future, remove the following line from Control.h in
\Program Files\Microsoft Visual Studio\Common\MSDev98\Template\ATL:



[!if=(SP_HWND, "TRUE")] PROP_ENTRY("HWND", DISPID_HWND, CLSID_NULL)[!endif]



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at
the beginning of this article.

Additional query words:

Keywords : kbActiveX kbCOMt kbContainer kbCtrl kbCtrlCreate kbPersistSt
kbVBp600 kbATL300bug kbGrpMFCATL
Version : WINDOWS:3.0,6.0
Platform : WINDOWS
Issue type : kbbug
Technology : kbvc

3,245

社区成员

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

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