Solved

DCOM Sample

Posted on 1998-07-27
10
813 Views
Last Modified: 2012-06-21
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.
0
Comment
Question by:chris_a
  • 5
  • 5
10 Comments
 
LVL 1

Expert Comment

by:sirigere
ID: 1466786
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
0
 
LVL 2

Author Comment

by:chris_a
ID: 1466787
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...
0
 
LVL 1

Expert Comment

by:sirigere
ID: 1466788
Ok give me your email Id i will send you the same
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 2

Author Comment

by:chris_a
ID: 1466789
Here is my  public email address: chris_a@usa.net
0
 
LVL 1

Expert Comment

by:sirigere
ID: 1466790
Check out you mail box I am sending you the complete sample code for DCOM client and server
0
 
LVL 2

Author Comment

by:chris_a
ID: 1466791
Thanks

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?

0
 
LVL 1

Expert Comment

by:sirigere
ID: 1466792
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
0
 
LVL 2

Author Comment

by:chris_a
ID: 1466793
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
0
 
LVL 1

Accepted Solution

by:
sirigere earned 100 total points
ID: 1466794
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.
0
 
LVL 2

Author Comment

by:chris_a
ID: 1466795
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.


0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access - Capture pressed key onclick 4 33
VBA filters 2 60
How to incorporate an error traping routing to existing code in VB6 11 40
Excel Automation VBA 19 70
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

770 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