Go Premium for a chance to win a PS4. Enter to Win


Cannot use DCOM Event in Windows 98? Help!

Posted on 2001-06-07
Medium Priority
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

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!
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

886 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