Re: COM Interop - Localserver32 registry entries?
From: Andrew S. Giles (AndrewSGiles_at_discussions.microsoft.com)
Date: 12/16/04
- Next message: slamb_at_cognex.com: "Re: DomainUpDown key input"
- Previous message: Morten Wennevik: "Re: Hit Breakpoint & still see Form"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: COM Interop - Localserver32 registry entries?"
- Next in thread: Willy Denoyette [MVP]: "Re: COM Interop - Localserver32 registry entries?"
- Reply: Willy Denoyette [MVP]: "Re: COM Interop - Localserver32 registry entries?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Dec 2004 13:53:01 -0800
Nicholas,
I found an article that sets up a class and interface as a DCOM server in
C#. I have this already set up in the code, I am just trying to find what
keys are necessary to be in the registry and pointing to what objects to get
it to work.
I have a DLL (MsgEvent) written in C# that I want to be the server. Then I
have a C# application that has a reference to this DLL, it instantiates a
copy of this class and establishes Event handlers for when the exposed
methods are called (the exposed methods wrap the incoming data, and spawn an
event to be processed). There is another process, written in unmanaged C++
that needs to call my COM class to get the data to me. If it looks for a
localserver in the registry and gets the interface of the one already
running, I should be able to send the data across, or that is what I am given
to understand. Which is why I want to set it up as a localserver32, though
this means manually (or via a script that I write) establishing the COM
object as a server.
I did not follow any of the idea for registering my process on the running
object table (is that registering the COM exposed class? and where is the
table? Im a bit out of my element here). Can unmanaged code call this
running object table?
Andrew
"Nicholas Paldino [.NET/C# MVP]" wrote:
> Andrew,
>
> If you need to access items that are already running, then setting it up
> as an out of process server isn't going to be something you will be able to
> do. Rather, you should register your instance on the running object table,
> and have the other process access your component from there (either that, or
> have it access it through COM+).
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
> "Andrew S. Giles" <AndrewSGiles@discussions.microsoft.com> wrote in message
> news:E2D07567-B8E3-44D6-B1E6-E56C4C9BA328@microsoft.com...
> > Nicholas,
> >
> > Regasm does not do what is necessary. Regasm sets up an inproc server for
> > the COM object. In my situation, I need the applicaiton to access the
> > process that is already running, which means it needs an out-of-process
> > server. Thus why I am looking for the keys for localserver32.
> >
> > Do you know an option in regasm that will set up a localserver32? I could
> > not find one anywhere in the documentation.
> >
> > Andrew
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >
> >> Andrew,
> >>
> >> You should not be setting these values yourself. Rather, you should
> >> let
> >> the REGASM.exe tool do all of the work for you. You should check out
> >> part 2
> >> of the COM interop tutorial, which details how to expose your classes in
> >> ..NET to COM clients. It is located at (watch for line wrap):
> >>
> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkcominteroppart2cservertutorial.asp
> >>
> >> Hope this helps.
> >>
> >>
> >> --
> >> - Nicholas Paldino [.NET/C# MVP]
> >> - mvp@spam.guard.caspershouse.com
> >>
> >> "Andrew S. Giles" <AndrewSGiles@discussions.microsoft.com> wrote in
> >> message
> >> news:20B5822E-37C2-432B-875E-951A2EA99439@microsoft.com...
> >> > What registry entries do I need to make a class a localserver32?
> >> >
> >> > Andrew
> >>
> >>
> >>
>
>
>
- Next message: slamb_at_cognex.com: "Re: DomainUpDown key input"
- Previous message: Morten Wennevik: "Re: Hit Breakpoint & still see Form"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: COM Interop - Localserver32 registry entries?"
- Next in thread: Willy Denoyette [MVP]: "Re: COM Interop - Localserver32 registry entries?"
- Reply: Willy Denoyette [MVP]: "Re: COM Interop - Localserver32 registry entries?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|