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. Problem with OleCreateLinkToFile()

Problem with OleCreateLinkToFile()

Scheduled Pinned Locked Moved COM
comhelptutorial
2 Posts 2 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.
  • J Offline
    J Offline
    Jurgen Jung
    wrote on last edited by
    #1

    My problem is not the function OleCreateLinkToFile() itself, but the resulting pointer. ppvObj [out] Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObj contains the requested interface pointer on the newly created object. Is there any way to get the interface-pointer to the "real" com-object itself. For example, if i open a word document can i get the interface-pointer of the shown word.document or running word.application starting from the ppvObj-pointer. My understanding of OLE is not good enough to see the right way (hope there is one :~ ).

    J 1 Reply Last reply
    0
    • J Jurgen Jung

      My problem is not the function OleCreateLinkToFile() itself, but the resulting pointer. ppvObj [out] Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObj contains the requested interface pointer on the newly created object. Is there any way to get the interface-pointer to the "real" com-object itself. For example, if i open a word document can i get the interface-pointer of the shown word.document or running word.application starting from the ppvObj-pointer. My understanding of OLE is not good enough to see the right way (hope there is one :~ ).

      J Offline
      J Offline
      Jorgen Sigvardsson
      wrote on last edited by
      #2

      The second parameter tells the function what interface reference you want to the object. There is no "real" object - there are only interface pointers. If you want another interface of the object, you can always QueryInterface() to get it. -- Pictures[^] from my Japan trip.

      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