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.

96 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. escape.c
  5. Abstract:
  6. Implementation of escape related DDI entry points:
  7. DrvEscape
  8. Environment:
  9. Fax driver, kernel mode
  10. Revision History:
  11. 01/09/96 -davidx-
  12. Created it.
  13. mm/dd/yy -author-
  14. description
  15. --*/
  16. #include "faxdrv.h"
  17. ULONG
  18. DrvEscape(
  19. SURFOBJ *pso,
  20. ULONG iEsc,
  21. ULONG cjIn,
  22. PVOID pvIn,
  23. ULONG cjOut,
  24. PVOID pvOut
  25. )
  26. /*++
  27. Routine Description:
  28. Implementation of DDI entry point DrvEscape.
  29. Please refer to DDK documentation for more details.
  30. Arguments:
  31. pso - Describes the surface the call is directed to
  32. iEsc - Specifies a query
  33. cjIn - Specifies the size in bytes of the buffer pointed to by pvIn
  34. pvIn - Points to input data buffer
  35. cjOut - Specifies the size in bytes of the buffer pointed to by pvOut
  36. pvOut - Points to the output buffer
  37. Return Value:
  38. Depends on the query specified by iEsc parameter
  39. --*/
  40. {
  41. Verbose(("Entering DrvEscape...\n"));
  42. switch (iEsc) {
  43. case QUERYESCSUPPORT:
  44. //
  45. // Query which escapes are supported: The only escape we support
  46. // is QUERYESCSUPPORT itself.
  47. //
  48. if (cjIn != sizeof(ULONG) || !pvIn) {
  49. Error(("Invalid input paramaters\n"));
  50. SetLastError(ERROR_INVALID_PARAMETER);
  51. return DDI_ERROR;
  52. }
  53. if (*((PULONG) pvIn) == QUERYESCSUPPORT)
  54. return TRUE;
  55. break;
  56. default:
  57. Verbose(("Unsupported iEsc: %d\n", iEsc));
  58. break;
  59. }
  60. return FALSE;
  61. }