Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
1.4 KiB

//+-----------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (c) Microsoft Corporation 1991 - 1997
//
// File: KSecDD.C
//
// Contents: Base level stuff for the device driver
//
//
// History: 19 May 92, RichardW Blatently stolen from DarrylH
// 15 Dec 97, AdamBa Modified from private\lsa\crypt\ssp
//
//------------------------------------------------------------------------
#include <rdrssp.h>
#if DBG
ULONG KsecInfoLevel;
void
KsecDebugOut(unsigned long Mask,
const char * Format,
...)
{
PETHREAD pThread;
PEPROCESS pProcess;
va_list ArgList;
char szOutString[256] = {0};
if (KsecInfoLevel & Mask)
{
pThread = PsGetCurrentThread();
pProcess = PsGetCurrentProcess();
va_start(ArgList, Format);
DbgPrint("%#x.%#x> KSec: ", pProcess, pThread);
if (_vsnprintf(szOutString, sizeof(szOutString) - 1, Format, ArgList) < 0)
{
//
// Less than zero indicates that the string could not be
// fitted into the buffer. Output a special message indicating
// that:
//
DbgPrint("Error printing message\n");
}
else
{
DbgPrint(szOutString);
}
}
}
#endif