1 2 #include <precomp.h> 3 4 typedef void (__cdecl *MSVCRT_purecall_handler)(void); 5 6 static MSVCRT_purecall_handler purecall_handler = NULL; 7 8 /* _set_purecall_handler - not exported in native msvcrt */ 9 MSVCRT_purecall_handler CDECL _set_purecall_handler(MSVCRT_purecall_handler function) 10 { 11 MSVCRT_purecall_handler ret = purecall_handler; 12 13 TRACE("(%p)\n", function); 14 purecall_handler = function; 15 return ret; 16 } 17 18 /********************************************************************* 19 * _purecall (MSVCRT.@) 20 */ 21 void CDECL _purecall(void) 22 { 23 if(purecall_handler) 24 purecall_handler(); 25 _amsg_exit( 25 ); 26 } 27 28