COM是个大垃圾!!

RickeyLv 2001-04-06 11:42:00
书上(MS press Distributed Application for Microsoft Visual Basic 6.0 MSCD Training Kit for Exam 70-175)说”the context is not available in the Initialize and Terminate events. 。。。To utilize the context object during initialization or shutdown,implement the ObjectControl interface in your class“但实际上我在Class_Initialize中写下如下代码后,调用该对象时得到的是” Context Object is not available in Class_Initialize”???
Private Sub Class_Initialize()
Dim oc As ObjectContext
Set oc = GetObjectContext()
If oc Is Nothing Then
MsgBox "Context Object is not available in Class_Initialize"
Else
MsgBox "Context Object is available in Class_Initialize"
End If
End Sub
该类并没有实现ObjectControl接口.
我的测试环境是:windows 2000 advance server(ver 2195,sp1)+vb6中文企业版(sp4)
...全文
147 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
「已注销」 2001-04-15
  • 打赏
  • 举报
回复
垃圾垃圾垃圾

我讨厌垃圾

终于有不用COM的理由了
hy193 2001-04-10
  • 打赏
  • 举报
回复
老兄,“implement the ObjectControl interface in your class”,这句话的意思你搞清楚了吗?
你的代码中并没有implement,呵呵。
xcex 2001-04-09
  • 打赏
  • 举报
回复
我连垃圾都不懂......
veinstone 2001-04-09
  • 打赏
  • 举报
回复
我是超级拾荒者。
bucher 2001-04-08
  • 打赏
  • 举报
回复
不是说了“the context is not available in the Initialize and Terminate events. 。。。implement the ObjectControl interface in your class!!!!!
"
你用了implement了吗?!
老兄,先学好VB再说
我在上海 bucher@citiz.net
luxyi 2001-04-07
  • 打赏
  • 举报
回复
luxyi@sina.com,我们不在一个城市,电话就免了。我对COM+不是很熟,不知道你的问题我能不能回答。
RickeyLv 2001-04-07
  • 打赏
  • 举报
回复
我写错了,最后得到的结果是:"Context Object is available in Class_Initialize"
vcmfc 2001-04-07
  • 打赏
  • 举报
回复
我也是拣垃圾的人....
luxyi 2001-04-06
  • 打赏
  • 举报
回复
VB我不熟,但我能肯定你给的信息太少了,很难从你的叙述中准确判断原因,使用COM+除了编码,还有配置的步骤。
RickeyLv 2001-04-06
  • 打赏
  • 举报
回复
to:luxyi
请问你的e-mail或电话,我的是:rickeylv@263.net,tel:020-86838369-2008

我们可以详细探讨一下
liu_feng_fly 2001-04-06
  • 打赏
  • 举报
回复
不会吧,学不懂就~~~~~~~??????
musicdancer 2001-04-06
  • 打赏
  • 举报
回复
我们都是拣垃圾的人....

3,245

社区成员

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

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