Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. DispatchWrapper gives error

DispatchWrapper gives error

Scheduled Pinned Locked Moved Visual Basic
helpcsharpc++com
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Uday Bhaskar
    wrote on last edited by
    #1

    I have a vc++6.0 dll(ATL COM), a method in the dll takes a Variant(of type VT_DISPATCH) parameter as input. I am using this dll in vb.Net by imptlb process. The problem is that I am unable to pass the VT_DISPATCH type to my method. I am trying to use DispatchWrapper class as per MSDN but it gives unsupported interface error. Can any one help me out, its a bit urgent. I face the same problem in c# too. A solution in c# or vb.Net will do for me :-)). IDL Method Signature ==================== Compress([in,out] VARIANT* DocumentObject, [out,retval] short* retVal); DocumentObject is of type VT_DISPATCH. vb.Net code snippet ==================== Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Comp As New XMLCOMPRESSIONLib.JNIXMLCompressionClass() Dim XmlDoct As New Xml.XmlDocument() Dim XYZ As Short XmlDoct.Load("C:\DEXML\asdfa.xml") **XYZ = Comp.Compress(DispatchWrapper(XmlDoct))** MessageBox.Show(XmlDoct.InnerXml) End Sub I get error "Interface not supported" when I call compress with dispatch wrapper tyepcast.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups