NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

/GH (Enable __pexit Hook Function)

/GH

This option calls the __pexit function at the end of every method or function. The __pexit function is not part of any library and it is up to you to provide a definition for __pexit. Use assembly language to write the function.

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 for an example of how to write a __pexit function.

See Also

Compiler Options | Setting Compiler Options