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.

88 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. rdwr.c
  5. Abstract:
  6. This module contains the code for a serial imaging devices
  7. suport class driver.
  8. Author:
  9. Vlad Sadovsky vlads 10-April-1998
  10. Environment:
  11. Kernel mode
  12. Revision History :
  13. vlads 04/10/1998 Created first draft
  14. --*/
  15. #include "serscan.h"
  16. #include "serlog.h"
  17. #if DBG
  18. extern ULONG SerScanDebugLevel;
  19. #endif
  20. #ifdef ALLOC_PRAGMA
  21. #pragma alloc_text(PAGE, SerScanReadWrite)
  22. #endif
  23. NTSTATUS
  24. SerScanReadWrite(
  25. IN PDEVICE_OBJECT DeviceObject,
  26. IN PIRP Irp
  27. )
  28. /*++
  29. Routine Description:
  30. This routine is the dispatch for read and write requests.
  31. Arguments:
  32. DeviceObject - Supplies the device object.
  33. Irp - Supplies the I/O request packet.
  34. Return Value:
  35. STATUS_SUCCESS - Success.
  36. STATUS_PENDING - Request pending.
  37. STATUS_INVALID_PARAMETER - Invalid parameter.
  38. --*/
  39. {
  40. NTSTATUS Status;
  41. PDEVICE_EXTENSION Extension;
  42. PAGED_CODE();
  43. Extension = DeviceObject->DeviceExtension;
  44. //
  45. // Call down to the parent but don't wait...we'll get an IoCompletion callback.
  46. //
  47. Status = SerScanCallParent(Extension,
  48. Irp,
  49. NO_WAIT,
  50. SerScanCompleteIrp);
  51. DebugDump(SERIRPPATH,
  52. ("SerScan: [Read/Write] After CallParent Status = %x\n",
  53. Status));
  54. return Status;
  55. }