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. C#
  4. COM Interface Woes

COM Interface Woes

Scheduled Pinned Locked Moved C#
csharpc++javascriptcomhelp
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.
  • D Offline
    D Offline
    Daaron
    wrote on last edited by
    #1

    I am dynamically connecting to an unmanaged C++ COM interface using GetTypeFromProgID, but I must get a secondary IDispatch interface by calling the "GetBasicCallInfoIDisp" function of that interface. Using this secondary interface, I am trying to get a simple property. The JavaScript is very rudimentary: var winoperdoc = new ActiveXObject("WinOper.Document"); var winoper = winoperdoc.GetBasicCallInfoIDisp(); window.alert(winoper.SeizureID); The C# version I have looks like this: Type objWinOper = Type.GetTypeFromProgID("WinOper.Document"); object objWinOperLateBound = objWinOper.InvokeMember("GetBasicCallInfoIDisp", BindingFlags.CreateInstance, null, objWinOper, new object[]{}); int SeizureID = (int) objWinOper.InvokeMember("SeizureID", BindingFlags.Default | BindingFlags.GetProperty, null, objWinOperLateBound, new object[]{}); This compiles, but I get an "Unknown Name" when I try to get the value from a member property. Any help is appreciated. Cheers, Daaron

    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