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.

79 lines
2.0 KiB

  1. /****************************************************************************/
  2. // mouse.c
  3. //
  4. // Mouse IOCTL handlers.
  5. //
  6. // Copyright (C) 1996 Citrix Systems Inc.
  7. // Copyright (C) 1997-1999 Microsoft Corp.
  8. /****************************************************************************/
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif /* __cplusplus */
  12. #include <precomp.h>
  13. #pragma hdrstop
  14. #include <adcg.h>
  15. #include <nwdwapi.h>
  16. #include <nwdwint.h>
  17. /*============================================================================
  18. == External procedures defined
  19. ============================================================================*/
  20. NTSTATUS MouseQueryAttributes( PTSHARE_WD, PSD_IOCTL );
  21. /*****************************************************************************
  22. *
  23. * MouseQueryAttributes
  24. *
  25. * return the mouse attributes
  26. *
  27. * typedef struct _MOUSE_ATTRIBUTES {
  28. * USHORT MouseIdentifier;
  29. * USHORT NumberOfButtons;
  30. * USHORT SampleRate;
  31. * ULONG InputDataQueueLength;
  32. * } MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES;
  33. *
  34. *
  35. * ENTRY:
  36. * pWd (input)
  37. * Pointer to wd data structure
  38. * pSdIoctl (input/output)
  39. * input - nothing
  40. * output - MOUSE_ATTRIBUTES
  41. *
  42. * EXIT:
  43. * STATUS_SUCCESS - no error
  44. *
  45. ****************************************************************************/
  46. NTSTATUS
  47. MouseQueryAttributes( PTSHARE_WD pWd, PSD_IOCTL pSdIoctl )
  48. {
  49. PMOUSE_ATTRIBUTES pAttrib;
  50. if ( pSdIoctl->OutputBufferLength < sizeof(MOUSE_ATTRIBUTES) )
  51. return( STATUS_BUFFER_TOO_SMALL );
  52. pAttrib = (PMOUSE_ATTRIBUTES)pSdIoctl->OutputBuffer;
  53. pAttrib->MouseIdentifier = MOUSE_SERIAL_HARDWARE;
  54. pAttrib->NumberOfButtons = 3;
  55. pAttrib->SampleRate = 40;
  56. pAttrib->InputDataQueueLength = 100;
  57. pSdIoctl->BytesReturned = sizeof(MOUSE_ATTRIBUTES);
  58. return( STATUS_SUCCESS );
  59. }
  60. #ifdef __cplusplus
  61. }
  62. #endif /* __cplusplus */