
Bug with VS .NET 2003 Final Beta Interop...
I'm making a call on an COM object thourgh VB.NET/Interop and getting
a run-time error. The code is from an example posted to the
microsoft.public.dotnet.framework.remoting group several months ago:
http://www.*-*-*.com/
With VS 2003 Final Beta the code compiles fine. When run it bombs at
the following line with the error message "An unhandled exception of
type 'System.InvalidCastException' occured in OPCClient.exe. Addition
information: QueryInterface for interface OPCAutomation.IOPCGroups
failed."
' special interop 'cast' operation:
' http://www.*-*-*.com/ %40cpmsftngxa07
groups = CType(Marshal.CreateWrapperOfType(server.OPCGroups, _
GetType(OPCGroupsClass)), OPCGroupsClass)
It seems that the cast is broken with VS 2003 Final Beta. The code
compiles and runs fine with VS .NET 2002.
Anyone know what's going on? I've been seeing some disturbing posts
regarding changes to VS .NET Interop, is this related?
Thanks,
Bill