Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-28-2006, 11:32 AM
onurcivi onurcivi is offline
Registered User
 
Join Date: 06-28-2006
Posts: 1
Post Send a Cancel Signal to VisBuildCmd from an app

Hi,

I have a web application that allows internal users to view available build projects (all .bld files in a specific folder) and request builds. When a user requests a build, this web application invokes VisBuildCmd with the /b switch. This web application doesn't use the object model at all, it just calls the VisBuildCmd with the project name.

I would like to add the option to cancel the build to the web application and I could not find an easy way of doing this. Since I am not using the object model, the Stop method of the builder object is not available to me. Only thing that is available to me in the app is the Process Id of VisBuildCmd, and I just did not want to prematurely terminate this process from my app when a user wants to cancel the build. Is there anything I can pass to the VisBuildCmd.exe process to tell it to cancel the build, can you think of any other ways of accomplishing this?

Thank you
Reply With Quote
  #2  
Old 06-28-2006, 03:09 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,013
If you launch VisBuildCmd.exe via the CreateProcess [1] or related API and include the CREATE_NEW_PROCESS_GROUP flag, you could use the GenerateConsoleCtrlEvent [2] API to send it a CTRL_BREAK_EVENT. Otherwise, you would have to just terminate the process (for instance, using taskkill [3]).

[1] http://msdn.microsoft.com/library/de...ateprocess.asp
[2] http://msdn.microsoft.com/library/de...ectrlevent.asp
[3] http://www.microsoft.com/resources/d....mspx?mfr=true
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:48 AM.


Copyright © 1999-2023 Kinook Software, Inc.