Autor Beitrag
Orothred
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 86


C# (VS 2005)
BeitragVerfasst: Di 09.10.07 07:31 
Hi! Mit folgendem Code lese ich aus einer XML-Datei den Pfad zu einem Plugin aus und will das Plugin starten:

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Assembly ControlLib;
rxsmonplugins NewPlugIn;

// Aus der XML-Datei lesen
DataSet foo = new DataSet();
     foo.ReadXml("rxsmond.config.xml");
foreach (DataRow dr in foo.Tables["Plug-In"].Rows)
{
    // Assembly laden
    ControlLib = Assembly.LoadFrom(dr["Location"].ToString());


Das Plugin wird zwar korrekt eingelesen, allerdings nicht gestartet. Bei dem Programm handelt es sich um einen Dienst

MFG

Orothred

Moderiert von user profile iconChristian S.: Code- durch C#-Tags ersetzt
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Di 09.10.07 10:59 
Ich kenne die Klasse "rxsmonplugins" nicht, aber das Laden des Assemblies dürfte wohl nicht reichen, wenn diese Klasse nie Wind davon bekommt.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".