Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual C++
Compiler Options
 /GH (Enable _pexit Hook Function)
Collapse All/Expand All Collapse All
Visual C++ Compiler Options
/GH (Enable _pexit Hook Function)

Calls the _pexit function at the end of every method or function.

/GH

The _pexit function is not part of any library and it is up to you to provide a definition for _pexit.

Unless you plan to explicitly call _pexit, you do not need to provide a prototype. The function must appear as if it had the following prototype, and it must push the content of all registers on entry and pop the unchanged content on exit:

void __declspec(naked) _cdecl _pexit( void );

_pexit is similar to _penter; see /Gh (Enable _penter Hook Function) for an example of how to write a _pexit function.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the Command Line property page.

  4. Type the compiler option in the Additional Options box.

To set this compiler option programmatically

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker