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.

74 lines
1.7 KiB

  1. /*************************************************************************
  2. *
  3. * video.c
  4. *
  5. * This module contains routines for managing the ICA video channel.
  6. *
  7. * Copyright 1998, Microsoft.
  8. *
  9. *************************************************************************/
  10. /*
  11. * Includes
  12. */
  13. #include <precomp.h>
  14. #pragma hdrstop
  15. NTSTATUS
  16. IcaDeviceControlVideo(
  17. IN PICA_CHANNEL pChannel,
  18. IN PIRP Irp,
  19. IN PIO_STACK_LOCATION IrpSp
  20. )
  21. /*++
  22. Routine Description:
  23. This is the DeviceControl routine for the ICA video channel.
  24. Arguments:
  25. pChannel -- pointer to ICA_CHANNEL object
  26. Irp - Pointer to I/O request packet
  27. IrpSp - pointer to the stack location to use for this request.
  28. Return Value:
  29. NTSTATUS -- Indicates whether the request was successfully queued.
  30. --*/
  31. {
  32. SD_IOCTL SdIoctl;
  33. NTSTATUS Status;
  34. CLONG Method;
  35. // Verify the buffer method.
  36. Method = IrpSp->Parameters.DeviceIoControl.IoControlCode & 0x03;
  37. ASSERT( Method == METHOD_BUFFERED );
  38. if ( Method != METHOD_BUFFERED ) {
  39. Status = STATUS_INVALID_DEVICE_REQUEST;
  40. }
  41. else {
  42. SdIoctl.BytesReturned = 0;
  43. SdIoctl.IoControlCode = IrpSp->Parameters.DeviceIoControl.IoControlCode;
  44. SdIoctl.InputBuffer = Irp->AssociatedIrp.SystemBuffer;
  45. SdIoctl.InputBufferLength = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
  46. SdIoctl.OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
  47. SdIoctl.OutputBufferLength = IrpSp->Parameters.DeviceIoControl.OutputBufferLength;
  48. Status = IcaCallDriver( pChannel, SD$IOCTL, &SdIoctl );
  49. Irp->IoStatus.Information = SdIoctl.BytesReturned;
  50. }
  51. return( Status );
  52. }