I've been playing around with the .NET wrapper for a while, and most everything as worked great. However, today I started with to write a WinForms interface for one of my programs, and I get a COM exception whenever I close the window.
Right now the code is very simple, when the form loads it does this:
- Code: Select all
uoai = new UOAI.UOAI();
client = uoai.Clients[0];
charNameLabel.Text = String.Format("Character: {0} (0x{1:X})", client.PlayerName, client.Player.Serial.Value);
I get this error when I close the form:
- Code: Select all
InvalidComObjectException was unhandled
COM object that has been separated from its underlying RCW cannot be used.
System.Runtime.InteropServices.InvalidComObjectException was unhandled
Message="COM object that has been separated from its underlying RCW cannot be used."
Source="UOAINET"
StackTrace:
at UOAI.COMInterfaces.UOMobile.get_ID()
at UOAI.Mobile.get_Serial()
at UOAI.Mobile.Dispose()
at UOAI.Mobile.Finalize()
InnerException:
