Execute dlls in seperate process

Hi

I have .NET dll written in C#
It's have a many classes and have many clients that use this dll.
Now i have request to run this dll out-of-process without change the 
clients!
I don't know if there is simple way to do it (like in VB6 just to change dll 
to ActiveX EXE)
Any suggestions ?

Thanks 

0
Michaelov
1/24/2010 7:48:58 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

3 Replies
1134 Views

Similar Articles

[PageSpeed] 22

Michaelov, Itzik wrote:
> Hi
> 
> I have .NET dll written in C#
> It's have a many classes and have many clients that use this dll.
> Now i have request to run this dll out-of-process without change the 
> clients!
> I don't know if there is simple way to do it (like in VB6 just to change 
> dll to ActiveX EXE)
> Any suggestions ?

Is it a COM DLL?  If so, then I suppose there may be a way to configure 
it as an out-of-proc COM server.  That's outside the scope of this 
newsgroup though; more of a COM question, than a C#/.NET question. 
Though surely the solution will involve some change to the C# project, 
to get the output appropriate for an out-of-proc COM server (i.e. change 
it from DLL to EXE, in addition to the COM-related changes that have to 
be made).

Otherwise, no.  A DLL assembly inherently is intended to be used in the 
context of some other executable that loads it.  You can always wrap the 
DLL in some EXE code of course, and define some API by which a different 
process can interact with it.  But whether you'd consider that "simple", 
I don't know (the API doesn't have to be complicated, necessarily, but 
it's not going to be trivial either).

Of course, the request begs the question: what benefit does your client 
expect to achieve by running your DLL code as a standalone process?

Not that such things are unheard of.  One possible use scenario would be 
to have a single process that can act as a server for multiple other 
client processes, to address some specific need to have the handling of 
the multiple client processes coordinated somehow.  But generally, one 
would expect things to be _better_ running the code as a DLL rather than 
a standalone EXE.

IMHO you should work to understand the client request better, so you 
know what is the underlying goal they are trying to achieve.  Just as 
often in this newsgroup, we get questions from programmers who ask about 
some specific implementation, when what they really need is advice about 
whatever design led them to that implementation choice, clients of 
third-party code may often ask for some specific change to the 
third-party code, when in fact what they really need is advice as to how 
to change their overall architecture to fit within a more sane usage of 
the third-party code.

I think there's a good chance your client doesn't really need your DLL 
code to run in its own process.

Pete
0
Peter
1/24/2010 8:23:42 AM
Hello,

Perhaps http://msdn.microsoft.com/en-us/library/3x7357ez(VS.71).aspx 
(System.EnterpriseServices) or if acceptable using an EXE rather than a DLL 
should likely work

They just want the isolation brought by running out of process or do they 
have a more specific goal ?

--
Patrice

"Michaelov, Itzik" <IMichael@ingrnet.com> a �crit dans le message de 
news:55D73CAF-C97A-4AD4-AFB7-AA94E80F08E6@microsoft.com...
> Hi
>
> I have .NET dll written in C#
> It's have a many classes and have many clients that use this dll.
> Now i have request to run this dll out-of-process without change the 
> clients!
> I don't know if there is simple way to do it (like in VB6 just to change 
> dll to ActiveX EXE)
> Any suggestions ?
>
> Thanks 

0
Patrice
1/24/2010 2:21:42 PM
On 24-01-2010 02:48, Michaelov, Itzik wrote:
> I have .NET dll written in C#
> It's have a many classes and have many clients that use this dll.
> Now i have request to run this dll out-of-process without change the
> clients!
> I don't know if there is simple way to do it (like in VB6 just to change
> dll to ActiveX EXE)
> Any suggestions ?

You need to create another DLL that is used in process that
communicates with another process that calls the original DLL.

If the DLL is not signed it should be easy to replace.

For communicating with the other process you can use
COM+, remoting or WCF.

Any chance you can persuade whoever is in charge to
go for other AppDomain instead of other process?

I think that would simplify the solution and would
provide sufficient isolation for most usage.

Arne


0
ISO
1/25/2010 2:12:59 AM
Reply:

Similar Artilces:

