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.

88 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. All Rights Reserved
  4. Module Name:
  5. DynaDefs.h
  6. Abstract:
  7. Definitons & Declarations for global info
  8. Author: M. Fenelon
  9. Revision History:
  10. --*/
  11. #ifndef DYNADEFS_H
  12. #define DYNADEFS_H
  13. //
  14. // Default timeout values
  15. //
  16. #define READ_TIMEOUT_MULTIPLIER 0
  17. #define READ_TIMEOUT_CONSTANT 60000
  18. #define WRITE_TIMEOUT_MULTIPLIER 0
  19. #define WRITE_TIMEOUT_CONSTANT 60000
  20. //
  21. // Sizes
  22. //
  23. #define MAX_PORT_LEN 20
  24. #define MAX_PORT_DESC_LEN 60
  25. #define MAX_DEVICE_PATH 256
  26. #define PAR_QUERY_TIMEOUT 5000
  27. static const GUID USB_PRINTER_GUID =
  28. { 0x28d78fad, 0x5a12, 0x11d1, { 0xae, 0x5b, 0x0, 0x0, 0xf8, 0x3, 0xa8, 0xc2}};
  29. extern TCHAR cszUSB[];
  30. extern TCHAR cszDOT4[];
  31. extern TCHAR cszTS[];
  32. extern TCHAR csz1394[];
  33. extern TCHAR cszBaseName[];
  34. extern TCHAR cszPortNumber[];
  35. extern TCHAR cszRecyclable[];
  36. extern TCHAR cszPortDescription[];
  37. extern TCHAR cszMaxBufferSize[];
  38. extern TCHAR cszUSBPortDesc[];
  39. extern TCHAR cszDot4PortDesc[];
  40. extern TCHAR csz1394PortDesc[];
  41. extern TCHAR cszTSPortDesc[];
  42. enum PORTTYPE { USBPORT, DOT4PORT, TSPORT, P1394PORT, PARPORT, UNKNOWNPORT };
  43. #define DYNAMON_SIGNATURE 0x89AB
  44. //
  45. // Shortcuts for all Critical Section routines
  46. //
  47. #define ECS(arg1) EnterCriticalSection( &arg1 )
  48. #define LCS(arg1) LeaveCriticalSection( &arg1 )
  49. #define ICS(arg1) InitializeCriticalSection( &arg1 )
  50. #define DCS(arg1) DeleteCriticalSection( &arg1 )
  51. #define IF_INVALID_PORT_FAIL( pPort ) if ( !pPort || ( pPort->dwSignature != DYNAMON_SIGNATURE ) ) \
  52. { SetLastError(ERROR_PATH_NOT_FOUND); return FALSE; }
  53. #define SET_FLAGS 0
  54. #define ADD_FLAGS 1
  55. #define CLEAR_FLAGS 2
  56. // Define for Port Flags
  57. #define DYNAMON_STARTDOC 0x00000001
  58. #define JOB_ABORTCHECK_TIMEOUT 5000
  59. #define LPT_NOT_ERROR 0x08
  60. #define LPT_SELECT 0x10
  61. #define LPT_PAPER_EMPTY 0x20
  62. #define LPT_BENIGN_STATUS LPT_NOT_ERROR | LPT_SELECT
  63. #define MAX_TIMEOUT 300000 //5 minutes
  64. #endif