Cannot use DCOM Event in Windows 98? Help!

Posted on 2001-06-07
Last Modified: 2010-05-02
I have a problem in using DCOM Event as following:

Server: Windows 2000 Server + SP1
Client: Windows 98/Windows 2000 Professional
DevTool: Visual Basic 6.0 + SP5
Other: DCOM98 V1.3 has been installed in Windows 98 and I
login to Domain as Administrator.

1. I Create an ActiveX DLL Project, add Class1, define event named MyEvent:


Public Event MyEvent ...

Public Sub CallMyEvent()
     do something ...
     RaiseEvent MyEvent ...
End Function

After create ActiveX DLL, I add it into MTS, set Default Authentication Level to None, Default Impersonation Level to Impersonate (or Identity, and same result), Login account to Administrator.

2. Then I Create a Standard EXE Project to use Project1.Class1
a) If I code as follow:
     Dim WithEvents MyObj as Project1.Class1
     Private Event MyObj ...
     Set MyObj = New Project1.Class1
     MyObj.CallMyEvent ...
in Windows 98, an Error like "Class does not support automation or specified interface ..." occurs at New object line , no problem in Windows 2000.

b) If I code as follow:
     Dim WithEvents MyObj as Project1.Class1
     Private Event MyObj ...
     Set MyObj = CreateObject("Project1.Class1")
     MyObj.CallMyEvent ...
in Windows 98, an Error like "Type mismatch ..." occurs at CreateObject line , no problem in Windows 2000.

c) If I do not use Event:
     Dim MyObj as Object
     Set MyObj = CreateObject("Project1.Class1")
     MyObj.CallMyEvent ...
no problem in both Windows 98 and Windows 2000

Please tell me,
Can Windows 98 support DCOM Event?
If can, how can I use it?
Thank you very much.

Question by:huweiqi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6166478
You need to make sure DCOM98 is installed on your 98 machine.

Author Comment

ID: 6166649
Hello, tommy_boy

I already installed DCOM98 V1.3 which downloaded from Microsoft Web Site before, and reinstalled again a few
minutes ago, but the result is same.

Do you have other sugguestions?
Why CreateObject is ok at point 2.c) in my question?

Thank you.

Expert Comment

ID: 6167080
Check out Q267836
This creates a VB DCOM client/serve app with events.

Try disabling DCOM permissions (Default Access / Launch = Everyone), and run as the Interactive User.

The reason why CreateObject was OK before, is because you weren't subscibed to events.
When an object raises an event, it loops thru the clients connected to it, and raises an event to each one.  If noone has subscribed to events, it won't try to raise one!
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.


Author Comment

ID: 6167260
Hello, morgan_peat

I read the article before, and the demo has the same result.

And I have try your suggestion and still not work.

Something I forgot to tell:
   In some 98 machine, I install IE 5.5 SP1 and then the code run without errors. But it does not always work, only sometimes... , I do not know why ...

Any more idea?

Thank you.

Expert Comment

ID: 6167275
Like huweiqi suggested, it could be DCOM version then.
Look at this article, and it should help you to see what version you have installed on these machines - you can then see if you need a particular version to be able to recieve events.

Author Comment

ID: 6176597

All DCOM Version is (it is V1.3 according to the article metioned above).

I test according to MS article again and again, but alway fail in Windows 98 and success in Windows 2000.

Anyone ever success in receive event in Windows 98 from MTS? Please give me a way.

Thank you.


Author Comment

ID: 6184026

I re-install my Windows 98 and re-do the test.

And it seems ok, Windows 98 can get events.

Now I create a ActiveX Control which use events.

But other problems occur:
1. if I put a DoEvents at the end of MyEvent, the control works fine in VB Form. When it is put in IE, everything is fine except a GPF occur when I close IE (in Kernel32.dll or Unknown module). if I remark DoEvents, all ok.

2. if I use a Class named clsProgress in the control, same problem occur: a GPF error when close IE but the code run without any error. the clsProgress is used to control a ProgressBar object in the control and it is used in many usercontrols without problem.

Does anybody know why?

Thank you.

LVL 27

Expert Comment

by:Asta Cu
ID: 6907251
Please update the experts here who have so willingly stepped in to help you, since much time has passed since your last comments, and Email notifications may not have been generated to the participating experts here due to some problems at that time.  If you've been helped, accept the respective comment by that expert to grade and close it.

To see all your Open and Locked questions, click your member profile and View Question history to update/close them as well.

Somewhat off-topic, but important.

****************************** ALERT********************************
WindowsUpdate - Critical Update alert March 28, 2002 from Microsoft
Microsoft Security Bulletin MS02-015  
28 March 2002 Cumulative Patch for Internet Explorer
Originally posted: March 28, 2002
Who should read this bulletin: Customers using Microsoft® Internet Explorer
Impact of vulnerability: Two vulnerabilities, the most serious of which would allow script to run in the Local Computer Zone.
Maximum Severity Rating: Critical
Recommendation: Consumers using the affected version of IE should install the patch immediately.
Affected Software:
Microsoft Internet Explorer 5.01
Microsoft Internet Explorer 5.5
Microsoft Internet Explorer 6.0

Thought you'd appreciate knowing this.

Author Comment

ID: 6909464

The problem still not solved.

A DCOM component (registered in MTS) with Event fails in most cases in my Win98 client but always successs in my win2000.

The sample from Microsoft Technical Article has the same result.

Currently I just not to use Event in my server side component.

Should I delete this question?

Accepted Solution

Moondancer earned 0 total points
ID: 6926744
I am sorry that you have not received what you needed here.  I have therefore refunded to you the 100 points for this question and will close it by moving it to our PAQ at zero points.

You may benefit by posting this question again to draw current attention.  It may also help for you to include this link, so others can see what had transpired previously.

Moondancer - EE Moderator

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 13 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question