Hello,
I need to have a .dll start up and pass some information to an .exe, then receive some information back.
The only way I can think of doing this currently is to use Process.Start and/or ProcessStartInf o to start the .exe, then have the .exe and the .dll communicate through text files. I know this could work but it would be really messy and I'm hoping for a cleaner solution.
Is there anyway to import and use the classes in an assembly (.exe) like you can import and use the classes in a library (.dll?). I tried adding my .exe as a reference for the .dll and using something like the following in my .dll :
_______________ _____________
WinUI.MyWinForm myWinForm = new WinUI.MyWinForm ();
myWinForm.Show( );
_______________ _____________
(WinUI is my application namespace/project and MyWinForm is the name a the form...)
But as soon as the the function containing the above code (in the .dll) was called I got the following error :
System.IO.FileN otFoundExceptio n "Could not load file or assembly 'WinUI"
What I'm trying to accomplish is have a .net 2.0 class in a library (.dll) start up a .net 2.0 application (.exe) open up a windows form that lives in the .exe (the form can be the .exe's start up object), pass some data to the aplcation, call a couple functions and then close it (or leaving it open would be ok too)....
And help or code samples very much appreciated.
P.S.
Unfortunately I can not work the other way around (of course), the application can not be started first and simply reference the class library, that would be way too easy :) This whole process must start with and be controlled by the library. Also, the form in question must live in the .exe, trust me (long story).
Thanks in advance!
and sorry if I'm doing something wrong here; this is my first post :)
I need to have a .dll start up and pass some information to an .exe, then receive some information back.
The only way I can think of doing this currently is to use Process.Start and/or ProcessStartInf o to start the .exe, then have the .exe and the .dll communicate through text files. I know this could work but it would be really messy and I'm hoping for a cleaner solution.
Is there anyway to import and use the classes in an assembly (.exe) like you can import and use the classes in a library (.dll?). I tried adding my .exe as a reference for the .dll and using something like the following in my .dll :
_______________ _____________
WinUI.MyWinForm myWinForm = new WinUI.MyWinForm ();
myWinForm.Show( );
_______________ _____________
(WinUI is my application namespace/project and MyWinForm is the name a the form...)
But as soon as the the function containing the above code (in the .dll) was called I got the following error :
System.IO.FileN otFoundExceptio n "Could not load file or assembly 'WinUI"
What I'm trying to accomplish is have a .net 2.0 class in a library (.dll) start up a .net 2.0 application (.exe) open up a windows form that lives in the .exe (the form can be the .exe's start up object), pass some data to the aplcation, call a couple functions and then close it (or leaving it open would be ok too)....
And help or code samples very much appreciated.
P.S.
Unfortunately I can not work the other way around (of course), the application can not be started first and simply reference the class library, that would be way too easy :) This whole process must start with and be controlled by the library. Also, the form in question must live in the .exe, trust me (long story).
Thanks in advance!
and sorry if I'm doing something wrong here; this is my first post :)
Comment