Program stops executing
I have an instance such that any VB program will not work on a certain PC. It used to, but now the VBNET2005 generated executable will now not execute. I have tried creating a simple project with just a form on it with Hello World in a textbox and even that will not execute in runtime. There is no question of the framework not being installed because it comes standard in the Windows XP SP2 and I have SP3 installed on the PC. I have uninstalled and reinstalled the DotNet framework and this has NOT resolved the issue. Can anyone please shed some light on this matter for me a...

Order Processing App
Forgive the double posting, but I think the first group I posted this in was too obscure, with only few postings a day. Hello, I am just learning to develop apps with Access. I have a bit of experience developing Excel apps, using VBA. I need to design a Produce purchasing and distribution application. It will need to handle incoming and outgoing product, invoice tracking, pricing, etc. I'm sure there's a million ways to do it, but my main question at this point is how to set up the app to handle incoming orders, and retain those orders until they are filled. My initial thought...

DoEvents and Execution
I'm using AC2003. I have FormA which has two subform controls on it which do not have a SourceObject assigned to them. I do that in the form_open event, see below. What I'm trying to do is to open a simple OneMomentPlease form that has several colored labels used to indicate progress. As I understand it, a DoEvents statement should force all statements prior to it to execute before any following statements to execute. However, it's not working that way. When FormA is opened it runs through all statements. Each sourceobject contains a fairly complex chart and ta...

start excel 2007 in seperate processes
How can i get excel 2007 to show open workbooks seperately on the windows desktop? I want to look at two workbooks at the same time, but unlike Word, Excel doesn't do that. Thanks, Dennis "Dennis C. Drumm" <dcdrumm_@community.nospam> wrote in message news:326069EB-8CAD-478C-9D28-8F782728EC78@microsoft.com... > How can i get excel 2007 to show open workbooks seperately on the windows > desktop? I want to look at two workbooks at the same time, but unlike > Word, Excel doesn't do that. > > Thanks, > > Dennis It does here! just clicked on th...

Informatin is Needed before this report can be processed
Has anyone ever see the message: "Informatin is Needed before this report can be processed " and the "Max Records Count has ben exceeded" when running a report. Does anyone know how to get around these, especially the first error message? "Alex Beletsky" <abeletsky@sentri.com> wrote in message news:<e0ae01c43c16$46a8ef40$a001280a@phx.gbl>... > Has anyone ever see the message: > > "Informatin is Needed before this report can be > processed " > > and the "Max Records Count has ben exceeded" when > run...

Execute As
Greetings. I have 2 Databases with 2 different sets of users, and thus 2 different sets of permissions. Certain actions on Database A fires a trigger that executes a stored procedure on database B. If the user in Database A doesn't have permission on Database B, then the procedure fails, and the User gets an error. I have been experimenting with the EXECUTE AS function, but it doesn't seem to work as I had expected. Can anyone give me some tips or point me in the direction of some holiday reading material? Thanks in advance. Matthew Vandermolen Solutions Architecht Worktec...

Legacy driver conversion needs means to identify process sending I
I am still converting a massive and old WDM driver. We found where the old driver copies the Irp->Tail.Overlay.OriginalFileObject in order to identify which process sent the WDFREQUEST. While inspecting MSDN's docs on the IRP struct, we noted that the OriginalFileObject member of Tail.Overlay is not recommended for driver usage. So here is my question: What is the ideal way for a KMDF driver to determine which instance of our DLL (which user mode app) sent the WDFREQUEST? What our driver must do is enforce that one and only one app open certain items like channels o...

Mem Usage increase while while executing dialog box
Dear All, Hope I have posted to the correct topic area. Need some help here. 1. I have created a simple dialog box using Visual Studio C++ 6.0, the dialog box contains an multiline read-only Edit Box, a Start Button and a Stop Button. 2. When the Start Button is clicked, the program will execute and the Edit Box will just print out the following text - "Line XX", where XX is the number 3. Problem is that when the program is executed and using Windows Task Manager to monitor the process, there is a high usage of Memory (ranges from 3636K to as high as 40000K). 4. Question ...

