windows-nt/Source/XPSP1/NT/printscan/wia/kernel/serscan/rdwr.c
2020-09-26 16:20:57 +08:00

89 lines
1.5 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
rdwr.c
Abstract:
This module contains the code for a serial imaging devices
suport class driver.
Author:
Vlad Sadovsky vlads 10-April-1998
Environment:
Kernel mode
Revision History :
vlads 04/10/1998 Created first draft
--*/
#include "serscan.h"
#include "serlog.h"
#if DBG
extern ULONG SerScanDebugLevel;
#endif
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, SerScanReadWrite)
#endif
NTSTATUS
SerScanReadWrite(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
/*++
Routine Description:
This routine is the dispatch for read and write requests.
Arguments:
DeviceObject - Supplies the device object.
Irp - Supplies the I/O request packet.
Return Value:
STATUS_SUCCESS - Success.
STATUS_PENDING - Request pending.
STATUS_INVALID_PARAMETER - Invalid parameter.
--*/
{
NTSTATUS Status;
PDEVICE_EXTENSION Extension;
PAGED_CODE();
Extension = DeviceObject->DeviceExtension;
//
// Call down to the parent but don't wait...we'll get an IoCompletion callback.
//
Status = SerScanCallParent(Extension,
Irp,
NO_WAIT,
SerScanCompleteIrp);
DebugDump(SERIRPPATH,
("SerScan: [Read/Write] After CallParent Status = %x\n",
Status));
return Status;
}