Solved

Cannot use DCOM Event in Windows 98? Help!

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

Environment:
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.

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

Project1.Class1

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.
----------------------------------------

0
Comment
Question by:huweiqi
10 Comments
 
LVL 1

Expert Comment

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

Author Comment

by:huweiqi
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.
0
 
LVL 1

Expert Comment

by:morgan_peat
ID: 6167080
Check out Q267836
(http://support.microsoft.com/support/kb/articles/Q267/8/36.ASP)
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!
0
 

Author Comment

by:huweiqi
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.
0
 
LVL 1

Expert Comment

by:morgan_peat
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.

http://support.microsoft.com/support/kb/articles/Q235/6/38.ASP
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:huweiqi
ID: 6176597
Hello,

All DCOM Version is 4.71.0.3328 (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.

0
 

Author Comment

by:huweiqi
ID: 6184026
Hello,

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.

0
 
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
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms02-015.asp
Synopsis:
Microsoft Security Bulletin MS02-015  
28 March 2002 Cumulative Patch for Internet Explorer
Originally posted: March 28, 2002
Summary
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.
":0)
Asta
0
 

Author Comment

by:huweiqi
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?
0
 
LVL 1

Accepted Solution

by:
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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now