NTSTATUS Recibir(PDEVICE_OBJECT DeviceObject,PIRP Irp)
{
NTSTATUS s=STATUS_SUCCESS;
PIO_STACK_LOCATION Stack;
PVOID inputBuffer;
ULONG inputBufferLength;
ULONG ioControlCode;
ANSI_STRING strf;
Stack=IoGetCurrentIrpStackLocation(Irp);
__try
{
inputBuffer = Irp->AssociatedIrp.SystemBuffer;
inputBufferLength = Stack->Parameters.DeviceIoControl.InputBufferLength;
ioControlCode = Stack->Parameters.DeviceIoControl.IoControlCode;
DbgPrint("Buffer: %s", inputBuffer);
DbgPrint("Longitud: %d", inputBufferLength);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
DbgPrint("Exception");
}
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return s;
}