DCOM Sample

I am having trouble with DCOM, I have never got it to do anything on a single PC things happen but accross machines events never come back.

I am left wondering whether it is my (or sample) code or some security glitch.

What I need is a sample that consists of a multi-threaded server and a client that is guarateed so removing a variable.

If the server could have a method that takes two numbers and returns the sum later in an event that would be perfect.

Once I get simple DCOM to work, I want to put i thru MTS, any thoughts?

Thanks in advance

PS I tried Message Q, it was stunningly slow, has anyone had a positive experience.
Who is Participating?
sirigereConnect With a Mentor Commented:
I am unable to help you out. The project i sent you is a complete working project. If you specify the error then i meight help you out. At present i can give you a reference book
Read "Business object" - completet Vb book dealing with Dcom and it is from WROX press.
You can get the sample(complete) code at
www.microsoft.com/vbasic. Apply search string as dcom.
If  a ny problem with that let me know
chris_aAuthor Commented:
Can you be more specific, what is the url of a working VB DCOM sample. I wanted to get away from MS samples which are either too big (like the MTS sample which pulls in IIS and is web enabled) or too small (in vbonline).

I want to reduce the unknowns...
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Ok give me your email Id i will send you the same
chris_aAuthor Commented:
Here is my  public email address: chris_a@usa.net
Check out you mail box I am sending you the complete sample code for DCOM client and server
chris_aAuthor Commented:

I have got it running, it required a reinstall of VB!

On my PC it worked, then I got it to dcom to an NT4 server (from NT4W). This required messing about with clireg32 and racmgr32 to get server class and serverevent class on the client pc.

I tried to reverse it so the NT4W pc became the server and cannot get the NT4S to show a serverevent class in the dcomcnfg list. not surprisingly the NT4S machine can call the NT4W server but cannnot recieve events.

I tried to use the setup wizard to install onto a clean NT4W, however it doesn't setup the server classes in the dcomcnfg list despit the log listing processing the vbr files.

So to the questions:

In the past when I have produced vbr files (ocx licences) I have just passed them to regedit to register. The server vbr file is not recognised by regedit, should it be?

What do I use to install these programs, the setup wizard is as crap as it ever was and wise (my usual tool) has never heard of dcom?

if you want to pass your vbr file to regedit you got to make some changes
1. change the extension to .reg
open the file with notepad and remove the first line and put the new line regedit4
i think by this it will be acceptable

If you want to distribute your client program it is better to use setup wizard
before creating your client program setup folow these instructions
type the following on the run dialog box
<Dcomserver path> /unregserver
then in the vb client project refer the tlb of the server
and create the exe of the client
then as usual create the setup program for the client
while creating the setup program in the addremote option you got to add the vbr file and specify your server machines ip address

then once again at the server side at the run dialog box type the following
<server path> /regserver

Install the client and try it
chris_aAuthor Commented:
I have been investigating the registry entries made by

  The VBR    - via regedit         - incomplete
  CliReg32   - passed the TLB via  - I am not using setup kit
               the setup kit         ever again
  The server - run on the client   - don't want to ship the
                                     server to the client

All produce different effects and running all three seems to get it going, I am (slowly) writing a program to do all of the registration directly from the TLB file, which seems to be the most accurate source of reg info.

Another way may be to make a skeleton of the project with interfaces and use it for bin compat, but this sounds bad to control.

When I get somewhere, if you tack on an answer I shall give you the points as the code you sent is what I asked for - Thanks
chris_aAuthor Commented:
Thanks for the code sample, it is always a problem when you get a sample from MS that WHEN it fails you don't know why. Then you end up with too many unknowns.

I got VB6.0 this morning so I shall see what this does for the remote reg probs, I may not have to write my own program to do it.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.