This isn't a pure VB6 question but that's the environment so I'll start here.
I'm getting errors when trying to hook up a client to a DCOM server. My
users can't deal with DcomCnfg so I must make a totally silent install and
connection.
I know the DCOM server's computername so I'm using CoCreateInstanceEx() but
I'm getting errors that vary depending on what is running on the server
(XP/Win2k/Server2003) and the server's security settings and patch level.
This is an example of what MS wants me to do:
http://support.microsoft.com/kb/909444
This project is getting much too complicated and I'm thinking that I may be
going down the wrong road.
All I want to accomplish is to have clients be notified when one of their
peers does something that may require everyone to update their display.
Am I making this too complicated? Are the OS security updates making DCOM
impractical? I've been using polling but that's a lot of overhead.
I'd appreciate any suggestions that will get me back on track.
> This isn't a pure VB6 question but that's the environment so I'll start
> here.
[quoted text clipped - 23 lines]
>
> I'd appreciate any suggestions that will get me back on track.
If you need programmatically perform security settings on DCOM server, which
otherwise are done via dcomcnfg, then take a look at microsoft's sample:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html
/vcsmpdcompermpermissionsforcomserver.asp
It is in C++, I've never seen samples in VB and didn't have a chance to try
it personally. There is source code there and there is already compiled
application, which you, probably, could run using Shell or ShellExecute as
it is.
Notifications between different instances of application (or even different
applications) via DCOM server should be doable. I don't know whether it is
the best solution, but for VB development it seams to be natural choice. You
may consider MS Queue as an alternative solution (again, never tried by
myself but saw very positive feedbacks somewhere within these groups from
those who use it).
Dmitriy.
Jay Vinton - 02 Dec 2006 18:01 GMT
Those examples are very helpful. However, I think you're right about using
MSQM instead of DCOM.
Thanks for your help.