473,614 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 15243
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.t lb in the %systemroot%\sy stem32 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.C lass1 cls = new DCOMDemo_Svr1.C lass1Class();
Console.WriteLi ne(cls.ServerTi me().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.co m>
Sender: "Prashanth Uppunda" <Pr************ ***@geind.ge.co m>
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.publi c.dotnet.genera l
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:106841
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

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
5998
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 on the Stored Proc, enter the parameters and the debugger stops on the first line and I can single
0
4140
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 Windows (domain) authentication. The error message that I am getting at this point is the following: Error Type: Server object, ASP 0177 (0x80070002) 80070002 /teamwork/_private/auth-ng.inc, line 9
4
14456
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( "Microsoft.Update.Session", "proact" ); UpdateSession UpdSess = (UpdateSession) Activator.CreateInstance(t); This code works quite well, as long as the user you are currently authenticated to also has administrative access on the target device. This
1
2570
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 the remote PC (with IIS). Is it possible?
0
1468
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 remote application is developed in vb6 Currently I have the application installed on a number of remote computers and use DCOM from asp.net to communicate with this application. All the calls to this remote application are generally kept to a...
1
476
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
3888
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 group, change DCOM security etc. I get following error in the event log when try to start the remote debugging Visual Studio 2003... DCOM got error "General access denied error" from the computer COMP1
11
5413
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 machine I get "System.ComponentModel.Win32Exception" error. Error message is "The network path was not found." I have checked running services (RPC, Remote registery.....) on both machines and they are exactly the same. I am wondering if there is...
3
6618
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 installed on the server I want to debug, the remote debugger tools from the VS 2005 CD. I just install the windows application. I tried from there to debug, without succes. I could connect to the remote machine only when the msvsmon.exe is in the...
0
8627
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8579
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8433
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7093
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6088
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5540
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1425
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.