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.

89 lines
1.7 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 driver.
  7. I/O control routine
  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, SerScanDeviceControl)
  22. #endif
  23. NTSTATUS
  24. SerScanDeviceControl(
  25. IN PDEVICE_OBJECT DeviceObject,
  26. IN PIRP Irp
  27. )
  28. /*++
  29. Routine Description:
  30. This routine is the dispatch for device control 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_BUFFER_TOO_SMALL - Buffer too small.
  38. STATUS_INVALID_PARAMETER - Invalid io control request.
  39. --*/
  40. {
  41. NTSTATUS Status;
  42. PDEVICE_EXTENSION Extension;
  43. PAGED_CODE();
  44. Extension = DeviceObject->DeviceExtension;
  45. //
  46. // Call down to the parent but don't wait...we'll get an IoCompletion callback.
  47. //
  48. Status = SerScanCallParent(Extension,
  49. Irp,
  50. NO_WAIT,
  51. SerScanCompleteIrp);
  52. DebugDump(SERIRPPATH,
  53. ("SerScan: [Cleanup] After CallParent Status = %x\n",
  54. Status));
  55. return Status;
  56. }