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.

154 lines
4.2 KiB

  1. #ifndef STDAFX_H_INCLUDED
  2. #define STDAFX_H_INCLUDED
  3. #undef ATL_MIN_CRT
  4. #include "nt.h"
  5. #include "ntrtl.h"
  6. #include "nturtl.h"
  7. #include "ntlsa.h"
  8. #define SECURITY_WIN32
  9. #define SECURITY_KERBEROS
  10. #include <security.h>
  11. #include <windows.h> // basic windows functionality
  12. #include <windowsx.h>
  13. #include <commctrl.h> // ImageList, ListView
  14. #include <comctrlp.h>
  15. #include <shfusion.h>
  16. #include <string.h> // string functions
  17. #include <crtdbg.h> // _ASSERT macro
  18. #include <objbase.h>
  19. #include <shconv.h>
  20. #include <wininet.h>
  21. #include <lm.h>
  22. #include <validc.h> // specifies valid characters for user names, etc.
  23. #include <wincrui.h> // credui
  24. #include <shlwapi.h>
  25. #include <shlwapip.h>
  26. #include <shellapi.h>
  27. #include <shlapip.h>
  28. #include <shlobj.h> // Needed by dsclient.h
  29. #include <shlobjp.h>
  30. #include <shlguid.h>
  31. #include <shlguidp.h>
  32. #include <ieguidp.h>
  33. #include <shellp.h>
  34. #include <ccstock.h>
  35. #include <dpa.h>
  36. #include <varutil.h>
  37. #include <cowsite.h>
  38. #include <objsafe.h>
  39. #include <cobjsafe.h>
  40. // our concept of what domain, password and user names should be
  41. #define MAX_COMPUTERNAME LM20_CNLEN
  42. #define MAX_USER LM20_UNLEN
  43. #define MAX_UPN UNLEN
  44. #define MAX_PASSWORD PWLEN
  45. #define MAX_DOMAIN MAX_PATH
  46. #define MAX_WORKGROUP LM20_DNLEN
  47. #define MAX_GROUP GNLEN
  48. // MAX_DOMAINUSER can hold: <domain>/<username> or <upn>
  49. #define MAX_DOMAINUSER MAX(MAX_UPN, MAX_USER + MAX_DOMAIN + 1)
  50. // our headers
  51. #include "dialog.h"
  52. #include "helpids.h"
  53. #include "misc.h"
  54. #include "cfdefs.h"
  55. #include "dspsprt.h"
  56. #include "resource.h"
  57. #include "userinfo.h"
  58. #include "dialog.h"
  59. #include "data.h"
  60. // global state
  61. EXTERN_C HINSTANCE g_hinst;
  62. extern LONG g_cLocks;
  63. // resource mapper object - used for wizard chaining
  64. STDAPI CResourceMap_Initialize(LPCWSTR pszURL, IResourceMap **pprm);
  65. // constructors for COM objects
  66. STDAPI CPublishingWizard_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  67. STDAPI CUserPropertyPages_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  68. STDAPI CUserSidDataObject_CreateInstance(PSID psid, IDataObject **ppdo);
  69. STDAPI CPassportWizard_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  70. STDAPI CPassportClientServices_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  71. extern const CLSID CLISD_PublishDropTarget;
  72. STDAPI CPublishDropTarget_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  73. // template for defining wizard pages
  74. typedef struct
  75. {
  76. LPCWSTR idPage;
  77. DLGPROC pDlgProc;
  78. LPCWSTR pHeading;
  79. LPCWSTR pSubHeading;
  80. DWORD dwFlags;
  81. } WIZPAGE;
  82. typedef struct
  83. {
  84. LPWSTR pszUser;
  85. INT cchUser;
  86. LPWSTR pszDomain;
  87. INT cchDomain;
  88. LPWSTR pszPassword;
  89. INT cchPassword;
  90. } CREDINFO, * LPCREDINFO;
  91. HRESULT JoinDomain(HWND hwnd, BOOL fDomain, LPCWSTR pDomain, CREDINFO* pci, BOOL *pfReboot);
  92. VOID SetAutoLogon(LPCWSTR pszUserName, LPCWSTR pszPassword);
  93. VOID SetDefAccount(LPCWSTR pszUserName, LPCWSTR pszDomain);
  94. // for the users.cpl (shared between usercpl.cpp & userlist.cpp)
  95. // All "add user to list" operations are done on the main UI thread - the
  96. // filler thread posts this message to add a user
  97. #define WM_ADDUSERTOLIST (WM_USER + 101)
  98. // (LPARAM) CUserInfo* - the user to add to the listview
  99. // (WPARAM) BOOL - select this user (should always be 0 for now)
  100. // Wizard text-related constants
  101. #define MAX_CAPTION 256 // Maximum size of a caption in the Wizard
  102. #define MAX_STATIC 1024 // Maximum size of static text in the Wizard
  103. // Wizard error return value
  104. #define RETCODE_CANCEL 0xffffffff
  105. // keep the debug libraries working...
  106. #ifdef DBG
  107. #if !defined (DEBUG)
  108. #define DEBUG
  109. #endif
  110. #else
  111. #undef DEBUG
  112. #endif
  113. STDAPI_(void) DllAddRef(void);
  114. STDAPI_(void) DllRelease(void);
  115. #define RECTWIDTH(rc) ((rc).right - (rc).left)
  116. #define RECTHEIGHT(rc) ((rc).bottom - (rc).top)
  117. #endif // !STDAFX_H_INCLUDED