Hallöchen Mitprogrammierer,
habe mit sehr viel Hilfe von dieser Forum erfolgreich ein VB .NET Class-Library entwickelt, in der man mehrere Dialogfester durch UG aufrufen kann. Soweit klappt alles gut, ich kann die DLL mehrmals aufrufen, aber nur 2-3 mal bis ich die folgende Fehlermeldung in NX-Log bekomme:
System.ComponentModel.Win32Exception: Klasse ist bereits vorhanden
Damit mein Tool wieder geht, muß ich NX4 komplett zumachen, wieder aufmachen, dann Tool wieder laufen lassen. Allerdings taucht die selbe Meldung auf, auch nach 2-3 Mal nach dem Laufen des Tools.
Die Funktion GetUnloadOption existiert bereits im Code. Gibt es noch was, damit das Tool immer funktioniert?? Ich bin ratlos...
Danke für eure Posts!!
EDIT: Ich hab's!! Laut NX4 Doku:
Using Winforms
--------------------------------------------------------------------------------
Closing Winforms
This section explains a specific condition you may encounter when using Winforms and a work–around.
When using Winforms, you may encounter the following exception:
Exception System.ComponentModel.Win32Exception: Class already exists
This can be caused when a programmer creates a journal file that does not properly close and dispose of a Winform when it exits. When a user runs a journal file like this in an NX session multiple times, the WinForm persists and locks the Windows class.
To resolve the problem, try the following actions:
Call the Close() and Dispose() methods on the Winform it exits.
Call Application.Exit at the end of journal execution.
Man, bin ich jetzt froh...
------------------
Gruß,
char *name = "Marc";
[Diese Nachricht wurde von MarckyMON am 23. Apr. 2009 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP