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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting ProcessID from CoCreateInstance

Getting ProcessID from CoCreateInstance

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
4 Posts 3 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.
  • R Offline
    R Offline
    Rajesh_Parameswaran
    wrote on last edited by
    #1

    Hi there, I'm using VC++ 7.0 wherein I'm trying to launch an exe using CoCreateInstance. I've the executable path, but don't want to run thru the entire process list to find out the process id. So is there a way to get the process ID directly from an CoCreateInstance for an executable of type CLSCTX_LOCAL_SERVER? thanks in advance. regards, Rajesh

    A T 2 Replies Last reply
    0
    • R Rajesh_Parameswaran

      Hi there, I'm using VC++ 7.0 wherein I'm trying to launch an exe using CoCreateInstance. I've the executable path, but don't want to run thru the entire process list to find out the process id. So is there a way to get the process ID directly from an CoCreateInstance for an executable of type CLSCTX_LOCAL_SERVER? thanks in advance. regards, Rajesh

      A Offline
      A Offline
      App_
      wrote on last edited by
      #2

      more here and here

      T 1 Reply Last reply
      0
      • R Rajesh_Parameswaran

        Hi there, I'm using VC++ 7.0 wherein I'm trying to launch an exe using CoCreateInstance. I've the executable path, but don't want to run thru the entire process list to find out the process id. So is there a way to get the process ID directly from an CoCreateInstance for an executable of type CLSCTX_LOCAL_SERVER? thanks in advance. regards, Rajesh

        T Offline
        T Offline
        TheGreatAndPowerfulOz
        wrote on last edited by
        #3

        If the local COM server is your code, then you could implement an interface that would tell you that. However, in general, it's not possible -- by design.

        If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
        You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun

        1 Reply Last reply
        0
        • A App_

          more here and here

          T Offline
          T Offline
          TheGreatAndPowerfulOz
          wrote on last edited by
          #4

          The first link you provide, while interesting, has nothing to do with the question.

          If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
          You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun

          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