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. Close AUTOMATION Process

Close AUTOMATION Process

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

    I use automation to launch Excel, it's work but i don't know how do you do to close Excel process. I use CLSIDFromProgID and GetActive Object to start excel automation. I search a exemple to close automation. Thanks Jerome

    F 1 Reply Last reply
    0
    • J jerome_data

      I use automation to launch Excel, it's work but i don't know how do you do to close Excel process. I use CLSIDFromProgID and GetActive Object to start excel automation. I search a exemple to close automation. Thanks Jerome

      F Offline
      F Offline
      FearlessBurner
      wrote on last edited by
      #2

      In order to attach to Excel, you will have called CreateDispatch() and/or AttachDispatch(). There is a corresponding function ReleaseDispatch() which you can call when you do not need the interface open any longer. Alternatively, you could use the second parameter of void AttachDispatch( LPDISPATCH lpDispatch, BOOL bAutoRelease = TRUE ) to autorelease the interface for you. Note that Excel, or any other automaton, will not close until all the attached interfaces have been released.

      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