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.

51 lines
1.3 KiB

  1. /*************************************************************************
  2. *
  3. * beep.c
  4. *
  5. * This module contains routines for managing the Termdd beep channel.
  6. *
  7. * Copyright 1998, Microsoft.
  8. *
  9. *************************************************************************/
  10. /*
  11. * Includes
  12. */
  13. #include <precomp.h>
  14. #pragma hdrstop
  15. #include <ntddbeep.h>
  16. NTSTATUS
  17. IcaDeviceControlBeep(
  18. IN PICA_CHANNEL pChannel,
  19. IN PIRP Irp,
  20. IN PIO_STACK_LOCATION IrpSp
  21. )
  22. {
  23. SD_IOCTL SdIoctl;
  24. NTSTATUS Status;
  25. CLONG Method;
  26. // Verify the buffer method.
  27. Method = IrpSp->Parameters.DeviceIoControl.IoControlCode & 0x03;
  28. ASSERT( Method == METHOD_BUFFERED );
  29. if ( Method != METHOD_BUFFERED ) {
  30. Status = STATUS_INVALID_DEVICE_REQUEST;
  31. }
  32. else {
  33. SdIoctl.IoControlCode = IrpSp->Parameters.DeviceIoControl.IoControlCode;
  34. SdIoctl.InputBuffer = Irp->AssociatedIrp.SystemBuffer;
  35. SdIoctl.InputBufferLength = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
  36. SdIoctl.OutputBuffer = Irp->UserBuffer;
  37. SdIoctl.OutputBufferLength = IrpSp->Parameters.DeviceIoControl.OutputBufferLength;
  38. Status = IcaCallDriver( pChannel, SD$IOCTL, &SdIoctl );
  39. }
  40. return( Status );
  41. }