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.

77 lines
3.6 KiB

  1. #ifndef _PRINTER_H_
  2. #define _PRINTER_H_
  3. #include "shell32p.h"
  4. #include <winspool.h>
  5. #define MAXCOMPUTERNAME (2 + INTERNET_MAX_HOST_NAME_LENGTH + 1)
  6. #define MAXNAMELEN MAX_PATH
  7. #define MAXNAMELENBUFFER (MAXNAMELEN + MAXCOMPUTERNAME + 1)
  8. STDAPI_(void) Printer_SplitFullName(LPTSTR pszScratch, DWORD cchSize, LPCTSTR pszFullName, LPCTSTR *ppszServer, LPCTSTR *ppszPrinter);
  9. STDAPI_(BOOL) Printer_CheckShowFolder(LPCTSTR pszMachine);
  10. STDAPI_(BOOL) Printer_CheckNetworkPrinterByName(LPCTSTR pszPrinter, LPCTSTR* ppszLocal);
  11. STDAPI_(IShellFolder2 *) CPrintRoot_GetPSF();
  12. STDAPI_(BOOL) IsDefaultPrinter(LPCTSTR pszPrinter, DWORD dwAttributesHint);
  13. STDAPI_(BOOL) IsPrinterInstalled(LPCTSTR pszPrinter);
  14. STDAPI_(BOOL) IsAvoidAutoDefaultPrinter(LPCTSTR pszPrinter);
  15. STDAPI_(DWORD) Printers_EnumPrinters(LPCTSTR pszServer, DWORD dwType, DWORD dwLevel, void **ppPrinters);
  16. STDAPI_(DWORD) Printers_FolderEnumPrinters(HANDLE hFolder, void **ppPrinters);
  17. STDAPI_(void *) Printer_FolderGetPrinter(HANDLE hFolder, LPCTSTR pszPrinter);
  18. STDAPI_(BOOL) Printer_ModifyPrinter(LPCTSTR lpszPrinterName, DWORD dwCommand);
  19. STDAPI_(void *) Printer_GetPrinterDriver(HANDLE hPrinter, DWORD dwLevel);
  20. STDAPI_(void *) Printer_GetPrinter(HANDLE hPrinter, DWORD dwLevel);
  21. STDAPI_(BOOL) Printers_DeletePrinter(HWND, LPCTSTR, DWORD, LPCTSTR, BOOL);
  22. STDAPI_(BOOL) Printer_SetAsDefault(LPCTSTR lpszPrinterName);
  23. STDAPI_(void) Printers_ChooseNewDefault(HWND hWnd);
  24. typedef BOOL (*ENUMPROP)(void *lpData, HANDLE hPrinter, DWORD dwLevel,
  25. LPBYTE pEnum, DWORD dwSize, DWORD *lpdwNeeded, DWORD *lpdwNum);
  26. STDAPI_(void *) Printer_EnumProps(HANDLE hPrinter, DWORD dwLevel, DWORD *lpdwNum,
  27. ENUMPROP lpfnEnum, void *lpData);
  28. STDAPI_(HANDLE) Printer_OpenPrinter(LPCTSTR lpszPrinterName);
  29. STDAPI_(HANDLE) Printer_OpenPrinterAdmin(LPCTSTR lpszPrinterName);
  30. STDAPI_(void) Printer_ClosePrinter(HANDLE hPrinter);
  31. STDAPI_(BOOL) Printer_GPI2CB(void *lpData, HANDLE hPrinter, DWORD dwLevel, LPBYTE pBuf, DWORD dwSize, DWORD *lpdwNeeded, DWORD *lpdwNum);
  32. STDAPI_(void *) Printer_GetPrinterInfo(HANDLE hPrinter, DWORD dwLevel );
  33. STDAPI_(void *) Printer_GetPrinterInfoStr(LPCTSTR lpszPrinterName, DWORD dwLevel);
  34. // prqwnd.c
  35. STDAPI_(LPITEMIDLIST) Printjob_GetPidl(LPCTSTR szName, LPSHCNF_PRINTJOB_DATA pData);
  36. // printer1.c
  37. STDAPI_(LPITEMIDLIST) Printers_GetInstalledNetPrinter(LPCTSTR lpNetPath);
  38. STDAPI_(void) Printer_PrintFile(HWND hWnd, LPCTSTR pszFilePath, LPCITEMIDLIST pidl);
  39. STDAPI_(LPITEMIDLIST) Printers_PrinterSetup(HWND hwndStub, UINT uAction, LPTSTR lpBuffer, DWORD cchBufSize, LPCTSTR pszServerName);
  40. // prnfldr.cpp
  41. STDAPI CPrinterDropTarget_CreateInstance(HWND hwnd, LPCITEMIDLIST pidl, IDropTarget **ppdropt);
  42. ////////////////////////////////////////////////////////////////////
  43. // IPrintersBindInfo - bind context info for parsing printer PIDLs
  44. #undef INTERFACE
  45. #define INTERFACE IPrintersBindInfo
  46. DECLARE_INTERFACE_(IPrintersBindInfo, IUnknown)
  47. {
  48. //////////////////
  49. // IUnknown
  50. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  51. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  52. STDMETHOD_(ULONG,Release)(THIS) PURE;
  53. ///////////////////////
  54. // IPrintersBindInfo
  55. STDMETHOD(SetPIDLType)(THIS_ DWORD dwType) PURE;
  56. STDMETHOD(GetPIDLType)(THIS_ LPDWORD pdwType) PURE;
  57. STDMETHOD(IsValidated)(THIS) PURE;
  58. STDMETHOD(SetCookie)(THIS_ LPVOID pCookie) PURE;
  59. STDMETHOD(GetCookie)(THIS_ LPVOID *ppCookie) PURE;
  60. };
  61. STDAPI Printers_CreateBindInfo(LPCTSTR pszPrinter, DWORD dwType, BOOL bValidated, LPVOID pCookie, IPrintersBindInfo **ppbc);
  62. #endif // _PRINTER_H_