473,322 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to create COM object in remote machine (DCOM server)

Hello,

Does anybody have an idea on how to instantiate a DCOM
server residing in another machine using C#?

Thanks
Prashanth
Jul 19 '05 #1
1 15180
Hi Prashanth,

I think the method of consuming the DCOM service is similar with what you
do in legacy VB6 or C/C++.

1.Please follow the Knowledge Base (KB) link to make a DCOM server.(As a
demonstration, I made the DCOM server using VB6)
266717 HOWTO: Create a DCOM Client/Server Application by Using Visual Basic
http://support.microsoft.com/?id=266717

2. You may need to register the DCOM Server in where your client lies. The
easiest method is to use the PDW addin shipped with VB6 to package the DCOM
server.
[Note: You do not need to package the DCOM exe file, because it will run on
the server, but you need to include the DCOM .tlb and .vbr files, so that
the install program can register the DCOM server on the client for you. You
can do this in the "Included Files" step when you package the DCOM server
using PDW.

3. In VS.NET IDE create a simple Console project and make reference to the
.tlb by "Add reference dialog/COM" dialog[In my demo, it will be
DCOMDemo_Svr1.tlb in the %systemroot%\system32 directory. Below is my demo
code to consume a DCOM server in a remote server.

using System;
using DCOMDemo_Svr1;
public class RemoteConnect
{
public static void Main()
{
DCOMDemo_Svr1.Class1 cls = new DCOMDemo_Svr1.Class1Class();
Console.WriteLine(cls.ServerTime().ToString());
}
}

You may perform the steps and let me know if this does the job for you.
If you have further questions about this issue, please feel free to let me
know.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "Prashanth Uppunda" <Pr***************@geind.ge.com>
Sender: "Prashanth Uppunda" <Pr***************@geind.ge.com>
Subject: How to create COM object in remote machine (DCOM server)
Date: Mon, 1 Sep 2003 05:08:23 -0700
Lines: 7
Message-ID: <06****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNwgb2no/+14eV3Rq6/njOZVCG9Hw==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:106841
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.general

Hello,

Does anybody have an idea on how to instantiate a DCOM
server residing in another machine using C#?

Thanks
Prashanth


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Meier | last post by:
Environment: SQLServer Developer Edition on Machine A Enterprise Manager running on remote machine B Both machines are in the same subnet I open Enterprise Mgr on Machine A, right click...
0
by: Erik Anderson | last post by:
There is a COM object (written in ATL) that I have been using for a little while (in scheduled events mostly) that I am very interested in getting to run inside of an ASP page. This site uses...
4
by: Heliotic | last post by:
Hi everyone, Currently I am working on an application that will perform a remote scan of a specified server using the following code: Type t = Type.GetTypeFromProgID(...
1
by: Zanna | last post by:
Hi all! I hope someone can help me. I have in my lan a PC with IIS installed and this works as web server. On another PC I have VS.net 2003 installed. I'd like to debug asp/aspx pages on...
0
by: matvdl | last post by:
My asp.net application depends on obtaining allot of data from a remote application. This application is a bit of a monster and it is not an option to install it on the asp.net system. Note - the...
1
by: Prashanth Uppunda | last post by:
Hello, Does anybody have an idea on how to instantiate a DCOM server residing in another machine using C#? Thanks Prashanth
0
by: matsla | last post by:
I have followed all guide lines to set up remote debugging but is it possible to do cross-domain remote debugging? I use same account/password on both computers (XP => 2003), added users to debug...
11
by: =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post by:
Has anybody worked with performancecounter object to access counters on remote machine? I managed to write code that retrieves counters categories froma remote machine, when I try another remote...
3
by: Yves Gagnon | last post by:
Hi, I try to debug a WCF hosted in a windows services on a serveur that is on an other domaine then my developpement machine. I tried many things without succes. Here is what I tried: First I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.