59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
//////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (c) 2001 Microsoft Corporation
|
|
//
|
|
// Module Name:
|
|
// misc.cpp
|
|
//
|
|
// Abstract:
|
|
// This module contains code which implements various misc
|
|
// commands from the dll
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
// --------------------------------------------------------------------
|
|
//
|
|
// Function: DoDebugLevel
|
|
//
|
|
// Arguments: ulLevel -- debug level to set driver to
|
|
//
|
|
// Returns: none
|
|
//
|
|
// Descript: This function sets the amount of debug output generated by
|
|
// the driver (tdisample.sys)
|
|
//
|
|
//---------------------------------------------------------------------
|
|
|
|
|
|
VOID
|
|
DoDebugLevel(ULONG ulLevel)
|
|
{
|
|
RECEIVE_BUFFER ReceiveBuffer; // return info from command
|
|
SEND_BUFFER SendBuffer; // arguments for command
|
|
|
|
//
|
|
// set up arguments
|
|
//
|
|
SendBuffer.COMMAND_ARGS.ulDebugLevel = ulLevel & 0x0000FFFF;
|
|
|
|
//
|
|
// call the driver
|
|
//
|
|
NTSTATUS lStatus = TdiLibDeviceIO(ulDEBUGLEVEL,
|
|
&SendBuffer,
|
|
&ReceiveBuffer);
|
|
|
|
if (lStatus != STATUS_SUCCESS)
|
|
{
|
|
_tprintf(TEXT("DoDebugLevel: failure, status = %s\n"), TdiLibStatusMessage(lStatus));
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// end of misc.cpp
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|