Source code of Windows XP (NT5)
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.

151 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. coverpg.h
  5. Abstract:
  6. Functions for working with cover pages
  7. Environment:
  8. Windows NT fax driver user interface
  9. Revision History:
  10. 02/05/96 -davidx-
  11. Created it.
  12. dd-mm-yy -author-
  13. description
  14. --*/
  15. #ifndef _COVERPAGE_H_
  16. #define _COVERPAGE_H_
  17. //
  18. // Directory on the server for storing cover pages.
  19. // This is concatenated with \\servername\print$.
  20. //
  21. #define SERVER_CP_DIRECTORY TEXT("\\CoverPg\\")
  22. //
  23. // Cover page filename extension and link filename extension
  24. //
  25. #define CP_FILENAME_EXT TEXT(".cov")
  26. #define LNK_FILENAME_EXT TEXT(".lnk")
  27. #define MAX_FILENAME_EXT 4
  28. //
  29. // Data structure for representing a list of cover pages:
  30. // the first nServerDirs paths refer to the server cover page directory
  31. // remaining paths contain user cover page directories
  32. //
  33. #define MAX_COVERPAGE_DIRS 8
  34. typedef struct {
  35. INT nDirs;
  36. INT nServerDirs;
  37. LPTSTR pDirPath[MAX_COVERPAGE_DIRS];
  38. } CPDATA, *PCPDATA;
  39. //
  40. // Flag bits attached to each cover page in a listbox
  41. //
  42. #define CPFLAG_DIRINDEX 0x00FF
  43. #define CPFLAG_SERVERCP 0x0100
  44. #define CPFLAG_LINK 0x0200
  45. #define CPFLAG_SELECTED 0x0400
  46. #define CPFLAG_SUFFIX 0x0800
  47. //
  48. // Generate a list of available cover pages (both server and user)
  49. //
  50. VOID
  51. InitCoverPageList(
  52. PCPDATA pCPInfo,
  53. HWND hwndList,
  54. LPTSTR pSelectedCoverPage
  55. );
  56. //
  57. // Retrieve the currently selected cover page name
  58. //
  59. INT
  60. GetSelectedCoverPage(
  61. PCPDATA pCPInfo,
  62. HWND hwndList,
  63. LPTSTR pBuffer
  64. );
  65. //
  66. // Allocate memory to hold cover page information
  67. //
  68. PCPDATA
  69. AllocCoverPageInfo(
  70. HANDLE hPrinter,
  71. BOOL ServerCpOnly
  72. );
  73. //
  74. // must clients use server coverpages?
  75. //
  76. BOOL
  77. UseServerCp(
  78. HANDLE hPrinter
  79. );
  80. //
  81. // Free up memory used for cover page information
  82. //
  83. VOID
  84. FreeCoverPageInfo(
  85. PCPDATA pCPInfo
  86. );
  87. //
  88. // Resolve a shortcut to find the destination file
  89. //
  90. BOOL
  91. ResolveShortcut(
  92. LPTSTR pLinkName,
  93. LPTSTR pFileName
  94. );
  95. //
  96. // Function to determine whether CoInitialize was called
  97. //
  98. BOOL
  99. IsOleInitialized(
  100. VOID
  101. );
  102. //
  103. // Perform OLE initialization if necessary
  104. //
  105. VOID
  106. DoOleInitialization(
  107. VOID
  108. );
  109. #endif // !_COVERPAGE_H_