G
Guest
Hi I am upgrading some vb6 code to vb.net and I am having difficulty
correcting a casting error while working with a COM object.
In vb6 the code is:
Dim oNewED As EmbeddedDirective
Set oNewED = oMsgServer.EmbeddedDirectives.New
In vb.net the code is:
Dim oNewED As EmbeddedDirective
oNewED = oMsgServer.EmbeddedDirectives
The casting error occurs in " oNewED = oMsgServer.EmbeddedDirectives".
EmbeddedDirectives returns a object that will not cast to the
EmbeddedDirective class in .net. However in vb6 it seems to be cast
successfully. A difference between the two is the ".New" I am not sure what
this means, it is not in the object model. I would appreciate any assistance
that you could give.
Thanks,
Eric
correcting a casting error while working with a COM object.
In vb6 the code is:
Dim oNewED As EmbeddedDirective
Set oNewED = oMsgServer.EmbeddedDirectives.New
In vb.net the code is:
Dim oNewED As EmbeddedDirective
oNewED = oMsgServer.EmbeddedDirectives
The casting error occurs in " oNewED = oMsgServer.EmbeddedDirectives".
EmbeddedDirectives returns a object that will not cast to the
EmbeddedDirective class in .net. However in vb6 it seems to be cast
successfully. A difference between the two is the ".New" I am not sure what
this means, it is not in the object model. I would appreciate any assistance
that you could give.
Thanks,
Eric