Solved

DCOM Sample

Posted on 1998-07-27
10
804 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
Comment Utility
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
Comment Utility
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
Comment Utility
Ok give me your email Id i will send you the same
0
 
LVL 2

Author Comment

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

Expert Comment

by:sirigere
Comment Utility
Check out you mail box I am sending you the complete sample code for DCOM client and server
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 2

Author Comment

by:chris_a
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

772 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

10 Experts available now in Live!

Get 1:1 Help Now