Server execution failed
Am trying to play WMV clips. I keep getting Server Execution Failed messages. What's the fix? Thanks. -- James Never mind. Fixed it by running a registry cleaner. Odd. -- James "James Ko" <iamwho@hawaii.rr.com> wrote in message news:uhbKodidKHA.6096@TK2MSFTNGP02.phx.gbl... > Am trying to play WMV clips. I keep getting Server Execution Failed > messages. What's the fix? Thanks. > > -- > James ...

CEO wants to consolidate mail from 3 seperate mailboxes
My company owns several subsidiaries. My CEO wants to consolidate mail from three seperate mailboxes into one. He has three seperate mailboxes on three seperate Exchange servers in different organizations. Would forwarding work in this case? Maybe a 3rd party product. Thanks for bailing me out! If the mail users are sitting on the same Exchange Organisation then it's a matter of coping the mail to one mail box and removing two others. If they are not on same Org then create your CEO mail box as Customer Receipent on the servers than need to forward. Another option if there is 3 sepera...

Seperate Investments and Money Plus 08
In Money Plus 08, I have combined investments and want to seperate them. In the Help section, I can see "Click Manage combined investments." but just cannot find this option in the program. Help please! In microsoft.public.money, a@aol.com wrote: > >In Money Plus 08, I have combined investments and want to seperate >them. In the Help section, I can see "Click Manage combined >investments." but just cannot find this option in the program. Help >please! In the lower part of the Details, click ManageCombinedInvestments. Cal Can you provide a snapshot view...

New DLLs from Tools group
Currently I am using DLL called RetrieveGlobals.dll which gives all the connection information. I really love this one. Is there any new version to support 8.0? I am looking for another dll which I can use to post my batches automaticaly. (We get several Receivable and Payable batches from other systems). Is there any place I can find all the availabe dll's from Tools group. Appriciate your help. Thank You, Vishnu ...

Extending the Process class
The System.Diagnostics namespace contains a Process class which defines a static method GetProcesses. GetProcesses returns an array of Process instances of all processes running running on the PC (or another PC). I wish to subclass Process to include an additional property. My problem is with the GetProcesses method. Since its return value is a Process[], I cannot just downcast a Process element to MyProcess to access the my property as well as the ones the Process already defines. Since the fetching of all processes occurs frequently, and the list can be long, I would prefer to...

Unable to start Service process SSP
I am trying to configure Project server. I have encountered the following error. Unable to start Service process SSP I have checked the event log. under Share point services There seems to be some error. I have uploaded the error here http://i50.tinypic.com/ru0fhi.jpg I am looking forward for your help. ...

Updating Form Field During Execution
I have a textbox field on a form in which I enter the number of times to execute a particular loop in my program. If I enter 2000, I would like for the field to change, maybe every 100 executions, to show how many remaining executions there are. I am changing the value (textbox.value = xx) after each 100 executions, but the field on the form does not refresh until all 2000 loops have been executed. Is there some way to accomplish this? -- Bill @ UAMS This is a userform? Try changing your value: me.textbox.value = clng(me.textbox.value) - 100 me.repaint BillCPA wrote: >...

How to mapping event supplied by Out-Processing COM server?
Hi,old fellows I am a vc programmer,I encount a problem about COM,Now my friend give me a out-processing COM,I want to do something during the event of the COM happening.that is called mapping event Certainly,he supply COM EVENT interface,but I don't know how to mapping these interface to method in my client application I use VC6. Who prefer to tell me Many thks for your hint Aladdin "Aladdin" <anonymous@discussions.microsoft.com> wrote in message news:910F0F61-3E0D-4612-9EEE-A958AB70A83C@microsoft.com... > Hi,old fellows: > I am a vc programmer,I encount a proble...

Execute an executable program.
How can I in code (VB.NET 2008) execute another executable program ? Thanks :) On Mar 26, 11:21=A0am, "Mr. X." <nospam@nospam_please.com> wrote: > How can I in code (VB.NET 2008) execute another executable program ? > > Thanks :) Process.Start("path_of_exe") http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.as= px is what you want. HTH, Onur G=FCzel Am 26.03.2010 10:21, schrieb Mr. X.: > How can I in code (VB.NET 2008) execute another executable program ? 'System.Diagnostics.Process.Start' or &#...

