Share via


IDebugProgram2::Terminate

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Terminates the program.

Syntax

HRESULT Terminate(   
   void   
);  
int Terminate();  

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

If possible, the program will be terminated and unloaded from the process; otherwise, the debug engine (DE) will perform any necessary cleanup.

This method or the Terminate method is called by the IDE, typically in response to the user halting all debugging. The implementation of this method should, ideally, terminate the program within the process. If this is not possible, the DE should prevent the program from running any more in this process (and do any necessary cleanup). If the IDebugProcess2::Terminate method was called by the IDE, the entire process will be terminated sometime after the IDebugProgram2::Terminate method is called.

See Also

IDebugProgram2
Terminate