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.

102 lines
1.8 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1990 - 1998
  3. All rights reserved
  4. Module Name:
  5. thread.hxx
  6. Abstract:
  7. Browse dialog thread header.
  8. Author:
  9. Steve Kiraly (SteveKi) 1 May 1998
  10. Environment:
  11. User Mode Win32
  12. Revision History:
  13. 1 May 1998 moved from winspool.drv to printui.dll
  14. --*/
  15. #ifndef THREAD_HXX
  16. #define THREAD_HXX
  17. /* Pick some arbitrary size of buffer for the initial EnumPrinters call.
  18. * Then store the length we used plus a bit more and try that next time.
  19. */
  20. #define A_BIT_MORE_BUFFER 256
  21. /* Global record of maximum buffer sizes needed:
  22. */
  23. typedef struct _SAVED_BUFFER_SIZE
  24. {
  25. LPTSTR pName;
  26. DWORD Size;
  27. struct _SAVED_BUFFER_SIZE *pNext;
  28. } SAVED_BUFFER_SIZE, *PSAVED_BUFFER_SIZE;
  29. VOID
  30. BrowseThreadEnumerate(
  31. PBROWSE_DLG_DATA pBrowseDlgData,
  32. PCONNECTTO_OBJECT pConnectToParent,
  33. LPTSTR pParentName
  34. );
  35. VOID
  36. BrowseThreadGetPrinter(
  37. PBROWSE_DLG_DATA pBrowseDlgData,
  38. LPTSTR pPrinterName,
  39. LPPRINTER_INFO_2 pPrinterInfo
  40. );
  41. VOID
  42. BrowseThreadDelete(
  43. PBROWSE_DLG_DATA pBrowseDlgData
  44. );
  45. VOID
  46. BrowseThreadTerminate(
  47. PBROWSE_DLG_DATA pBrowseDlgData
  48. );
  49. DWORD
  50. FreeConnectToObjects(
  51. IN PCONNECTTO_OBJECT pFirstConnectToObject,
  52. IN DWORD cThisLevelObjects,
  53. IN DWORD cbPrinterInfo
  54. );
  55. LPBYTE
  56. GetPrinterInfo(
  57. IN DWORD Flags,
  58. IN LPTSTR Name,
  59. IN DWORD Level,
  60. IN LPBYTE pPrinters,
  61. OUT LPDWORD pcbPrinters,
  62. OUT LPDWORD pcReturned,
  63. OUT LPDWORD pcbNeeded OPTIONAL,
  64. OUT LPDWORD pError OPTIONAL
  65. );
  66. DWORD
  67. GetSavedBufferSize(
  68. LPTSTR pName,
  69. PSAVED_BUFFER_SIZE *ppSavedBufferSize OPTIONAL
  70. );
  71. VOID
  72. SaveBufferSize(
  73. LPTSTR pName,
  74. DWORD Size
  75. );
  76. #endif