AxMsComm objet created dinamically in C#
-
Hi everyone.. I have a problem creating a AxMsComm list. This is my code:
public static List<axmscommlib.axmscomm> lstModem = new List<axmscommlib.axmscomm>(); lstModem.Add(new AxMSCommLib.AxMSComm); lstModem[0].Enable = True; lstModem[0].Tag = -1; lstModem[0].CommPort = 1; . .
While I am running my aplication I get the following exception:InvalidActiveXStateException
I searched for this in google and I found that this is because .NET doesn't allow to create new COM objects dinamically. Is this true? Does anyone know a workaround of this?:confused: Any help would be apreciated! Excuse my English if I made a mistake. Ivan. -
Hi everyone.. I have a problem creating a AxMsComm list. This is my code:
public static List<axmscommlib.axmscomm> lstModem = new List<axmscommlib.axmscomm>(); lstModem.Add(new AxMSCommLib.AxMSComm); lstModem[0].Enable = True; lstModem[0].Tag = -1; lstModem[0].CommPort = 1; . .
While I am running my aplication I get the following exception:InvalidActiveXStateException
I searched for this in google and I found that this is because .NET doesn't allow to create new COM objects dinamically. Is this true? Does anyone know a workaround of this?:confused: Any help would be apreciated! Excuse my English if I made a mistake. Ivan.If it is a serial port you need, why don't you use the SerialPort class? :)
Luc Pattyn [Forum Guidelines] [My Articles]
Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in
-
If it is a serial port you need, why don't you use the SerialPort class? :)
Luc Pattyn [Forum Guidelines] [My Articles]
Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in
I was wondering that too :laugh: ! Its not my fault! This aplication is implemented in this way :doh: