Hello Ciaran,
thank you for answering!
the following code is okay:
**********************************************
AssemblyName name = new AssemblyName();
name.CodeBase = str_DLL_FILE;
Assembly assembly = AppDomain.CurrentDomain.Load(name);
object remoteObject ;
remoteObject= assembly.CreateInstance(str_NAME_SPACE, false, myFlags,
null, args, null,null);
Type remoteType = assembly.GetType(str_NAME_SPACE);
//call the methode Get_Dll_Versions_Number
//returns a string with versionnumber of dll
MethodInfo methode = remoteType.GetMethod("Get_Dll_Versions_Number");
object result = methode.Invoke(remoteObject, null);
string v_num = result.ToString();
**********************************************
the dll has an event with the name "Dll_Error_Handler" with a string
containing the errorstring.
how can i get this event??
in the moment i try to solve the problem with an
abstract class, because the interface is known
and dll and mainprg are including this class.
I'm using visual studio 2005
thank you
Michael
Ciaran O''Donnell schrieb:
Could you post some code as to what you are trying to do. Also, are you
using visual studio or comand line compiling?
Ciaran O'Donnell
"MWismet" wrote:
Hello!
I worked with vb6 and now it I'm working with VS C# 2005
(I'm an c#- beginner)
I have a main progamm which search for Dlls in a folder.
I include all dlls and thats no problem: i can call the functions with
arguments.
Now my problem is that the dll has an event "ErrorEvent(string errmsg)"
which should be raised and the mainprogramm should notify and take
care of this message (Show Messagebox for examle).
I tried with delegation but it didn't work.
Can anyone help me.
Thank you!