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. Web Development
  3. ASP.NET
  4. shutdown external application

shutdown external application

Scheduled Pinned Locked Moved ASP.NET
csharphelptutorialasp-net
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.
  • I Offline
    I Offline
    Ibana
    wrote on last edited by
    #1

    Hi, I have a problem where I want to shutdown an external win32 software client from my C#/ASP.net application by pressing a button. I understand that I have to use WM_CLOSE somehow but I dont know how to use it in my C# solution. I use shelling (VBscript) to lanuch external software on my computer: Example: function() ... objShell.run ("""C:\Program Files\Overview\Overview.exe""- u testuser - p testuser endfunction() This works great but if the application( in this case overview.exe) is already running I want to be able to shut it down by pressing a button before I lanuch it . Please help! /Ibana

    I 1 Reply Last reply
    0
    • I Ibana

      Hi, I have a problem where I want to shutdown an external win32 software client from my C#/ASP.net application by pressing a button. I understand that I have to use WM_CLOSE somehow but I dont know how to use it in my C# solution. I use shelling (VBscript) to lanuch external software on my computer: Example: function() ... objShell.run ("""C:\Program Files\Overview\Overview.exe""- u testuser - p testuser endfunction() This works great but if the application( in this case overview.exe) is already running I want to be able to shut it down by pressing a button before I lanuch it . Please help! /Ibana

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      Youw ill send to call sendMessage on the process. First you must get a handle to the process and save that inside IntPrt. Then call the SendMessage function. You will have to use PInvoke to register the SendMessage function Its located in the windows API http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21666702.html[^] 1 line of code equals many bugs. So don't write any!!

      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