Sales Process #2
Hi, I have a problem with the opptys/sales process. In the report "Sales Pipeline --> show all" I get all opptys with the sales stage "not specified". Now I am trying to set the sales process and the stepname field by the workflow, but now I cant see this opptys in the report... Any idea? greetings, stefan ...

Can't Backup. On close, unknown process interferes.
I have Outlook 2003 set to Backup every three days or whatever but when I close it says that there is some process that won't allow the Backup to occur, so then I hit Cancel so it can finish shutting down, so I can't Backup. What is the process that could be responsible? Is there a way to fix it or a workaround? I do have Active Sync 3.7 with an IPAQ 1945, and that use to happen when I had Outlook XP and it actively connected, but with Outlook 2003 and Active Sync not connected, it still occurs every time. Any ideas? Also, Outlook 2003 seems to take a heck of a lot longer ...

EXECUTE
HOW DO YOU DO AN EXECUTE? could you please be a bit more specific? what is your question? execute what? "AS" wrote: > HOW DO YOU DO AN EXECUTE? I AM DOING AN ADO IN DEXTERITY CALLING A STORED PROCEDURE AND WOULD LIKE TO EXECUTE THE COMMAND. WHAT DO I DO? "26point2er" wrote: > could you please be a bit more specific? > > what is your question? execute what? > > > > "AS" wrote: > > > HOW DO YOU DO AN EXECUTE? Stop SHOUTING, for one thing. "AS" <AS@discussions.microsoft.com> wrote in message news:675...

execute $variable LATER
$a = "$computer `t $computer_lastlogon `t $computer_pwdlastset" | out-file -filepath c:\results1.txt -append =================================== I wish to store the above statement in a variable, and to EXECUTE LATER. How do i prevent $a from execution until i decided to put in somewhere in my script as $a ? If I follow: PS>$a = "$computer `t $computer_lastlogon `t $computer_pwdlastset|out-file ...." wait PS>invoke-expression "$a" "IT Staff" <jkklim@hotmail.com> wrote in message news:OcNiG6BwKHA.5036@TK2MSFTNG...

re-process EDC without approval codes
First, hello to everyone and thanks for your help. We set up RMS several weeks ago, then signed up for CitiBank processing, entered all our account info and opened last Saturday. After a week of processing and counting signature slips, we tried to process our EDC batches only to find there were NO transactions listed. I went back and looked at the signature slips and none of them had approval codes. I spoke with CitiBank customer service and they helped me locate the problem of not having the use EDC verification in the teder type windows. After doing this and running the z report, ...

Event Execution
I have a form that contains 3 charts on it. The form works fine except it takes about 2-4 seconds for each of the charts to appear. The charts are fairly complicated. All of the tables/queries have been analyzed and optimized. What I am looking for is the proper event that I can use that tells me that all 3 charts have been populated/displayed. I want to display a field that says "One Moment Please" until the 3 charts have been displayed. I've tried the AfterRender, AfterFinalRender, AfterLayout events but none of them fire. Is there an event that I can use...

Running an executable with dependencies from a network folder
I have an excel 2010 workbook located in a network directory and a .exe program in the same directory, along with a number of its dependencies (data files). I'd like to run the exe program from within a VBA subroutine using a shell command. Current code is as follows [code] Sub RunModel() ReturnValue = Shell("model.exe") MsgBox ReturnValue End Sub [/code] This fails as I need to change directories to the network drive and set the current working directory to ActiveWorkbook.Path, so the shell command can find the exe file which in turn can find its dependencies. N...

executing..............
when i sync, the box comes up showing status. when it gets to download all messages from gmail, the status shows "executing". no tasks below this have any status update. Am i to assume it is constantly executing this? I ask because when i send a mail, it sits in outbox until i close this box by pressing stop. This causes it to purge the outbox, sending my mail. it is a pain and sometimes I forget, thus, mail sits there forever without being sent. Help!!! Look at Tools (ALT+T), Options, General. Do you have it set to check for messages every xx minutes? If s...