Re: Outprocess library in .NET
From: David Browne (meat_at_hotmail.com)
Date: 03/18/04
- Next message: Paul Clement: "Re: Using Access with C#.NET"
- Previous message: Craig Hunter: "GetObjectData & XMLSerializer"
- In reply to: Ostap Radkovskiy: "Outprocess library in .NET"
- Next in thread: Ostap Radkovskiy: "Re: Outprocess library in .NET"
- Reply: Ostap Radkovskiy: "Re: Outprocess library in .NET"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 18 Mar 2004 09:29:06 -0600
>I'm using MSMQ triggers to launch COM object written in C#. Unfortunately,
there is a need to >have some .config file attached to my COM, so it could
read necessary settings within. As far as >I understand my class library
(written in c# and registered as COM object) is an inprocess COM >running
inside the caller process and have no possibility to find it's config file
(moreover, >.NET studio does not allow attaching .config files to class
libraries). How can I handle this?
Your C# dll is an Assembly.
If your assembly is not shadow copied, and it is not in the GAC, you can put
your config file in the same directory as your dll and get that location
with
string path
=System.IO.Directory.GetParent(System.Reflection.Assembly.GetExecutingAssemb
ly().Location).FullName;
You may need to register your assembly with the /codebase option for it to
be found by COM clients outside the GAC.
regasm MyLibrary.dll /tlb:MyLibrary.tlb /codebase
David
- Next message: Paul Clement: "Re: Using Access with C#.NET"
- Previous message: Craig Hunter: "GetObjectData & XMLSerializer"
- In reply to: Ostap Radkovskiy: "Outprocess library in .NET"
- Next in thread: Ostap Radkovskiy: "Re: Outprocess library in .NET"
- Reply: Ostap Radkovskiy: "Re: Outprocess library in .NET"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|