Skip to content

Instantly share code, notes, and snippets.

@gpakosz
Created February 7, 2013 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gpakosz/4730132 to your computer and use it in GitHub Desktop.
Save gpakosz/4730132 to your computer and use it in GitHub Desktop.
suppress Microsoft CRT dialog box
#ifdef _WIN32
int stfuHook(int, char*, int* returnValue)
{
if (returnValue)
*returnValue = 0;
return true;
}
#endif
int main(int argc, char * argv[])
{
#ifdef _WIN32
_CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, stfuHook);
#endif
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment