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.

515 lines
19 KiB

  1. #include "NWCOMPAT.hxx"
  2. #pragma hdrstop
  3. const BSTR bstrAddressTypeString = L"IPX";
  4. const BSTR bstrComputerOperatingSystem = L"NW3Compat";
  5. const BSTR bstrFileShareDescription = L"Disk";
  6. const BSTR bstrNWFileServiceName = L"NetWareFileServer";
  7. const BSTR bstrProviderName = L"NWCOMPAT";
  8. const BSTR bstrProviderPrefix = L"NWCOMPAT:";
  9. #define MAX_LONG (0x7FFFFFFF)
  10. #define MIN_LONG (0x80000000)
  11. #define MAX_BOOLEAN 1
  12. #define MAX_STRLEN 256
  13. #define MAX_UCHAR 255
  14. #define MAX_USHORT 65535
  15. PROPERTYINFO ComputerClass[] =
  16. { { TEXT("OperatingSystem"), // ro
  17. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  18. PROPERTY_RW, COMP_OPERATINGSYSTEM_ID, NT_SYNTAX_ID_LPTSTR},
  19. { TEXT("OperatingSystemVersion"), // ro
  20. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  21. PROPERTY_RW, COMP_OPERATINGSYSTEMVERSION_ID, NT_SYNTAX_ID_LPTSTR}
  22. };
  23. DWORD gdwComputerTableSize = sizeof(ComputerClass)/sizeof(PROPERTYINFO);
  24. PROPERTYINFO UserClass[] =
  25. { { TEXT("FullName"),
  26. TEXT(""), TEXT("String"), NW_DATA_SIZE, 0, FALSE, // max 128 bytes
  27. PROPERTY_RW, USER_FULLNAME_ID, NT_SYNTAX_ID_LPTSTR },
  28. { TEXT("AccountDisabled"),
  29. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  30. PROPERTY_RW, USER_ACCOUNTDISABLED_ID, NT_SYNTAX_ID_BOOL },
  31. { TEXT("AccountExpirationDate"),
  32. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  33. PROPERTY_RW, USER_ACCOUNTEXPIRATIONDATE_ID, NT_SYNTAX_ID_NW312DATE },
  34. { TEXT("AccountCanExpire"),
  35. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  36. PROPERTY_RW, USER_CANACCOUNTEXPIRE_ID, NT_SYNTAX_ID_BOOL },
  37. { TEXT("GraceLoginsAllowed"),
  38. TEXT(""), TEXT("Integer"), MAX_UCHAR, 0, FALSE,
  39. PROPERTY_RW, USER_GRACELOGINSALLOWED_ID, NT_SYNTAX_ID_DWORD },
  40. { TEXT("GraceLoginsRemaining"),
  41. TEXT(""), TEXT("Integer"), MAX_UCHAR, 0, FALSE,
  42. PROPERTY_RW, USER_GRACELOGINSREMAINING_ID, NT_SYNTAX_ID_DWORD },
  43. { TEXT("IsAccountLocked"),
  44. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  45. PROPERTY_RW, USER_ISACCOUNTLOCKED_ID, NT_SYNTAX_ID_BOOL},
  46. { TEXT("IsAdmin"),
  47. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  48. PROPERTY_RW, USER_ISADMIN_ID, NT_SYNTAX_ID_BOOL},
  49. { TEXT("MaxLogins"),
  50. TEXT(""), TEXT("Integer"), MAX_USHORT, 0, FALSE,
  51. PROPERTY_RW, USER_MAXLOGINS_ID, NT_SYNTAX_ID_DWORD},
  52. { TEXT("PasswordExpirationDate"),
  53. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  54. PROPERTY_RW, USER_PASSWORDEXPIRATIONDATE_ID, NT_SYNTAX_ID_NW312DATE},
  55. { TEXT("PasswordCanExpire"),
  56. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  57. PROPERTY_RW, USER_CANPASSWORDEXPIRE_ID, NT_SYNTAX_ID_BOOL },
  58. { TEXT("PasswordMinimumLength"),
  59. TEXT(""), TEXT("Integer"), MAX_UCHAR, 0, FALSE,
  60. PROPERTY_RW, USER_PASSWORDMINIMUMLENGTH_ID, NT_SYNTAX_ID_DWORD},
  61. { TEXT("PasswordRequired"),
  62. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  63. PROPERTY_RW, USER_PASSWORDREQUIRED_ID, NT_SYNTAX_ID_BOOL},
  64. { TEXT("RequireUniquePassword"),
  65. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  66. PROPERTY_RW, USER_REQUIREUNIQUEPASSWORD_ID, NT_SYNTAX_ID_BOOL},
  67. { TEXT("BadLoginAddress"), // ro
  68. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  69. PROPERTY_READABLE, USER_BADLOGINADDRESS_ID, NT_SYNTAX_ID_LPTSTR},
  70. { TEXT("LastLogin"), // ro
  71. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  72. PROPERTY_READABLE, USER_LASTLOGIN_ID, NT_SYNTAX_ID_NW312DATE},
  73. { TEXT("LoginHours"),
  74. TEXT(""), TEXT("OctetString"), 0, 0, FALSE,
  75. PROPERTY_RW, USER_LOGINHOURS_ID, NT_SYNTAX_ID_OCTETSTRING}
  76. };
  77. DWORD gdwUserTableSize = sizeof(UserClass)/sizeof(PROPERTYINFO);
  78. PROPERTYINFO GroupClass[] =
  79. { { TEXT("Description"), // FSGroupGeneralInfo
  80. TEXT(""), TEXT("String"), NW_DATA_SIZE, 0, FALSE, // max 128 bytes
  81. PROPERTY_RW, GROUP_DESCRIPTION_ID, NT_SYNTAX_ID_LPTSTR }
  82. };
  83. DWORD gdwGroupTableSize = sizeof(GroupClass)/sizeof(PROPERTYINFO);
  84. PROPERTYINFO FileServiceClass[] =
  85. { { TEXT("HostComputer"), // FSServiceConfiguration
  86. TEXT(""), TEXT("ADsPath"), MAX_STRLEN, 0, FALSE,
  87. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  88. { TEXT("MaxUserCount"),
  89. TEXT(""), TEXT("Integer"), MAX_USHORT, 0, FALSE,
  90. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD }
  91. };
  92. DWORD gdwFileServiceTableSize = sizeof(FileServiceClass)/sizeof(PROPERTYINFO);
  93. PROPERTYINFO FileShareClass[] =
  94. { { TEXT("Description"),
  95. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  96. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  97. { TEXT("HostComputer"),
  98. TEXT(""), TEXT("ADsPath"), MAX_STRLEN, 0, FALSE,
  99. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  100. { TEXT("MaxUserCount"),
  101. TEXT(""), TEXT("Integer"), MAX_USHORT, 0, FALSE,
  102. PROPERTY_RW, 1, NT_SYNTAX_ID_DWORD }
  103. };
  104. DWORD gdwFileShareTableSize = sizeof(FileShareClass)/sizeof(PROPERTYINFO);
  105. PROPERTYINFO PrintQueueClass[] =
  106. { { TEXT("PrinterPath"), // FSPrintQueueGeneralInfo
  107. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  108. PROPERTY_READABLE, 2, NT_SYNTAX_ID_LPTSTR },
  109. { TEXT("Model"),
  110. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  111. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  112. { TEXT("Datatype"),
  113. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  114. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  115. { TEXT("PrintProcessor"),
  116. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  117. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  118. { TEXT("Description"),
  119. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  120. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  121. { TEXT("Location"),
  122. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  123. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  124. { TEXT("StartTime"),
  125. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  126. PROPERTY_RW, 2, NT_SYNTAX_ID_DATE },
  127. { TEXT("UntilTime"),
  128. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  129. PROPERTY_RW, 2, NT_SYNTAX_ID_DATE },
  130. { TEXT("DefaultJobPriority"),
  131. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  132. PROPERTY_RW, 2, NT_SYNTAX_ID_DWORD },
  133. { TEXT("Priority"),
  134. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  135. PROPERTY_RW, 2, NT_SYNTAX_ID_DWORD },
  136. { TEXT("BannerPage"),
  137. TEXT(""), TEXT("Path"), MAX_STRLEN, 0, FALSE,
  138. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  139. { TEXT("PrintDevices"),
  140. TEXT(""), TEXT("String"), MAX_STRLEN, 0, TRUE,
  141. PROPERTY_RW, 2, NT_SYNTAX_ID_DelimitedString }
  142. };
  143. DWORD gdwPrinterTableSize = sizeof(PrintQueueClass)/sizeof(PROPERTYINFO);
  144. PROPERTYINFO PrintJobClass[] =
  145. { { TEXT("HostPrintQueue"), // ro, FSPrintJobGeneralInfo
  146. TEXT(""), TEXT("ADsPath"), MAX_STRLEN, 0, FALSE,
  147. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  148. { TEXT("User"), // ro
  149. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  150. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  151. { TEXT("TimeSubmitted"), // ro
  152. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  153. PROPERTY_READABLE, 1, NT_SYNTAX_ID_SYSTEMTIME },
  154. { TEXT("TotalPages"), // ro
  155. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  156. PROPERTY_READABLE, 1, NT_SYNTAX_ID_DWORD },
  157. { TEXT("Size"), // ro
  158. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  159. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  160. { TEXT("Description"),
  161. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  162. PROPERTY_RW, 1, NT_SYNTAX_ID_LPTSTR },
  163. { TEXT("Priority"),
  164. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  165. PROPERTY_RW, 1, NT_SYNTAX_ID_DWORD },
  166. { TEXT("StartTime"),
  167. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  168. PROPERTY_RW, 2, NT_SYNTAX_ID_DATE },
  169. { TEXT("UntilTime"),
  170. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  171. PROPERTY_RW, 2, NT_SYNTAX_ID_DATE },
  172. { TEXT("Notify"),
  173. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  174. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  175. { TEXT("TimeElapsed"), // ro
  176. TEXT(""), TEXT("Interval"), MAX_LONG, 0, FALSE,
  177. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  178. { TEXT("PagesPrinted"), // ro
  179. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  180. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  181. { TEXT("Position"),
  182. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  183. PROPERTY_RW, 2, NT_SYNTAX_ID_DWORD }
  184. };
  185. DWORD gdwJobTableSize = sizeof(PrintJobClass)/sizeof(PROPERTYINFO);
  186. CLASSINFO g_aNWCOMPATClasses[] =
  187. {
  188. //
  189. // Computer Class
  190. //
  191. { COMPUTER_SCHEMA_NAME, &CLSID_NWCOMPATComputer, &IID_IADsComputer,
  192. TEXT(""), FALSE,
  193. NULL,
  194. TEXT("OperatingSystemVersion"),
  195. NULL, TEXT("User,Group,FileService,PrintQueue"), TRUE,
  196. TEXT(""), 0,
  197. ComputerClass, sizeof(ComputerClass)/sizeof(PROPERTYINFO) },
  198. { USER_SCHEMA_NAME, &CLSID_NWCOMPATUser, &IID_IADsUser,
  199. TEXT(""), FALSE,
  200. NULL,
  201. TEXT("FullName,AccountDisabled,AccountExpirationDate,")
  202. TEXT("AccountCanExpire,GraceLoginsAllowed,GraceLoginsRemaining,")
  203. TEXT("IsAccountLocked,IsAdmin,MaxLogins,PasswordExpirationDate,")
  204. TEXT("PasswordCanExpire,PasswordMinimumLength,PasswordRequired,")
  205. TEXT("RequireUniquePassword,BadLoginAddress,LastLogin"),
  206. TEXT("Computer"), NULL, FALSE,
  207. TEXT(""), 0,
  208. UserClass, sizeof(UserClass)/sizeof(PROPERTYINFO) },
  209. { GROUP_SCHEMA_NAME, &CLSID_NWCOMPATGroup, &IID_IADsGroup,
  210. TEXT(""), FALSE,
  211. NULL,
  212. TEXT("Description"),
  213. TEXT("Computer"), NULL, FALSE,
  214. TEXT(""), 0,
  215. GroupClass, sizeof(GroupClass)/sizeof(PROPERTYINFO) },
  216. { FILESERVICE_SCHEMA_NAME, &CLSID_NWCOMPATFileService, &IID_IADsFileService,
  217. TEXT(""), FALSE,
  218. NULL,
  219. TEXT("HostComputer,MaxUserCount,"),
  220. TEXT("Computer"), TEXT("FileShare"), TRUE,
  221. TEXT(""), 0,
  222. FileServiceClass, sizeof(FileServiceClass)/sizeof(PROPERTYINFO) },
  223. { FILESHARE_SCHEMA_NAME, &CLSID_NWCOMPATFileShare, &IID_IADsFileShare,
  224. TEXT(""), FALSE,
  225. NULL,
  226. TEXT("Description,HostComputer,MaxUserCount"),
  227. TEXT("FileService"), NULL, FALSE,
  228. TEXT(""), 0,
  229. FileShareClass, sizeof(FileShareClass)/sizeof(PROPERTYINFO) },
  230. { PRINTER_SCHEMA_NAME, &CLSID_NWCOMPATPrintQueue, &IID_IADsPrintQueue,
  231. TEXT(""), FALSE,
  232. NULL,
  233. TEXT("PrinterPath,Model,Datatype,PrintProcessor,")
  234. TEXT("Description,Location,StartTime,UntilTime,DefaultJobPriority,")
  235. TEXT("Priority,BannerPage,PrintDevices"),
  236. TEXT("Computer"), NULL, FALSE,
  237. TEXT(""), 0,
  238. PrintQueueClass, sizeof(PrintQueueClass)/sizeof(PROPERTYINFO) },
  239. { PRINTJOB_SCHEMA_NAME, &CLSID_NWCOMPATPrintJob, &IID_IADsPrintJob,
  240. TEXT(""), FALSE,
  241. NULL,
  242. TEXT("HostPrintQueue,User,TimeSubmitted,TotalPages,")
  243. TEXT("Size,Priority,StartTime,UntilTime,Notify,TimeElapsed,")
  244. TEXT("PagesPrinted,Position"),
  245. NULL, NULL, FALSE,
  246. TEXT(""), 0,
  247. PrintJobClass, sizeof(PrintJobClass)/sizeof(PROPERTYINFO) }
  248. };
  249. SYNTAXINFO g_aNWCOMPATSyntax[] =
  250. { { TEXT("Boolean"), VT_BOOL },
  251. { TEXT("Counter"), VT_I4 },
  252. { TEXT("ADsPath"), VT_BSTR },
  253. { TEXT("EmailAddress"), VT_BSTR },
  254. { TEXT("FaxNumber"), VT_BSTR },
  255. { TEXT("Integer"), VT_I4 },
  256. { TEXT("Interval"), VT_I4 },
  257. { TEXT("List"), VT_VARIANT }, // VT_BSTR | VT_ARRAY
  258. { TEXT("NetAddress"), VT_BSTR },
  259. { TEXT("OctetString"), VT_VARIANT }, // VT_UI1| VT_ARRAY
  260. { TEXT("Path"), VT_BSTR },
  261. { TEXT("PhoneNumber"), VT_BSTR },
  262. { TEXT("PostalAddress"), VT_BSTR },
  263. { TEXT("SmallInterval"), VT_I4 },
  264. { TEXT("String"), VT_BSTR },
  265. { TEXT("Time"), VT_DATE }
  266. };
  267. DWORD g_cNWCOMPATClasses = (sizeof(g_aNWCOMPATClasses)/sizeof(g_aNWCOMPATClasses[0]));
  268. DWORD g_cNWCOMPATSyntax = (sizeof(g_aNWCOMPATSyntax)/sizeof(g_aNWCOMPATSyntax[0]));
  269. PROPERTYINFO g_aNWCOMPATProperties[] =
  270. { { TEXT("OperatingSystem"), // ro
  271. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  272. PROPERTY_RW, COMP_OPERATINGSYSTEM_ID, NT_SYNTAX_ID_LPTSTR},
  273. { TEXT("OperatingSystemVersion"), // ro
  274. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  275. PROPERTY_RW, COMP_OPERATINGSYSTEMVERSION_ID, NT_SYNTAX_ID_LPTSTR},
  276. // User Properties
  277. { TEXT("FullName"),
  278. TEXT(""), TEXT("String"), NW_DATA_SIZE, 0, FALSE, // max 128 bytes
  279. PROPERTY_RW, USER_FULLNAME_ID, NT_SYNTAX_ID_LPTSTR },
  280. { TEXT("AccountDisabled"),
  281. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  282. PROPERTY_RW, USER_ACCOUNTDISABLED_ID, NT_SYNTAX_ID_BOOL },
  283. { TEXT("AccountExpirationDate"),
  284. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  285. PROPERTY_RW, USER_ACCOUNTEXPIRATIONDATE_ID, NT_SYNTAX_ID_NW312DATE },
  286. { TEXT("AccountCanExpire"),
  287. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  288. PROPERTY_RW, USER_CANACCOUNTEXPIRE_ID, NT_SYNTAX_ID_BOOL },
  289. { TEXT("GraceLoginsAllowed"),
  290. TEXT(""), TEXT("Integer"), MAX_UCHAR, 0, FALSE,
  291. PROPERTY_RW, USER_GRACELOGINSALLOWED_ID, NT_SYNTAX_ID_DWORD },
  292. { TEXT("GraceLoginsRemaining"),
  293. TEXT(""), TEXT("Integer"), MAX_UCHAR, 0, FALSE,
  294. PROPERTY_RW, USER_GRACELOGINSREMAINING_ID, NT_SYNTAX_ID_DWORD },
  295. { TEXT("IsAccountLocked"),
  296. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  297. PROPERTY_RW, USER_ISACCOUNTLOCKED_ID, NT_SYNTAX_ID_BOOL},
  298. { TEXT("IsAdmin"),
  299. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  300. PROPERTY_RW, USER_ISADMIN_ID, NT_SYNTAX_ID_BOOL},
  301. { TEXT("MaxLogins"),
  302. TEXT(""), TEXT("Integer"), MAX_USHORT, 0, FALSE,
  303. PROPERTY_RW, USER_MAXLOGINS_ID, NT_SYNTAX_ID_DWORD},
  304. { TEXT("PasswordExpirationDate"),
  305. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  306. PROPERTY_RW, USER_PASSWORDEXPIRATIONDATE_ID, NT_SYNTAX_ID_NW312DATE},
  307. { TEXT("PasswordCanExpire"),
  308. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  309. PROPERTY_RW, USER_CANPASSWORDEXPIRE_ID, NT_SYNTAX_ID_BOOL },
  310. { TEXT("PasswordMinimumLength"),
  311. TEXT(""), TEXT("Integer"), MAX_UCHAR, 0, FALSE,
  312. PROPERTY_RW, USER_PASSWORDMINIMUMLENGTH_ID, NT_SYNTAX_ID_DWORD},
  313. { TEXT("PasswordRequired"),
  314. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  315. PROPERTY_RW, USER_PASSWORDREQUIRED_ID, NT_SYNTAX_ID_BOOL},
  316. { TEXT("RequireUniquePassword"),
  317. TEXT(""), TEXT("Boolean"), MAX_BOOLEAN, 0, FALSE,
  318. PROPERTY_RW, USER_REQUIREUNIQUEPASSWORD_ID, NT_SYNTAX_ID_BOOL},
  319. { TEXT("BadLoginAddress"), // ro
  320. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  321. PROPERTY_READABLE, USER_BADLOGINADDRESS_ID, NT_SYNTAX_ID_LPTSTR},
  322. { TEXT("LastLogin"), // ro
  323. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  324. PROPERTY_READABLE, USER_LASTLOGIN_ID, NT_SYNTAX_ID_NW312DATE},
  325. // Group Properties
  326. { TEXT("Description"), // FSGroupGeneralInfo
  327. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE, // max 128 bytes
  328. PROPERTY_RW, GROUP_DESCRIPTION_ID, NT_SYNTAX_ID_LPTSTR },
  329. // FileService Properties
  330. { TEXT("HostComputer"), // FSServiceConfiguration
  331. TEXT(""), TEXT("ADsPath"), MAX_STRLEN, 0, FALSE,
  332. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  333. { TEXT("MaxUserCount"),
  334. TEXT(""), TEXT("Integer"), MAX_USHORT, 0, FALSE,
  335. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  336. // FileShare Properties
  337. //
  338. // Description (Group)
  339. //
  340. // HostComputer (FileService)
  341. //
  342. // MaxUserCount(FileService)
  343. //
  344. // PrintQueue Properties
  345. //
  346. // HostComputer (FileService)
  347. //
  348. { TEXT("Model"),
  349. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  350. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  351. { TEXT("Datatype"),
  352. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  353. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  354. { TEXT("PrintProcessor"),
  355. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  356. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  357. //
  358. // Description (Group)
  359. //
  360. { TEXT("Location"),
  361. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  362. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  363. { TEXT("StartTime"),
  364. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  365. PROPERTY_RW, 2, NT_SYNTAX_ID_DATE },
  366. { TEXT("UntilTime"),
  367. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  368. PROPERTY_RW, 2, NT_SYNTAX_ID_DATE },
  369. { TEXT("DefaultJobPriority"),
  370. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  371. PROPERTY_RW, 2, NT_SYNTAX_ID_DWORD },
  372. { TEXT("Priority"),
  373. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  374. PROPERTY_RW, 2, NT_SYNTAX_ID_DWORD },
  375. { TEXT("BannerPage"),
  376. TEXT(""), TEXT("Path"), MAX_STRLEN, 0, FALSE,
  377. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  378. { TEXT("PrintDevices"),
  379. TEXT(""), TEXT("String"), MAX_STRLEN, 0, TRUE,
  380. PROPERTY_RW, 2, NT_SYNTAX_ID_DelimitedString },
  381. // PrintJob Properties
  382. { TEXT("HostPrintQueue"), // ro, FSPrintJobGeneralInfo
  383. TEXT(""), TEXT("ADsPath"), MAX_STRLEN, 0, FALSE,
  384. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  385. { TEXT("User"), // ro
  386. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  387. PROPERTY_READABLE, 1, NT_SYNTAX_ID_LPTSTR },
  388. { TEXT("TimeSubmitted"), // ro
  389. TEXT(""), TEXT("Time"), 0, 0, FALSE,
  390. PROPERTY_READABLE, 1, NT_SYNTAX_ID_SYSTEMTIME },
  391. { TEXT("TotalPages"), // ro
  392. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  393. PROPERTY_READABLE, 1, NT_SYNTAX_ID_DWORD },
  394. { TEXT("Size"), // ro
  395. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  396. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  397. //
  398. // Description (Group)
  399. //
  400. // Priority (PrintQueue)
  401. //
  402. //
  403. // StartTime (PrintQueue)
  404. //
  405. // UntilTime(PrintQueue)
  406. //
  407. { TEXT("Notify"),
  408. TEXT(""), TEXT("String"), MAX_STRLEN, 0, FALSE,
  409. PROPERTY_RW, 2, NT_SYNTAX_ID_LPTSTR },
  410. { TEXT("TimeElapsed"), // ro
  411. TEXT(""), TEXT("Interval"), MAX_LONG, 0, FALSE,
  412. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  413. { TEXT("PagesPrinted"), // ro
  414. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  415. PROPERTY_READABLE, 2, NT_SYNTAX_ID_DWORD },
  416. { TEXT("Position"),
  417. TEXT(""), TEXT("Integer"), MAX_LONG, 0, FALSE,
  418. PROPERTY_RW, 2, NT_SYNTAX_ID_DWORD }
  419. };
  420. DWORD g_cNWCOMPATProperties = (sizeof(g_aNWCOMPATProperties)/sizeof(g_aNWCOMPATProperties[0]));