?
Solved

DCOM Sample

Posted on 1998-07-27
10
Medium Priority
?
833 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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!

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

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

801 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