# Ifdef Unicode <br/> # UNDEF Unicode <br/> # endif <br/> # include <RPC. h> <br/> # include <stdio. h> <br/> # include <stdlib. h> <br/> # include <Io. h> <br/> # include <fcntl. h> <br/> # include <stdarg. h> <br/> # include <windows. h> <br/> # define security_win32 <br/> # include <security. h> <br/> # include <ntsecapi. h> <br/> # include <time. h> <br/> file * LOG_FILE; <br/> inline void sspi_log (const char * szinfo ,...) <br/>{< br/> char szdata [1024] = {0 }; <br/> va_list ARGs; <br/> time_t rawtime; <br/> struct TM * timep; <br/> If (LOG_FILE) <br/>{< br/> va_start (ARGs, szinfo ); <br/> _ vsnprintf_s (szdata, sizeof (szdata)-1, szinfo, argS); <br/> va_end (ARGs ); </P> <p> time (& rawtime); <br/> timep = localtime (& rawtime); </P> <p> fprintf (LOG_FILE, "% d-% d: % d", (1900 + timep-> tm_year), (1 + timep-> tm_mon ), timep-> tm_mday, <br/> timep-> tm_hour, timep-> tm_min, timep-> tm_sec); <br/> fprintf (LOG_FILE, szdata ); <br/>}< br/> inline void sspi_debug (const char * szinfo ,...) <br/>{< br/> char szdata [1024] = {0 };< br/> va_list ARGs; </P> <p> va_start (ARGs, szinfo ); <br/> _ vsnprintf_s (szdata, sizeof (szdata)-1, szinfo, argS); <br/> va_end (ARGs); <br/> outputdebugstring (szdata ); <br/>}< br/>