T
Terminal882003
Hi,
Here I have a question about MSCommLib. I need to dynamically add
activeX controls that requires run-time license for MSCommLib. The
following is the actual code:
AxMSCommLib.AxMSComm mscomm = new AxMSCommLib.AxMSComm();
string strLicense = "gfjmrfkfifkmkfffrlmmgmhmnlulkmfmqkqj";
System.Reflection.FieldInfo f =
typeof(AxHost).GetField("licenseKey",
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
f.SetValue(mscomm, strLicense);
mscomm.OnComm += new MSCommLib.DMSCommEvents_OnCommEventHandler
(this.mscomm_OnComm);
When I compile the above code, I get an error: "Cannot implicitly
convert type 'MSCommLib.DMSCommEvents_OnCommEventHandler' to
'System.EventHandler'".
Any advice about this problem is more than welcome.
Thanks,
Mindy
Here I have a question about MSCommLib. I need to dynamically add
activeX controls that requires run-time license for MSCommLib. The
following is the actual code:
AxMSCommLib.AxMSComm mscomm = new AxMSCommLib.AxMSComm();
string strLicense = "gfjmrfkfifkmkfffrlmmgmhmnlulkmfmqkqj";
System.Reflection.FieldInfo f =
typeof(AxHost).GetField("licenseKey",
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
f.SetValue(mscomm, strLicense);
mscomm.OnComm += new MSCommLib.DMSCommEvents_OnCommEventHandler
(this.mscomm_OnComm);
When I compile the above code, I get an error: "Cannot implicitly
convert type 'MSCommLib.DMSCommEvents_OnCommEventHandler' to
'System.EventHandler'".
Any advice about this problem is more than welcome.
Thanks,
Mindy