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.7 KiB

  1. //
  2. // Copyright (c) 1998-2001 Microsoft Corp. & Ricoh Co., Ltd. All rights reserved.
  3. //
  4. // FILE: Devmode.h
  5. //
  6. // PURPOSE: Define common data types, and external function prototypes
  7. // for devmode functions.
  8. //
  9. // PLATFORMS: Windows NT
  10. //
  11. // Revision History:
  12. // 03/02/2000 -Masatoshi Kubokura-
  13. // Modified DDK sample code.
  14. // 09/22/2000 -Masatoshi Kubokura-
  15. // Last modified for Whistler.
  16. //
  17. #ifndef _DEVMODE_H
  18. #define _DEVMODE_H
  19. #include <windows.h> // for UI
  20. #include <compstui.h> // for UI
  21. #include <winddiui.h> // for UI
  22. #include <prcomoem.h>
  23. ////////////////////////////////////////////////////////
  24. // OEM Devmode Type Definitions
  25. ////////////////////////////////////////////////////////
  26. // buffer size
  27. #define USERID_LEN 8
  28. #define PASSWORD_LEN 4
  29. #define USERCODE_LEN 8
  30. #define MY_MAX_PATH 80
  31. // private devmode
  32. typedef struct _OEMUD_EXTRADATA{
  33. OEM_DMEXTRAHEADER dmOEMExtra;
  34. // common data between UI & rendering plugin ->
  35. DWORD fUiOption; // bit flags for UI option (This must be after dmOEMExtra)
  36. WORD JobType;
  37. WORD LogDisabled;
  38. BYTE UserIdBuf[USERID_LEN+1];
  39. BYTE PasswordBuf[PASSWORD_LEN+1];
  40. BYTE UserCodeBuf[USERCODE_LEN+1];
  41. WCHAR SharedFileName[MY_MAX_PATH+16];
  42. // <-
  43. } OEMUD_EXTRADATA, *POEMUD_EXTRADATA;
  44. typedef const OEMUD_EXTRADATA *PCOEMUD_EXTRADATA;
  45. // options for UI plugin
  46. typedef struct _UIDATA{
  47. DWORD fUiOption;
  48. HANDLE hPropPage;
  49. HANDLE hComPropSheet;
  50. PFNCOMPROPSHEET pfnComPropSheet;
  51. POEMUD_EXTRADATA pOEMExtra;
  52. WORD JobType;
  53. WORD LogDisabled;
  54. WCHAR UserIdBuf[USERID_LEN+1];
  55. WCHAR PasswordBuf[PASSWORD_LEN+1];
  56. WCHAR UserCodeBuf[USERCODE_LEN+1];
  57. } UIDATA, *PUIDATA;
  58. // file data for UI & rendering plugin
  59. typedef struct _FILEDATA{
  60. DWORD fUiOption; // UI option flag
  61. } FILEDATA, *PFILEDATA;
  62. // bit definitions of fUiOption
  63. #define HOLD_OPTIONS 0 // 1:hold options after printing
  64. #define PRINT_DONE 1 // 1:printing done (rendering plugin sets this)
  65. // UI plugin local ->
  66. #define UIPLUGIN_NOPERMISSION 16 // same as DM_NOPERMISSION
  67. #define JOBLOGDLG_UPDATED 17 // 1:Job/Log dialog updated
  68. // <-
  69. // registry value name
  70. #define REG_HARDDISK_INSTALLED L"HardDiskInstalled"
  71. // flag bit operation
  72. #define BIT(num) ((DWORD)1<<(num))
  73. #define BITCLR32(flag,num) ((flag) &= ~BIT(num))
  74. #define BITSET32(flag,num) ((flag) |= BIT(num))
  75. #define BITTEST32(flag,num) ((flag) & BIT(num))
  76. #endif