本文整理汇总了C++中LtDebugPrint函数的典型用法代码示例。如果您正苦于以下问题:C++ LtDebugPrint函数的具体用法?C++ LtDebugPrint怎么用?C++ LtDebugPrint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LtDebugPrint函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LpxTdiIoCallDriver
NTSTATUS
LpxTdiIoCallDriver(
IN PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp,
IN PIO_STATUS_BLOCK IoStatusBlock,
IN PKEVENT Event,
IN PLARGE_INTEGER TimeOut
)
{
NTSTATUS ntStatus;
NTSTATUS wait_status;
// LARGE_INTEGER timeout;
//
// set a expire time to IRP.
// LPX takes whole charge of IRP completion.
// LPX will measure time-out.
// Do not wait with time-out here.
// BSOD may occur if you do.
//
// added by hootch 02092004
if(TimeOut)
SET_IRP_EXPTIME(Irp, CurrentTime().QuadPart + TimeOut->QuadPart);
else
SET_IRP_EXPTIME(Irp, 0);
ntStatus = IoCallDriver(
DeviceObject,
Irp
);
if(ntStatus == STATUS_PENDING) {
if(Event) {
wait_status = KeWaitForSingleObject(
Event,
Executive,
KernelMode,
FALSE,
NULL
);
if(wait_status != STATUS_SUCCESS) {
LtDebugPrint(1, ("[LpxTdi] LpxTdiIoCallDriver: Wait for event Failed.\n"));
return STATUS_CONNECTION_DISCONNECTED; // STATUS_TIMEOUT;
}
} else {
return ntStatus;
}
}
ntStatus = IoStatusBlock->Status;
return ntStatus;
}
示例2: LpxTdiQueryInformation
NTSTATUS
LpxTdiQueryInformation(
IN PFILE_OBJECT ConnectionFileObject,
IN ULONG QType,
IN PVOID Buffer,
IN ULONG BufferLen
)
{
NTSTATUS status;
KEVENT event;
PDEVICE_OBJECT deviceObject;
PIRP irp;
IO_STATUS_BLOCK ioStatusBlock;
PMDL mdl;
if (QType != TDI_QUERY_CONNECTION_INFO)
return STATUS_NOT_IMPLEMENTED;
if (BufferLen != sizeof(TDI_CONNECTION_INFO))
return STATUS_INVALID_PARAMETER;
LtDebugPrint (3, ("[LpxTdi] LpxTdiQueryInformation: Entered\n"));
KeInitializeEvent( &event, NotificationEvent, FALSE );
deviceObject = IoGetRelatedDeviceObject( ConnectionFileObject );
irp = TdiBuildInternalDeviceControlIrp( TDI_QUERY_INFORMATION,
deviceObject,
connectionFileObject,
&event,
&ioStatusBlock );
if (irp == NULL) {
LtDebugPrint( 1, ("[LpxTdi] LpxTdiQueryInformation: Can't Build IRP.\n") );
return STATUS_INSUFFICIENT_RESOURCES;
}
mdl = IoAllocateMdl( Buffer,
BufferLen,
FALSE,
FALSE,
irp );
if (mdl == NULL) {
LtDebugPrint( 1, ("[LpxTdi] LpxTdiQueryInformation: Can't Allocate MDL.\n") );
IoFreeIrp( irp );
return STATUS_INSUFFICIENT_RESOURCES;
}
MmBuildMdlForNonPagedPool( mdl );
TdiBuildQueryInformation( irp,
deviceObject,
ConnectionFileObject,
LpxTdiQueryInformationCompletionRoutine,
NULL,
QType,
mdl );
status = LpxTdiIoCallDriver( deviceObject, irp, NULL, NULL, TRUE );
#if DBG
if (status != STATUS_SUCCESS) {
LtDebugPrint(1, ("[LpxTdi]LpxTdiQueryInformation: Failed. STATUS=%08lx\n", status));
}
#endif
return status;
}