I am in desperate need to get help in answering some questions in
regards to building a DCOM Server using C#.
I need to create a DCOM server using C#.NET, I realise that you first
need to create the managed code, attach interfaces and use the CCW
command line tool to add a COM wrapper to the assembly.
The server will be communicating with a DCOM client which I didn't
write, but I have all the documentation on what interfaces and methods
it uses.
Please keep in mind I have never written a COM object before.
The questions I have are as follows:
1. What extra do I need to do to make the COM object into a DCOM object?
2. Do I need to worry about IInterface or IDispatch? Or is this all
done by the CCW Wrapper?
3. How do I generate the GUID for each interface? And do I need to
worry about the QueryInterface Interface which the client uses to find
out which interfaces are available?
4. I found a basic COM Interop Server in C#, which just returns the
name of a person to the COM client as shown below. My guess is that I
just create the interfaces on the Server side COM object as the
documentation requests and then write my own code inside?
A DCOM Client and Server example would also be great if anyone has one
written in .NET (Any language would be fine, but prefer C# or VB.NET)
CODE:
-------------------------
using System;
using System.Runtime. InteropServices ;
namespace CSharpServer
{
// Since the .NET Framework interface and coclass have to behave as
// COM objects, we have to give them guids.
[Guid("DBE0E8C4-1C61-41f3-B6Â* A4-4E2F353D3D05"
public interface IManagedInterfa ce
{
int PrintHi(string name);
}
[Guid("C6659361-1625-4746-93Â* 1C-36014B146679"
public class InterfaceImplem entation : IManagedInterfa ce
{
public int PrintHi(string name)
{
Console.WriteLi ne("Hello, {0}!", name);
return 33;
}
}
} 0 2341 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kedar Agarkar |
last post by:
:
This is general query seeking opinions about COM+ Development wherein
Server is developed in C# and
Client accessing that across machines is also C#.
Wish to seek experienced words on issues of COM-.NET interop that is
playing major decisive role on both sides and is making decisions
complicated only based upon theory.
|
by: David Dolheguy |
last post by:
I am in desperate need to get help in answering some questions in
regards to building a DCOM Server using C#.
I need to create a DCOM server using C#.NET, I realise that you first
need to create the managed code, attach interfaces and use the CCW
command line tool to add a COM wrapper to the assembly.
The server will be communicating with a DCOM client which I didn't
write, but I have all the documentation on what interfaces and...
|
by: Harish |
last post by:
I am buiding an application in ASP.Net 2.0 with C#. After installing
corel wordperfect i am adding the reference into the application. Afetr
adding reference interop.wordperfect.dll is added to the Bin folder.
After creating the object of Wordperfect.Perfectscript i am opening the
wordperfect file and then run the wordperfect macro. In development
version the application is running without any error. If i publish the
website on local...
|
by: akshar108 via DotNetMonster.com |
last post by:
I m developing a application for word count using interop office com
component but it is running nicely in my server 2000 and i also check in
local 2003 server and give all permission to com component through dcom
config but is not working in the web server of 2003 i have also rights of
that server i also allow all user to use com component by dcom config but it
fails while open command it is giving command failed exception
Any one who...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |