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.

841 lines
53 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name :
  4. tables.cpp
  5. Abstract:
  6. mapping tables to convert various info between text and binary
  7. Environment:
  8. Win32 User Mode
  9. Author:
  10. jaroslad (jan 1997)
  11. --*/
  12. #include "tables.h"
  13. #include <string.h>
  14. #include <stdlib.h>
  15. #include <stdio.h>
  16. #include <iiscnfgp.h> //get MD_* constants
  17. #include "smtpinet.h"
  18. //#include "pop3s.h"
  19. //#include "imaps.h"
  20. BOOL IsNumber(const CString & name)
  21. {
  22. for(INT i=0;i<name.GetLength();i++)
  23. {
  24. if (name[i]<_T('0') || name[i]>_T('9'))
  25. return FALSE;
  26. }
  27. return TRUE;
  28. }
  29. BOOL IsServiceName(const CString& name)
  30. {
  31. BOOL fRetval=FALSE;
  32. if(name.CompareNoCase(_T("W3SVC"))==0 || name.CompareNoCase(_T("MSFTPSVC"))==0 ||
  33. name.CompareNoCase(_T("NNTPSVC"))==0 || name.CompareNoCase(_T("SMTPSVC"))==0)
  34. {
  35. fRetval=TRUE;
  36. }
  37. return fRetval;
  38. }
  39. //**********************************************************************
  40. // COMMAND NAME TABLE IMPLEMENTATION
  41. //**********************************************************************
  42. //constants defined in tables.h
  43. struct tCommandNameTable gCommandNameTable[]=
  44. {
  45. {CMD_SET, _T("SET")},
  46. {CMD_GET, _T("GET")},
  47. {CMD_GET, _T("G")},
  48. {CMD_COPY, _T("COPY")},
  49. {CMD_DELETE, _T("DELETE")},
  50. {CMD_DELETE, _T("DEL")},
  51. {CMD_ENUM, _T("ENUM")},
  52. {CMD_ENUM, _T("E")},
  53. {CMD_ENUM_ALL,_T("ENUM_ALL")},
  54. {CMD_CREATE, _T("CREATE")},
  55. {CMD_RENAME, _T("RENAME")},
  56. {CMD_SCRIPT, _T("SCRIPT")},
  57. {CMD_SAVE, _T("SAVE")},
  58. {CMD_APPCREATEINPROC, _T("APPCREATEINPROC")},
  59. {CMD_APPCREATEOUTPROC, _T("APPCREATEOUTPROC")},
  60. {CMD_APPDELETE, _T("APPDELETE")},
  61. {CMD_APPUNLOAD, _T("APPUNLOAD")},
  62. {CMD_APPGETSTATUS, _T("APPGETSTATUS")},
  63. //the end
  64. {0,0}
  65. };
  66. DWORD MapCommandNameToCode(const CString & strName)
  67. {
  68. return tCommandNameTable::MapNameToCode(strName);
  69. }
  70. DWORD tCommandNameTable::MapNameToCode(const CString & strName, tCommandNameTable * CommandNameTable)
  71. {
  72. for(int i=0; CommandNameTable[i].lpszName!=0;i++)
  73. {
  74. if(strName.CompareNoCase(CommandNameTable[i].lpszName)==0)
  75. return CommandNameTable[i].dwCode;
  76. }
  77. return NAME_NOT_FOUND;
  78. }
  79. #if 0
  80. CString tCommandNameTable::MapCodeToName(DWORD dwCode, tCommandNameTable * CommandNameTable)
  81. {
  82. for(int i=0; CommandNameTable[i].lpszName!=0;i++)
  83. {
  84. if(dwCode==CommandNameTable[i].dwCode)
  85. return CommandNameTable[i].dwName;
  86. }
  87. return 0;
  88. }
  89. #endif
  90. //**********************************************************************
  91. // PROPERTY NAME TABLE IMPLEMENTATION
  92. //**********************************************************************
  93. tPropertyNameTable gPropertyNameTable[]=
  94. {
  95. // These are global to all services and should only be set at
  96. // the IIS root
  97. {MD_MAX_BANDWIDTH ,_T("MaxBandwidth"), METADATA_NO_ATTRIBUTES, /*SHOULD BE GLOBAL*/IIS_MD_UT_SERVER, DWORD_METADATA},
  98. {MD_KEY_TYPE ,_T("KeyType"), METADATA_NO_ATTRIBUTES, /*SHOULD BE GLOBAL*/IIS_MD_UT_SERVER, STRING_METADATA},
  99. // These properties are applicable to both HTTP and FTP virtual
  100. // servers
  101. {MD_CONNECTION_TIMEOUT ,_T("ConnectionTimeout"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  102. {MD_MAX_CONNECTIONS ,_T("MaxConnections"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  103. {MD_SERVER_COMMENT ,_T("ServerComment"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, STRING_METADATA},
  104. {MD_SERVER_STATE ,_T("ServerState"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  105. {MD_SERVER_COMMAND ,_T("ServerCommand"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  106. {MD_SERVER_AUTOSTART ,_T("ServerAutostart"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  107. {MD_CLUSTER_SERVER_COMMAND ,_T("ClusterServerCommand"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  108. {MD_CLUSTER_ENABLED ,_T("ClusterEnabled"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  109. {MD_SERVER_SIZE ,_T("ServerSize"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  110. {MD_SERVER_LISTEN_BACKLOG ,_T("ServerListenBacklog"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  111. {MD_SERVER_LISTEN_TIMEOUT ,_T("ServerListenTimeout"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  112. {MD_DOWNLEVEL_ADMIN_INSTANCE ,_T("DownlevelAdminInstance"), METADATA_INHERIT , IIS_MD_UT_SERVER, DWORD_METADATA},
  113. {MD_SERVER_BINDINGS ,_T("ServerBindings"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  114. { MD_SERVER_CONFIGURATION_INFO , _T("ServerConfigurationInfo"),METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  115. //internals
  116. {MD_SERVER_PLATFORM ,_T("ServerPlatform"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  117. {MD_SERVER_VERSION_MAJOR ,_T("MajorVersion"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  118. {MD_SERVER_VERSION_MINOR ,_T("MinorVersion"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  119. {MD_SERVER_CAPABILITIES ,_T("Capabilities"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  120. // These properties are specific to HTTP and belong to the virtual
  121. // server
  122. // {MD_SECURE_PORT ,_T("SecurePort"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  123. {MD_SECURE_BINDINGS ,_T("SecureBindings"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  124. {MD_NTAUTHENTICATION_PROVIDERS ,_T("NTAuthenticationProviders"), METADATA_INHERIT, IIS_MD_UT_SERVER,/*??*/STRING_METADATA},
  125. {MD_SCRIPT_TIMEOUT ,_T("ScriptTimeout"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  126. {MD_CACHE_EXTENSIONS ,_T("CacheExtensions"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,/*??*/DWORD_METADATA},
  127. {MD_CREATE_PROCESS_AS_USER ,_T("CreateProcessAsUser"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  128. {MD_CREATE_PROC_NEW_CONSOLE ,_T("CreateProcNewConsole"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  129. {MD_POOL_IDC_TIMEOUT ,_T("PoolIDCTimeout"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  130. {MD_ALLOW_KEEPALIVES ,_T("AllowKeepAlives"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  131. {MD_FILTER_LOAD_ORDER ,_T("FilterLoadOrder"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,/*??*/STRING_METADATA},
  132. {MD_FILTER_IMAGE_PATH ,_T("FilterImagePath"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  133. {MD_FILTER_STATE ,_T("FilterState"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  134. {MD_FILTER_ENABLED ,_T("FilterEnabled"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  135. {MD_FILTER_FLAGS ,_T("FilterFlags"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  136. {MD_FILTER_DESCRIPTION ,_T("FilterDescription"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  137. { MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS, _T("AllowPathInfoForScriptMappings"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA },
  138. { MD_AUTH_CHANGE_URL ,_T("AuthChangeUrl"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  139. {MD_AUTH_EXPIRED_URL, _T("AuthExpiredUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  140. {MD_AUTH_NOTIFY_PWD_EXP_URL, _T("NotifyPwdExpUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  141. {MD_AUTH_EXPIRED_UNSECUREURL, _T("AuthExpiredUnsecureUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  142. {MD_AUTH_NOTIFY_PWD_EXP_UNSECUREURL, _T("NotifyPwdExpUnsecureUrl"), METADATA_INHERIT,IIS_MD_UT_SERVER,STRING_METADATA},
  143. {MD_ADV_NOTIFY_PWD_EXP_IN_DAYS, _T("NotifyPwdExpInDays"), METADATA_INHERIT,IIS_MD_UT_SERVER,DWORD_METADATA},
  144. {MD_AUTH_CHANGE_FLAGS, _T("AuthChangeFlags"), METADATA_INHERIT,IIS_MD_UT_SERVER,DWORD_METADATA},
  145. {MD_ADV_CACHE_TTL, _T("AdvCacheTTL"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  146. {MD_NET_LOGON_WKS, _T("NetLogonWks"),METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  147. {MD_USE_HOST_NAME, _T("UseHostName"),METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  148. #if defined(CAL_ENABLED)
  149. {MD_CAL_VC_PER_CONNECT, "CalVcPerConnect",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  150. {MD_CAL_AUTH_RESERVE_TIMEOUT, "CalAuthReserveTimeout",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  151. {MD_CAL_SSL_RESERVE_TIMEOUT, "CalSslReserveTimeout",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  152. {MD_CAL_W3_ERROR, "CalW3Error",METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  153. #endif
  154. { MD_IN_PROCESS_ISAPI_APPS , _T("InProcessIsapiApps") ,METADATA_INHERIT, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  155. { MD_CUSTOM_ERROR_DESC , _T("CustomErrorDesc") ,METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, MULTISZ_METADATA},
  156. {MD_MAPCERT ,_T("MapCert"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  157. {MD_MAPNTACCT ,_T("MaPNTAccT"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  158. {MD_MAPNAME ,_T("MapName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  159. {MD_MAPENABLED ,_T("MapEnabled"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  160. {MD_MAPREALM ,_T("MapRealm"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  161. {MD_MAPPWD ,_T("MapPwd"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  162. {MD_ITACCT ,_T("ITACCT"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, STRING_METADATA},
  163. {MD_CPP_CERT11 ,_T("CppCert11"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  164. {MD_SERIAL_CERT11 ,_T("SerialCert11"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  165. {MD_CPP_CERTW ,_T("CppCertw"), METADATA_SECURE,IIS_MD_UT_SERVER, BINARY_METADATA},
  166. {MD_SERIAL_CERTW ,_T("SerialCertw"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  167. {MD_CPP_DIGEST ,_T("CppDigest"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  168. {MD_SERIAL_DIGEST ,_T("SerialDigest"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  169. {MD_CPP_ITA ,_T("CppIta"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  170. {MD_SERIAL_ITA ,_T("SerialIta"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  171. // Virtual root properties - note MD_ACCESS_PERM is also generally set at
  172. // the virtual directory. These are used for both HTTP and FTP
  173. {MD_VR_PATH ,_T("VrPath"), METADATA_INHERIT,IIS_MD_UT_FILE,STRING_METADATA},
  174. {MD_VR_USERNAME ,_T("VrUsername"), METADATA_INHERIT,IIS_MD_UT_FILE,STRING_METADATA},
  175. {MD_VR_PASSWORD ,_T("VrPassword") , METADATA_INHERIT|METADATA_SECURE,IIS_MD_UT_FILE, STRING_METADATA},
  176. {MD_VR_ACL ,_T("VrAcl"), METADATA_INHERIT,IIS_MD_UT_FILE,BINARY_METADATA},
  177. // This is used to flag down updated vr entries - Used for migrating vroots
  178. {MD_VR_UPDATE ,_T("VrUpdate"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_FILE,DWORD_METADATA},
  179. // Logging related attributes
  180. {MD_LOG_TYPE ,_T("LogType"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  181. {MD_LOGFILE_DIRECTORY ,_T("LogFileDirectory"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  182. {MD_LOGFILE_PERIOD ,_T("LogFilePeriod"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  183. {MD_LOGFILE_TRUNCATE_SIZE ,_T("LogFileTruncateSize"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  184. {MD_LOGSQL_DATA_SOURCES ,_T("LogSqlDataSources"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  185. {MD_LOGSQL_TABLE_NAME ,_T("LogSqlTableName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  186. {MD_LOGSQL_USER_NAME ,_T("LogSqlUserName"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  187. {MD_LOGSQL_PASSWORD ,_T("LogSqlPassword"), METADATA_SECURE,IIS_MD_UT_FILE,DWORD_METADATA},
  188. {MD_LOGEXT_FIELD_MASK ,_T("ExtLogFieldMask"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  189. {MD_LOGEXT_FIELD_MASK2 ,_T("ExtLogFieldMask2"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  190. {MD_LOG_PLUGIN_ORDER ,_T("LogPluginOrder"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  191. // These are FTP specific properties
  192. {MD_EXIT_MESSAGE ,_T("ExitMessage"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  193. {MD_GREETING_MESSAGE ,_T("GreetingMessage"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,/*!!*/MULTISZ_METADATA},
  194. {MD_MAX_CLIENTS_MESSAGE ,_T("MaxClientsMessage"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,STRING_METADATA},
  195. {MD_MSDOS_DIR_OUTPUT ,_T("MSDOSDirOutput"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  196. {MD_ALLOW_ANONYMOUS ,_T("AllowAnonymous"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  197. {MD_ANONYMOUS_ONLY ,_T("AnonymousOnly"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  198. {MD_LOG_ANONYMOUS ,_T("LogAnonymous"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  199. {MD_LOG_NONANONYMOUS ,_T("LogNonAnonymous"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,DWORD_METADATA},
  200. // These are SSL specific properties
  201. {MD_SSL_PUBLIC_KEY ,_T("SslPublicKey"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  202. {MD_SSL_PRIVATE_KEY ,_T("SslPrivateKey"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER,BINARY_METADATA},
  203. {MD_SSL_KEY_PASSWORD ,_T("SslKeyPassword"), METADATA_SECURE,IIS_MD_UT_SERVER,BINARY_METADATA},
  204. // File and Directory related properties - these should be added in the
  205. // metabase with a user type of IIS_MD_UT_FILE
  206. {MD_AUTHORIZATION ,_T("Authorization"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  207. {MD_AUTHORIZATION_PERSISTENCE ,_T("AuthorizationPersistence"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  208. {MD_REALM ,_T("Realm"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  209. {MD_HTTP_EXPIRES ,_T("HttpExpires"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  210. {MD_HTTP_PICS ,_T("HtpPics"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  211. {MD_HTTP_CUSTOM ,_T("HttpCustom"), METADATA_INHERIT, IIS_MD_UT_FILE,MULTISZ_METADATA},
  212. {MD_DIRECTORY_BROWSING ,_T("DirectoryBrowsing"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  213. {MD_DEFAULT_LOAD_FILE ,_T("DefaultLoadFile"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  214. {MD_CONTENT_NEGOTIATION , _T("ContentNegotiation"), METADATA_INHERIT ,IIS_MD_UT_FILE,DWORD_METADATA},
  215. {MD_CUSTOM_ERROR ,_T("CustomError"), METADATA_INHERIT, IIS_MD_UT_FILE,MULTISZ_METADATA},
  216. {MD_FOOTER_DOCUMENT ,_T("FooterDocument"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  217. {MD_FOOTER_ENABLED ,_T("FooterEnabled"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  218. {MD_HTTP_REDIRECT ,_T("HttpRedirect"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_FILE,STRING_METADATA},
  219. {MD_DEFAULT_LOGON_DOMAIN ,_T("DefaultLogonDomain"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  220. {MD_LOGON_METHOD ,_T("LogonMethod"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  221. {MD_SCRIPT_MAPS ,_T("ScriptMaps"), METADATA_INHERIT,IIS_MD_UT_FILE,MULTISZ_METADATA},
  222. {MD_SCRIPT_TIMEOUT ,_T("ScriptTimeout"), METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  223. {MD_MIME_MAP ,_T("MimeMap"), METADATA_INHERIT,IIS_MD_UT_FILE,MULTISZ_METADATA},
  224. {MD_ACCESS_PERM ,_T("AccessPerm"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  225. {MD_SSL_ACCESS_PERM ,_T("SslAccessPerm"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  226. {MD_IP_SEC ,_T("IpSec") , METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  227. {MD_ANONYMOUS_USER_NAME ,_T("AnonymousUserName"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  228. {MD_ANONYMOUS_PWD ,_T("AnonymousPwd"), METADATA_INHERIT|METADATA_SECURE,IIS_MD_UT_FILE,STRING_METADATA},
  229. {MD_ANONYMOUS_USE_SUBAUTH ,_T("AnonymousUseSubAuth"), METADATA_INHERIT,IIS_MD_UT_FILE,DWORD_METADATA},
  230. {MD_DONT_LOG ,_T("DontLOG"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  231. {MD_ADMIN_ACL ,_T("AdminAcl"), METADATA_INHERIT, IIS_MD_UT_FILE,BINARY_METADATA},
  232. {MD_SSI_EXEC_DISABLED ,_T("SSIExecDisabled"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  233. {MD_DO_REVERSE_DNS ,_T("DoReverseDns"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  234. {MD_WIN32_ERROR ,_T("Win32Error"), 0, IIS_MD_UT_FILE,DWORD_METADATA},
  235. {MD_ALLOW_REPLACE_ON_RENAME ,_T("AllowReplaceOnRename"), METADATA_NO_ATTRIBUTES, IIS_MD_UT_SERVER, DWORD_METADATA},
  236. {MD_CC_NO_CACHE ,_T("CacheControlNoCache"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  237. {MD_CC_MAX_AGE ,_T("CacheControlMaxAge"), METADATA_INHERIT, IIS_MD_UT_FILE,DWORD_METADATA},
  238. {MD_CC_OTHER ,_T("CacheControlOther"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  239. // ASP and WAM params
  240. {MD_ASP_BUFFERINGON ,_T("CacheControlOther"), METADATA_INHERIT, IIS_MD_UT_FILE,STRING_METADATA},
  241. { MD_ASP_BUFFERINGON , _T("AspBufferingOn"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  242. { MD_ASP_LOGERRORREQUESTS , _T("AspLogErrorRequests"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  243. { MD_ASP_SCRIPTERRORSSENTTOBROWSER , _T("AspScriptErrorSentToBrowser"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  244. { MD_ASP_SCRIPTERRORMESSAGE , _T("AspScriptErrorMessage"),METADATA_INHERIT, ASP_MD_UT_APP, STRING_METADATA},
  245. { MD_ASP_SCRIPTFILECACHESIZE , _T("AspScriptFileCacheSize"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  246. { MD_ASP_SCRIPTENGINECACHEMAX , _T("AspScriptEngineCacheMax"),METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  247. { MD_ASP_SCRIPTTIMEOUT , _T("AspScriptTimeout"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  248. { MD_ASP_SESSIONTIMEOUT , _T("AspSessionTimeout"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  249. { MD_ASP_ENABLEPARENTPATHS , _T("AspEnableParentPaths"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  250. { MD_ASP_MEMFREEFACTOR , _T("AspMemFreeFactor"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  251. { MD_ASP_MINUSEDBLOCKS , _T("AspMinUseDblocks"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  252. { MD_ASP_ALLOWSESSIONSTATE , _T("AspAllowSessionState"), METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  253. { MD_ASP_SCRIPTLANGUAGE , _T("AspScriptLanguage") ,METADATA_INHERIT, ASP_MD_UT_APP, STRING_METADATA},
  254. { MD_ASP_ALLOWOUTOFPROCCMPNTS , _T("AspAllowOutOfProcCmpnts"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  255. { MD_ASP_EXCEPTIONCATCHENABLE , _T("AspExceptionCatchEnable"),METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  256. { MD_ASP_CODEPAGE , _T("AspCodepage") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  257. { MD_ASP_SCRIPTLANGUAGELIST , _T("AspScriptLanguages") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  258. { MD_ASP_ENABLESERVERDEBUG , _T("AspEnableServerDebug") ,METADATA_INHERIT,ASP_MD_UT_APP, DWORD_METADATA},
  259. { MD_ASP_ENABLECLIENTDEBUG , _T("AspEnableClientDebug") ,METADATA_INHERIT, ASP_MD_UT_APP, DWORD_METADATA},
  260. { MD_ASP_TRACKTHREADINGMODEL , _T("AspTrackThreadingModel") ,METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  261. // WAM params
  262. { MD_APP_ROOT , _T("AppRoot"), METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  263. { MD_APP_ISOLATED , _T("AppIsolated"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  264. { MD_APP_WAM_CLSID , _T("AppWamClsid"), METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  265. { MD_APP_PACKAGE_ID , _T("AppPackageId"), METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  266. { MD_APP_PACKAGE_NAME , _T("ApPackageName"),METADATA_INHERIT, IIS_MD_UT_WAM, STRING_METADATA},
  267. { MD_APP_LAST_OUTPROC_PID , _T("AppLastOutprocId"), METADATA_INHERIT, IIS_MD_UT_WAM, DWORD_METADATA},
  268. // SMTP parameters
  269. {MD_COMMAND_LOG_MASK, _T("CmdLogMask"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  270. {MD_FLUSH_MAIL_FILE, _T("FlushMailFiles"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  271. {MD_BATCH_MSG_LIMIT, _T("BatchMsgLimit"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  272. {MD_MAX_MAIL_OBJECTS, _T("MaxMailObjects"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  273. {MD_ROUTING_THREADS, _T("RoutingThreads"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  274. {MD_MAIL_QUEUE_DIR, _T("MailQueueDir"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  275. {MD_SHOULD_PICKUP_MAIL, _T("ShouldPickUpMail"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  276. {MD_MAX_DIR_BUFFERS, _T("MaxDirectoryBuffers"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  277. {MD_MAX_DIR_CHANGE_IO_SIZE,_T("DirectoryBuffSize"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  278. {MD_MAX_DIR_PENDING_IOS,_T("NumDirPendingIos"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  279. {MD_MAIL_PICKUP_DIR, _T("MailPickupDir"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  280. {MD_SHOULD_DELIVER, _T("ShouldDeliver"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  281. {MD_MAIL_DROP_DIR, _T("MailDropDir"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  282. {MD_ROUTING_DLL, _T("RoutingDll"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  283. {MD_REVERSE_NAME_LOOKUP,_T("EnableReverseLookup"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  284. {MD_NAME_RESOLUTION_TYPE,_T("NameResolution"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  285. {MD_HOP_COUNT, _T("MaxHopCount"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  286. {MD_MAX_SMTP_ERRORS, _T("MaxErrors"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  287. {MD_MAX_MSG_SIZE, _T("MaxMsgSize"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  288. {MD_MAX_MSG_SIZE_B4_CLOSE,_T("MaxMsgSizeBeforeClose"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  289. // {MD_OUTBOUND_TIMEOUT, _T("MaxOutTimeout"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  290. {MD_MAX_OUTBOUND_CONNECTION,_T("MaxOutConnections"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  291. {MD_MAX_RECIPIENTS, _T("MaxRcpts"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  292. {MD_LOCAL_RETRY_ATTEMPTS,_T("MaxRetryAttempts"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  293. {MD_LOCAL_RETRY_MINUTES ,_T("MaxRetryMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  294. {MD_REMOTE_RETRY_ATTEMPTS,_T("MaxRemoteRetryAttempts"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  295. {MD_REMOTE_RETRY_MINUTES,_T("MaxRemoteRetryMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  296. // {MD_SHARE_RETRY_MINUTES,_T("MaxShareRetryMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  297. {MD_SHOULD_PIPELINE_OUT,_T("PipelineInput"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  298. {MD_SHOULD_PIPELINE_IN, _T("PipelineOutput"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  299. {MD_SMARTHOST_TYPE, _T("SmartHostUseType"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  300. {MD_SMARTHOST_NAME, _T("SmartHost"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  301. {MD_CONNECT_RESPONSE, _T("ConnectResponse"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  302. {MD_DEFAULT_DOMAIN_VALUE,_T("DefaultDomain"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  303. {MD_BAD_MAIL_DIR, _T("BadMailDir"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  304. {MD_ROUTING_SOURCES, _T("OldRoutingSources"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  305. {MD_SMTP_DS_HOST, _T("Host"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  306. {MD_SMTP_DS_NAMING_CONTEXT, _T("NamingContext"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  307. {MD_SMTP_DS_ACCOUNT, _T("Account"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  308. {MD_SMTP_DS_PASSWORD, _T("Password"), METADATA_SECURE, IIS_MD_UT_FILE, STRING_METADATA},
  309. {MD_SMTP_DS_DATA_DIRECTORY, _T("DataDirectory"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  310. {MD_SMTP_DS_DEFAULT_MAIL_ROOT, _T("DefaultMailRoot"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  311. {MD_SMTP_DS_BIND_TYPE, _T("BindType"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  312. {MD_SMTP_DS_SCHEMA_TYPE, _T("SchemaType"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  313. {MD_SMTP_DS_TYPE, _T("DSType"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  314. // {MD_REMOTE_HANG_TIME, _T("RemoteHangTime"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  315. {MD_MASQUERADE_NAME, _T("MasqueradeName"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  316. {MD_DO_MASQUERADE, _T("ShouldMasquerade"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  317. {MD_REMOTE_SMTP_PORT, _T("RemoteSMTPPort"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  318. // {MD_SSLPORT, _T("SSLPort"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  319. {MD_POSTMASTER_EMAIL, _T("AdminEmail"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  320. {MD_POSTMASTER_NAME, _T("AdminName"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  321. {MD_ETRN_DAYS, _T("ETRNDays"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  322. {MD_LOCAL_DOMAINS, _T("LocalDomains"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  323. {MD_DOMAIN_ROUTING, _T("DomainRouting"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  324. {MD_REMOTE_TIMEOUT, _T("RemoteTimeout"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  325. {MD_SEND_NDR_TO, _T("SendNDRTo"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  326. {MD_SEND_BAD_TO, _T("SendBADTo"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  327. {MD_ALWAYS_USE_SSL, _T("AlwaysUseSSL"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  328. {MD_REMOTE_SECURE_PORT, _T("RemoteSecurePort"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  329. {MD_MAX_OUT_CONN_PER_DOMAIN,_T("MaxOutConPerDomain"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  330. {MD_LIMIT_REMOTE_CONNECTIONS,_T("LimitRemoteConnections"),METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  331. {MD_REMOTE_SECURE_PORT, _T("RemoteSecurePort"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  332. // {MD_SORT_TEMP_DIR, _T("MailSortTmpDir"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  333. {MD_SMTP_SERVICE_VERSION,_T("ServiceVersion"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  334. // {MD_SMTP_EXTENSION_DLLS,_T("ExtensionDlls"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  335. // {MD_SMTP_NUM_RESOLVER_SOCKETS,_T("NumResolverSockets"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  336. // {MD_SMTP_USE_MX_RESOLVER,_T("UseMxResolver"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  337. {MD_FQDN_VALUE, _T("FQDNValue"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  338. {MD_UPDATED_FQDN, _T("UpdatedFQDN"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  339. {MD_UPDATED_DEFAULT_DOMAIN,_T("UpdatedDefDomain"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  340. {MD_ETRN_SUBDOMAINS, _T("ETRNSubdomains"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  341. // {MD_MAX_POOL_THREADS, _T("MaxPoolThreads"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  342. {MD_SASL_LOGON_DOMAIN, _T("SASLLogonDom"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  343. // {MD_SERVER_SS_AUTH_MAPPING, _T("SSAuthMapping"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  344. {MD_SMTP_CLEARTEXT_AUTH_PROVIDER, _T("CTAProvider"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  345. // {MD_ALWAYS_USE_SASL, _T("AlwaysUseSASL"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  346. // {MD_SMTP_AUTHORIZATION, _T("SMTPAuth"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  347. {MD_MAX_SMTP_AUTHLOGON_ERRORS, _T("AuthLogonErrors"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  348. {MD_ROUTE_ACTION, _T("RouteAction"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  349. {MD_ROUTE_ACTION_TYPE, _T("RouteActionType"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  350. {MD_ROUTE_USER_NAME, _T("RouteUserName"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  351. {MD_ROUTE_PASSWORD, _T("RoutePassword"), METADATA_SECURE, IIS_MD_UT_FILE, STRING_METADATA},
  352. // {MD_SMTP_PREFERRED_AUTH, _T("PreferredAuth"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  353. {MD_SMTP_MAX_REMOTEQ_THREADS, _T("MaxRemQThreads"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  354. {MD_SMTP_MAX_LOCALQ_THREADS, _T("MaxLocQThreads"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  355. {MD_SMTP_AUTHORIZED_TURN_LIST, _T("AuthTURNList"), METADATA_INHERIT, IIS_MD_UT_FILE, MULTISZ_METADATA},
  356. {MD_SMTP_CSIDE_ETRN_DELAY, _T("CSideEtrnDelay"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  357. {MD_SMTP_CSIDE_ETRN_DOMAIN, _T("CSideEtrnDomain"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  358. // {MD_SMTP_VALIDATE_HELO_ARG, _T("ValidateHelo"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  359. {MD_SMTP_IP_RELAY_ADDRESSES ,_T("IpRelayAddresses"), METADATA_NO_ATTRIBUTES,IIS_MD_UT_SERVER, BINARY_METADATA},
  360. {MD_SMTP_RELAY_FOR_AUTH_USERS, _T("RelayForAuth"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  361. // {MD_SYSTEM_ROUTING_THREADS, _T("SysRoutingThreads"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  362. // {MD_SHOW_BINARY_MIME, _T("AdvertiseBMIME"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  363. // {MD_SHOW_CHUNKING, _T("AdvertiseCHUNK"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  364. {MD_SMTP_CONNECT_TIMEOUT, _T("CONNECTTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  365. {MD_SMTP_MAILFROM_TIMEOUT, _T("MAILFROMTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  366. {MD_SMTP_RCPTTO_TIMEOUT, _T("RCPTTOTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  367. {MD_SMTP_DATA_TIMEOUT, _T("DATATimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  368. {MD_SMTP_BDAT_TIMEOUT, _T("BDATTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  369. {MD_SMTP_AUTH_TIMEOUT, _T("AUTHTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  370. {MD_SMTP_SASL_TIMEOUT, _T("SASLTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  371. {MD_SMTP_HELO_TIMEOUT, _T("HELOTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  372. {MD_SMTP_TURN_TIMEOUT, _T("TURNTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  373. {MD_SMTP_RSET_TIMEOUT, _T("RSETTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  374. // {MD_SMTP_QUIT_TIMEOUT, _T("QUITTimeOut"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  375. {MD_SMTP_HELO_NODOMAIN, _T("HeloNoDomain"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  376. {MD_SMTP_MAIL_NO_HELO, _T("MailNoHelo"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  377. {MD_AQUEUE_DLL, _T("AQDll"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  378. // {MD_MAPIDRV_DLL, _T("MAPIDRVDll"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  379. // {MD_CAT_DLL, _T("CATDll"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  380. {MD_DOMAIN_VALIDATION_FLAGS, _T("DomainValidationFlags"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  381. {MD_SMTP_DS_DOMAIN, _T("DSDomain"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  382. {MD_SMTP_DS_USE_CAT, _T("DSUseCAT"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  383. {MD_SMTP_DS_FLAGS, _T("DSFlags"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  384. {MD_SMTP_DS_PORT, _T("DSPort"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  385. {MD_SMTP_REMOTE_RETRY_THRESHOLD, _T("RetryThreshold"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  386. {MD_SMTP_REMOTE_PROGRESSIVE_RETRY_MINUTES, _T("RemoteRetryMinString"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  387. {MD_SMTP_EXPIRE_LOCAL_DELAY_MIN, _T("LocalDelayDSNMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  388. {MD_SMTP_EXPIRE_LOCAL_NDR_MIN, _T("LocalNDRMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  389. {MD_SMTP_EXPIRE_REMOTE_DELAY_MIN, _T("RemoteDelayDSNMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  390. {MD_SMTP_EXPIRE_REMOTE_NDR_MIN, _T("RemoteNDRMinutes"), METADATA_INHERIT, IIS_MD_UT_FILE, STRING_METADATA},
  391. {MD_SMTP_USE_TCP_DNS,_T("UseTcpDns"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  392. {MD_SMTP_DSN_OPTIONS,_T("DSNOptions"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  393. {MD_SMTP_DSN_LANGUAGE_ID,_T("DSNLangID"), METADATA_INHERIT, IIS_MD_UT_FILE, DWORD_METADATA},
  394. {MD_SMTP_SSL_REQUIRE_TRUSTED_CA, _T("VerifySSLCertIssuer"), METADATA_INHERIT, IIS_MD_UT_SERVER, DWORD_METADATA},
  395. {MD_SMTP_SSL_CERT_HOSTNAME_VALIDATION, _T("VerifySSLCertSubject"), METADATA_INHERIT, IIS_MD_UT_SERVER, DWORD_METADATA},
  396. {MD_SMTP_DISABLE_PICKUP_DOT_STUFF, _T("DisablePickupDotStuff"), METADATA_INHERIT, IIS_MD_UT_SERVER, DWORD_METADATA},
  397. {0,0}
  398. };
  399. DWORD MapPropertyNameToCode(const CString & strName)
  400. {
  401. return tPropertyNameTable::MapNameToCode(strName);
  402. }
  403. // function finds the record within given property name table,
  404. // with the name equal to parameter lpszName
  405. tPropertyNameTable * tPropertyNameTable::FindRecord(const CString strName, tPropertyNameTable * PropertyNameTable)
  406. {
  407. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  408. {
  409. if( strName.CompareNoCase(PropertyNameTable[i].lpszName)==0)
  410. return PropertyNameTable+i;
  411. }
  412. return 0;
  413. }
  414. tPropertyNameTable * tPropertyNameTable::FindRecord(DWORD dwCode, tPropertyNameTable * PropertyNameTable)
  415. {
  416. if(dwCode==0)
  417. return NULL;
  418. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  419. {
  420. if( dwCode==PropertyNameTable[i].dwCode)
  421. return PropertyNameTable+i;
  422. }
  423. return 0;
  424. }
  425. DWORD tPropertyNameTable::MapNameToCode(const CString & strName, tPropertyNameTable * PropertyNameTable)
  426. {
  427. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  428. {
  429. if(strName.CompareNoCase(PropertyNameTable[i].lpszName)==0)
  430. return PropertyNameTable[i].dwCode;
  431. }
  432. return NAME_NOT_FOUND;
  433. }
  434. CString tPropertyNameTable::MapCodeToName(DWORD dwCode, tPropertyNameTable * PropertyNameTable)
  435. {
  436. for(int i=0; PropertyNameTable[i].lpszName!=0;i++)
  437. {
  438. if(dwCode == PropertyNameTable[i].dwCode)
  439. return PropertyNameTable[i].lpszName;
  440. }
  441. return _T("");
  442. }
  443. //**********************************************************************
  444. // PROPERTY ATTRIB NAME TABLE IMPLEMENTATION
  445. //**********************************************************************
  446. //constants defined in imd.h
  447. struct tAttribNameTable gAttribNameTable[]=
  448. {
  449. {METADATA_NO_ATTRIBUTES, _T("NO_ATTRIBUTES")},
  450. {METADATA_INHERIT, _T("INHERIT")},
  451. {METADATA_PARTIAL_PATH, _T("PARTIAL_PATH")},
  452. {METADATA_SECURE,_T("SECURE")},
  453. {METADATA_INSERT_PATH,_T("INSERT_PATH")},
  454. // {METADATA_REFERENCE,_T("REFERENCE")},
  455. // {METADATA_MASTER_ROOT_HANDLE, _T("MASTER_ROOT_HANDLE")},
  456. //the end
  457. {0,0}
  458. };
  459. DWORD MapAttribNameToCode(const CString & strName)
  460. {
  461. return tAttribNameTable::MapNameToCode(strName);
  462. }
  463. DWORD tAttribNameTable::MapNameToCode(const CString& strName, tAttribNameTable * AttribNameTable)
  464. {
  465. for(int i=0; AttribNameTable[i].lpszName!=0;i++)
  466. {
  467. if(strName.CompareNoCase(AttribNameTable[i].lpszName)==0)
  468. return AttribNameTable[i].dwCode;
  469. }
  470. return NAME_NOT_FOUND;
  471. }
  472. //**********************************************************************
  473. // PROPERTY DATA TYPE NAME TABLE MPLEMENTATION
  474. //**********************************************************************
  475. //constants defined in imd.h
  476. tDataTypeNameTable gDataTypeNameTable[]=
  477. {
  478. {DWORD_METADATA, _T("DWORD")},
  479. {STRING_METADATA, _T("STRING")},
  480. {BINARY_METADATA, _T("BINARY")},
  481. {EXPANDSZ_METADATA, _T("EXPANDSZ")},
  482. {MULTISZ_METADATA, _T("MULTISZ")},
  483. //the end
  484. {0,0}
  485. };
  486. DWORD MapDataTypeNameToCode(const CString & strName)
  487. {
  488. return tDataTypeNameTable::MapNameToCode(strName);
  489. }
  490. DWORD tDataTypeNameTable::MapNameToCode(const CString& strName, tDataTypeNameTable * DataTypeNameTable)
  491. {
  492. for(int i=0; DataTypeNameTable[i].lpszName!=0;i++)
  493. {
  494. if(strName.CompareNoCase(DataTypeNameTable[i].lpszName)==0)
  495. return DataTypeNameTable[i].dwCode;
  496. }
  497. return NAME_NOT_FOUND;
  498. }
  499. CString tDataTypeNameTable::MapCodeToName(DWORD a_dwCode, tDataTypeNameTable * DataTypeNameTable)
  500. {
  501. for(int i=0; DataTypeNameTable[i].lpszName!=0;i++)
  502. {
  503. if(a_dwCode==DataTypeNameTable[i].dwCode)
  504. return DataTypeNameTable[i].lpszName;
  505. }
  506. return _T("");
  507. }
  508. //**********************************************************************
  509. // PROPERTY USER TYPE NAME TABLE IMPLEMENTATION
  510. //**********************************************************************
  511. //constants defined in iiscnfg.h
  512. struct tUserTypeNameTable gUserTypeNameTable[]=
  513. {
  514. {IIS_MD_UT_SERVER, _T("UT_SERVER")},
  515. {IIS_MD_UT_FILE, _T("UT_FILE")},
  516. {IIS_MD_UT_WAM, _T("UT_WAM")},
  517. {ASP_MD_UT_APP, _T("UT_APP")},
  518. //the end
  519. {0,0}
  520. };
  521. DWORD MapUserTypeNameToCode(const CString & strName)
  522. {
  523. return tUserTypeNameTable::MapNameToCode(strName);
  524. }
  525. DWORD tUserTypeNameTable::MapNameToCode(const CString& strName, tUserTypeNameTable * UserTypeNameTable)
  526. {
  527. for(int i=0; UserTypeNameTable[i].lpszName!=0;i++)
  528. {
  529. if(strName.CompareNoCase(UserTypeNameTable[i].lpszName)==0)
  530. return UserTypeNameTable[i].dwCode;
  531. }
  532. return NAME_NOT_FOUND;
  533. }
  534. //**********************************************************************
  535. // PROPERTY PREDEFINED VALUES TABLE IMPLEMENTATION
  536. //**********************************************************************
  537. //constants defined in iiscnfg.h
  538. //Predefined values table
  539. struct tValueTable gValueTable[]=
  540. {
  541. // Valid values for MD_AUTHORIZATION
  542. {MD_AUTH_ANONYMOUS ,_T("Anonymous"), MD_AUTHORIZATION},
  543. {MD_AUTH_BASIC ,_T("Basic"), MD_AUTHORIZATION},
  544. {MD_AUTH_NT ,_T("NT"), MD_AUTHORIZATION},
  545. {MD_AUTH_MD5 ,_T("MD5"), MD_AUTHORIZATION},
  546. {MD_AUTH_MAPBASIC ,_T("MapBasic"), MD_AUTHORIZATION},
  547. // Valid values for MD_ACCESS_PERM
  548. {MD_ACCESS_READ ,_T("Read"), MD_ACCESS_PERM},
  549. {MD_ACCESS_WRITE ,_T("Write"), MD_ACCESS_PERM},
  550. {MD_ACCESS_EXECUTE ,_T("Execute"), MD_ACCESS_PERM},
  551. {MD_ACCESS_SSL ,_T("SSL"), MD_ACCESS_PERM},// Require SSL
  552. {MD_ACCESS_NEGO_CERT ,_T("NegoCert"), MD_ACCESS_PERM},// Allow client SSL certs
  553. {MD_ACCESS_REQUIRE_CERT ,_T("RequireCert"),MD_ACCESS_PERM},// Require client SSL certs
  554. {MD_ACCESS_MAP_CERT ,_T("MapCert"),MD_ACCESS_PERM},// Map SSL cert to NT account
  555. {MD_ACCESS_SSL128 ,_T("SSL128"), MD_ACCESS_PERM},// Require 128 bit SSL
  556. {MD_ACCESS_SCRIPT ,_T("Script"), MD_ACCESS_PERM},// Script
  557. {MD_ACCESS_NO_REMOTE_READ ,_T("NoRemoteRead"), MD_ACCESS_PERM},// NO_REMOTE only
  558. {MD_ACCESS_NO_REMOTE_WRITE ,_T("NoRemoteWrite"), MD_ACCESS_PERM},// NO_REMOTE only
  559. {MD_ACCESS_NO_REMOTE_EXECUTE ,_T("NoRemoteExecute"), MD_ACCESS_PERM},// NO_REMOTE only
  560. {MD_ACCESS_NO_REMOTE_SCRIPT ,_T("NoRemoteScript"), MD_ACCESS_PERM},// NO_REMOTE only
  561. {MD_ACCESS_MASK ,_T("MaskAll"), MD_ACCESS_PERM},
  562. // Valid values for MD_SSL_ACCESS_PERM
  563. {MD_ACCESS_READ ,_T("Read"), MD_SSL_ACCESS_PERM},
  564. {MD_ACCESS_WRITE ,_T("Write"), MD_SSL_ACCESS_PERM},
  565. {MD_ACCESS_EXECUTE ,_T("Execute"), MD_SSL_ACCESS_PERM},
  566. {MD_ACCESS_SSL ,_T("SSL"), MD_SSL_ACCESS_PERM},// Require SSL
  567. {MD_ACCESS_NEGO_CERT ,_T("NegoCert"), MD_SSL_ACCESS_PERM},// Allow client SSL certs
  568. {MD_ACCESS_REQUIRE_CERT ,_T("RequireCert"),MD_SSL_ACCESS_PERM},// Require client SSL certs
  569. {MD_ACCESS_MAP_CERT ,_T("MapCert"),MD_SSL_ACCESS_PERM},// Map SSL cert to NT account
  570. {MD_ACCESS_SSL128 ,_T("SSL128"), MD_SSL_ACCESS_PERM},// Require 128 bit SSL
  571. {MD_ACCESS_SCRIPT ,_T("Script"), MD_SSL_ACCESS_PERM},// Script
  572. {MD_ACCESS_NO_REMOTE_READ ,_T("NoRemoteRead"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  573. {MD_ACCESS_NO_REMOTE_WRITE ,_T("NoRemoteWrite"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  574. {MD_ACCESS_NO_REMOTE_EXECUTE ,_T("NoRemoteExecute"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  575. {MD_ACCESS_NO_REMOTE_SCRIPT ,_T("NoRemoteScript"), MD_SSL_ACCESS_PERM},// NO_REMOTE only
  576. {MD_ACCESS_MASK ,_T("MaskAll"), MD_SSL_ACCESS_PERM},
  577. // Valid values for MD_DIRECTORY_BROWSING
  578. {MD_DIRBROW_SHOW_DATE ,_T("Date"), MD_DIRECTORY_BROWSING},
  579. {MD_DIRBROW_SHOW_TIME ,_T("Time"), MD_DIRECTORY_BROWSING},
  580. {MD_DIRBROW_SHOW_SIZE ,_T("Size"), MD_DIRECTORY_BROWSING},
  581. {MD_DIRBROW_SHOW_EXTENSION ,_T("Extension"), MD_DIRECTORY_BROWSING},
  582. {MD_DIRBROW_LONG_DATE ,_T("LongDate"), MD_DIRECTORY_BROWSING},
  583. {MD_DIRBROW_ENABLED ,_T("Enabled"), MD_DIRECTORY_BROWSING},// Allow directory browsing
  584. {MD_DIRBROW_LOADDEFAULT ,_T("LoadDefault"),MD_DIRECTORY_BROWSING},// Load default doc if exists
  585. {MD_DIRBROW_MASK ,_T("MaskAll"), MD_DIRECTORY_BROWSING},
  586. // Valid values for MD_LOGON_METHOD
  587. {MD_LOGON_INTERACTIVE ,_T("Interactive"), MD_LOGON_METHOD, tValueTable::TYPE_EXCLUSIVE},
  588. {MD_LOGON_BATCH ,_T("Batch"), MD_LOGON_METHOD, tValueTable::TYPE_EXCLUSIVE},
  589. {MD_LOGON_NETWORK ,_T("Network"), MD_LOGON_METHOD, tValueTable::TYPE_EXCLUSIVE},
  590. // Valid values for MD_FILTER_STATE
  591. {MD_FILTER_STATE_LOADED ,_T("Loaded"), MD_FILTER_STATE, tValueTable::TYPE_EXCLUSIVE},
  592. {MD_FILTER_STATE_UNLOADED ,_T("Unloaded"), MD_FILTER_STATE, tValueTable::TYPE_EXCLUSIVE },
  593. // Valid values for MD_FILTER_FLAGS
  594. {/*SF_NOTIFY_SECURE_PORT*/0x00000001 ,_T("SecurePort"), MD_FILTER_FLAGS},
  595. {/*SF_NOTIFY_NONSECURE_PORT*/0x00000002 ,_T("NonSecurePort"), MD_FILTER_FLAGS},
  596. {/*SF_NOTIFY_READ_RAW_DATA*/0x000008000 ,_T("ReadRawData"), MD_FILTER_FLAGS},
  597. {/*SF_NOTIFY_PREPROC_HEADERS*/0x00004000 ,_T("PreprocHeaders"), MD_FILTER_FLAGS},
  598. {/*SF_NOTIFY_AUTHENTICATION*/0x00002000 ,_T("Authentication"), MD_FILTER_FLAGS},
  599. {/*SF_NOTIFY_URL_MAP*/0x00001000 ,_T("UrlMap"), MD_FILTER_FLAGS},
  600. {/*SF_NOTIFY_ACCESS_DENIED*/0x00000800 ,_T("AccessDenied"), MD_FILTER_FLAGS},
  601. {/*SF_NOTIFY_SEND_RESPONSE*/0x00000040 ,_T("SendResponse"), MD_FILTER_FLAGS},
  602. {/*SF_NOTIFY_SEND_RAW_DATA*/0x00000400 ,_T("SendRawData"), MD_FILTER_FLAGS},
  603. {/*SF_NOTIFY_LOG*/0x00000200 ,_T("NotifyLog"), MD_FILTER_FLAGS},
  604. {/*SF_NOTIFY_END_OF_REQUEST*/0x00000080 ,_T("EndOfRequest"), MD_FILTER_FLAGS},
  605. {/*SF_NOTIFY_END_OF_NET_SESSION*/0x00000100 ,_T("EndOfNetSession"), MD_FILTER_FLAGS},
  606. {/*SF_NOTIFY_AUTHENTICATIONEX*/ 0x20000000 ,_T("AuthenticationX"), MD_FILTER_FLAGS},
  607. {/*SF_NOTIFY_REQUEST_SECURITY_CONTEXT_CLOSE*/0x10000000,_T("RequestSecurityContextClose"), MD_FILTER_FLAGS},
  608. {/*SF_NOTIFY_RENEGOTIATE_CERT*/0x08000000, _T("RenegotiateCert"), MD_FILTER_FLAGS},
  609. {/*SF_NOTIFY_ORDER_HIGH*/0x00080000 ,_T("OrderHigh"), MD_FILTER_FLAGS},
  610. {/*SF_NOTIFY_ORDER_MEDIUM*/0x00040000 ,_T("OrderMedium"), MD_FILTER_FLAGS},
  611. {/*SF_NOTIFY_ORDER_LOW*/0x00020000 ,_T("OrderLow"), MD_FILTER_FLAGS},
  612. // Valid values for MD_SERVER_STATE
  613. {MD_SERVER_STATE_STARTING ,_T("Starting"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  614. {MD_SERVER_STATE_STARTED ,_T("Started"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  615. {MD_SERVER_STATE_STOPPING ,_T("Stopping"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  616. {MD_SERVER_STATE_STOPPED ,_T("Stopped"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  617. {MD_SERVER_STATE_PAUSING ,_T("Pausing"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  618. {MD_SERVER_STATE_PAUSED ,_T("Paused"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  619. {MD_SERVER_STATE_CONTINUING ,_T("Continuing"), MD_SERVER_STATE, tValueTable::TYPE_EXCLUSIVE},
  620. // Valid values for MD_SERVER_COMMAND
  621. {MD_SERVER_COMMAND_START ,_T("Start"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  622. {MD_SERVER_COMMAND_STOP ,_T("Stop"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  623. {MD_SERVER_COMMAND_PAUSE ,_T("Pause"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  624. {MD_SERVER_COMMAND_CONTINUE ,_T("Continue"), MD_SERVER_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  625. // Valid values for MD_SERVER_SIZE
  626. {MD_SERVER_SIZE_SMALL ,_T("Small"), MD_SERVER_SIZE, tValueTable::TYPE_EXCLUSIVE},
  627. {MD_SERVER_SIZE_MEDIUM ,_T("Medium"), MD_SERVER_SIZE, tValueTable::TYPE_EXCLUSIVE},
  628. {MD_SERVER_SIZE_LARGE ,_T("Large"), MD_SERVER_SIZE, tValueTable::TYPE_EXCLUSIVE},
  629. //{APPCMD_NONE, _T("None"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  630. //{APPCMD_VERIFY, _T("Verify"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  631. //{APPCMD_GETSTATUS, _T("GetStatus"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  632. //{APPCMD_CREATE, _T("Create"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  633. //{APPCMD_CREATEINPROC, _T("CreateInProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  634. //{APPCMD_CREATEOUTPROC, _T("CreateOutProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  635. //{APPCMD_CHANGETOINPROC, _T("ChangeToInProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  636. //{APPCMD_CHANGETOOUTPROC, _T("ChangeToOutProc"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  637. //{APPCMD_DELETE, _T("Delete"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  638. //{APPCMD_UNLOAD, _T("Unload"),MD_APP_COMMAND, tValueTable::TYPE_EXCLUSIVE},
  639. //{APPSTATUS_Error, _T("Error"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  640. //{APPSTATUS_Created, _T("Created"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  641. //{APPSTATUS_Deleted, _T("Deleted"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  642. //{APPSTATUS_UnLoaded, _T("Unloaded"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  643. //{APPSTATUS_Killed, _T("Killed"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  644. //{APPSTATUS_Running, _T("Running"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  645. //{APPSTATUS_Stopped, _T("Stopped"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  646. //{APPSTATUS_NoApplication, _T("NoApplication"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  647. //{APPSTATUS_AppSubNode, _T("AppSubNode"), MD_APP_STATUS, tValueTable::TYPE_EXCLUSIVE},
  648. // NEED LOGGING Updates
  649. #if 0
  650. {MD_LOGTYPE_NONE ,_T("LOGTYPE_NONE")},
  651. {MD_LOGTYPE_FILE ,_T("LOGTYPE_FILE")},
  652. {MD_LOGTYPE_ODBC ,_T("LOGTYPE_ODBC")},
  653. {MD_LOGFILE_PERIOD_MAXSIZE ,_T("LOGFILE_PERIOD_MAXSIZE")},
  654. {MD_LOGFILE_PERIOD_DAILY ,_T("LOGFILE_PERIOD_DAILY")},
  655. {MD_LOGFILE_PERIOD_WEEKLY ,_T("LOGFILE_PERIOD_WEEKLY")},
  656. {MD_LOGFILE_PERIOD_MONTHLY ,_T("LOGFILE_PERIOD_MONTHLY")},
  657. #endif
  658. //the end
  659. {0,0}
  660. };
  661. DWORD MapValueNameToCode(const CString & strName,DWORD dwRelatedPropertyCode)
  662. {
  663. return tValueTable::MapNameToCode(strName, dwRelatedPropertyCode);
  664. }
  665. DWORD tValueTable::MapNameToCode(const CString& strName, DWORD dwRelatedPropertyCode, tValueTable * ValueTable)
  666. {
  667. for(int i=0; ValueTable[i].lpszName!=0;i++)
  668. {
  669. if((strName.CompareNoCase(ValueTable[i].lpszName)==0) && ValueTable[i].dwRelatedPropertyCode==dwRelatedPropertyCode)
  670. return ValueTable[i].dwCode;
  671. }
  672. return NAME_NOT_FOUND;
  673. }
  674. CString tValueTable::MapValueContentToString(DWORD dwValueContent, DWORD dwRelatedPropertyCode, tValueTable * ValueTable)
  675. {
  676. CString strResult=_T("");
  677. for(int i=0; ValueTable[i].lpszName!=0;i++)
  678. {
  679. if(ValueTable[i].dwRelatedPropertyCode==dwRelatedPropertyCode)
  680. {
  681. if(ValueTable[i].dwFlags==tValueTable::TYPE_EXCLUSIVE)
  682. {
  683. if (ValueTable[i].dwCode == dwValueContent)
  684. return ValueTable[i].lpszName;
  685. }
  686. else if ((ValueTable[i].dwCode & dwValueContent) == ValueTable[i].dwCode)
  687. {
  688. strResult = strResult + ValueTable[i].lpszName + _T(" ");
  689. }
  690. }
  691. }
  692. strResult.TrimRight();
  693. return strResult;
  694. }
  695. //prints info about what is stored in tables so that user can see the predefined names and values
  696. void PrintTablesInfo(void)
  697. {
  698. //Print supported property names
  699. _tprintf(_T("***The following list of property names (IIS parameters) is supported:\n"));
  700. _tprintf(_T("------------------------------------------------------------------------------\n"));
  701. _tprintf(_T("%-25s: \t%-10s %s\n"),_T("Property Name"), _T("Data type"), _T("Attributes and User Type"));
  702. _tprintf(_T("\t\t--Predefined Values\n"));
  703. _tprintf(_T("------------------------------------------------------------------------------\n"));
  704. for(int i=0; gPropertyNameTable[i].lpszName!=NULL; i++)
  705. {
  706. _tprintf(_T("%-25s: \t%-10s "),gPropertyNameTable[i].lpszName,
  707. LPCTSTR(_T("(")+tDataTypeNameTable::MapCodeToName(gPropertyNameTable[i].dwDefDataType)+_T(")")));
  708. if( (METADATA_INHERIT & gPropertyNameTable[i].dwDefAttributes) == METADATA_INHERIT)
  709. { _tprintf(_T("INHERIT\t"));
  710. }
  711. if( (IIS_MD_UT_SERVER & gPropertyNameTable[i].dwDefUserType) == IIS_MD_UT_SERVER)
  712. { _tprintf(_T("UT_SERVER\t"));
  713. }
  714. if( (IIS_MD_UT_FILE & gPropertyNameTable[i].dwDefUserType) == IIS_MD_UT_FILE)
  715. { _tprintf(_T("UT_FILE "));
  716. }
  717. _tprintf(_T("\n"));
  718. //print list of applicable values
  719. for(int j=0; gValueTable[j].lpszName!=NULL;j++)
  720. {
  721. if( gValueTable[j].dwRelatedPropertyCode==gPropertyNameTable[i].dwCode)
  722. {
  723. _tprintf(_T("\t\t %-15s (=0x%x)\n"),gValueTable[j].lpszName,gValueTable[j].dwCode);
  724. }
  725. }
  726. }
  727. _tprintf(_T("\n***The following list of user types (for IIS parameters) is supported:\n"));
  728. for(i=0; gUserTypeNameTable[i].lpszName!=NULL; i++)
  729. {
  730. _tprintf(_T("%s "),gUserTypeNameTable[i].lpszName);
  731. }
  732. _tprintf(_T("\n\n***The following list of data types (for IIS parameters) is supported:\n"));
  733. for(i=0; gDataTypeNameTable[i].lpszName!=NULL; i++)
  734. {
  735. _tprintf(_T("%s "),gDataTypeNameTable[i].lpszName);
  736. }
  737. _tprintf(_T("\n\n***The following list of attributes (for IIS parameters) is supported:\n"));
  738. for( i=0; gAttribNameTable[i].lpszName!=NULL; i++)
  739. {
  740. _tprintf(_T("%s "),gAttribNameTable[i].lpszName);
  741. }
  742. _tprintf(_T("\n"));
  743. }