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. COM
  4. ActiveX property - Visible in object viewer?!

ActiveX property - Visible in object viewer?!

Scheduled Pinned Locked Moved COM
comquestioncsharpcareer
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
    Daniel Strigl
    wrote on last edited by
    #1

    Hi guys! How can add a property of type IAnyComInterace* to my ActiveX component, so that it will be visible in the object viewer of Visual Basic or Visual C#? I have a ActiveX component IMyFirstActiveX and a second ActiveX component IMySecondActiveX. I added a property NextLogTarget of type IMyFirstActiveX to my IMySecondActiveX component. When I try to assign the one ActiveX component to the property of the other ActiveX component in the source code, like (VB sample)

    secondActiveX.NextLogTarget = firstActiveX

    it works fine, but when I try to assign it in the object viewer of Visual Basic it will not exepted! I have tried severl methods of the property, here are the IDL's:

    [propget, id(1), helpstring("property NextLogTarget")]
    HRESULT NextLogTarget([out, retval] IUnknown* *pVal);
    [propput, id(1), helpstring("property NextLogTarget")]
    HRESULT NextLogTarget([in] IUnknown* newVal);

    [propget, id(1), helpstring("property NextLogTarget")]
    HRESULT NextLogTarget([out, retval] IDispatch* *pVal);
    [propput, id(1), helpstring("property NextLogTarget")]
    HRESULT NextLogTarget([in] IDispatch* newVal);

    [propget, id(1), helpstring("property NextLogTarget")]
    HRESULT NextLogTarget([out, retval] VARIANT *pVal);
    [propput, id(1), helpstring("property NextLogTarget")]
    HRESULT NextLogTarget([in] VARIANT newVal);

    How can I create a property of type of a COM interface, so that it work in the object viewer of Visual Basic or Visual C#??? Cheers, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)

    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