I have the following (quick snip, not real):
Class MyWizard
Inherits EnvDTE.IDTWizard
Public Sub Execute(..., ContextParams As Object(), ...)
End Sub
End Class
I'm trying to convert the 2nd item in teh ContextParams object array to an
object. The problem is, all I have is an Interface type defined for it
(EnvDTE.ProjectItems interface). There is no object which implements this
that I can find in the EnvDTE library. So, how can I go about converting
the __ComObject to an object with the EnvDTE.ProjectItems interface?
TypeName(ContextParams(2)) = "ProjectItems"
GetType(ContextParams(2)).ToString() = "System.__ComObject"
The following does not work because it expects a class, not an interface:
mProjectItems =
System.Runtime.InteropServices.Marshal.CreateWrapperOfType(ContextParams(2),
GetType(EnvDTE.ProjectItems))
All help appreciated
Mythran