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.

1771 lines
30 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000
  5. //
  6. // File: gettable.cpp
  7. //
  8. // Contents: Defines Table DSGet
  9. //
  10. // History: 13-Oct-2000 JeffJon Created
  11. //
  12. //
  13. //--------------------------------------------------------------------------
  14. #include "pch.h"
  15. #include "cstrings.h"
  16. #include "gettable.h"
  17. #include "display.h"
  18. #include "usage.h"
  19. //+--------------------------------------------------------------------------
  20. //
  21. // Member: CDSGetDisplayInfo::AddValue
  22. //
  23. // Synopsis: Adds a value to the value array and allocates more space
  24. // if necessary.
  25. //
  26. // Arguments: [pszValue IN] : new value to be added
  27. //
  28. // Returns: HRESULT : E_OUTOFMEMORY if we failed to allocate space
  29. // S_OK if we succeeded in setting the password
  30. //
  31. // History: 23-Oct-2000 JeffJon Created
  32. //
  33. //---------------------------------------------------------------------------
  34. HRESULT CDSGetDisplayInfo::AddValue(PCWSTR pszValue)
  35. {
  36. ENTER_FUNCTION_HR(LEVEL8_LOGGING, CDSGetDisplayInfo::AddValue, hr);
  37. do // false loop
  38. {
  39. //
  40. // Verify parameters
  41. //
  42. if (!pszValue)
  43. {
  44. ASSERT(pszValue);
  45. hr = E_INVALIDARG;
  46. break;
  47. }
  48. if (m_dwAttributeValueCount == m_dwAttributeValueSize)
  49. {
  50. DWORD dwNewSize = m_dwAttributeValueSize + 5;
  51. //
  52. // Allocate a new array with more space
  53. //
  54. PWSTR* ppszNewArray = new PWSTR[dwNewSize];
  55. if (!ppszNewArray)
  56. {
  57. hr = E_OUTOFMEMORY;
  58. break;
  59. }
  60. m_dwAttributeValueSize = dwNewSize;
  61. //
  62. // Copy the old values
  63. //
  64. memcpy(ppszNewArray, m_ppszAttributeStringValue, m_dwAttributeValueCount * sizeof(PWSTR));
  65. //
  66. // Delete the old array
  67. //
  68. if (m_ppszAttributeStringValue)
  69. {
  70. delete[] m_ppszAttributeStringValue;
  71. }
  72. m_ppszAttributeStringValue = ppszNewArray;
  73. }
  74. //
  75. // Add the new value to the end of the array
  76. //
  77. m_ppszAttributeStringValue[m_dwAttributeValueCount] = new WCHAR[wcslen(pszValue) + 1];
  78. if (!m_ppszAttributeStringValue[m_dwAttributeValueCount])
  79. {
  80. hr = E_OUTOFMEMORY;
  81. break;
  82. }
  83. wcscpy(m_ppszAttributeStringValue[m_dwAttributeValueCount], pszValue);
  84. m_dwAttributeValueCount++;
  85. } while (false);
  86. return hr;
  87. }
  88. //+-------------------------------------------------------------------------
  89. // Parser table
  90. //--------------------------------------------------------------------------
  91. ARG_RECORD DSGET_COMMON_COMMANDS[] =
  92. {
  93. #ifdef DBG
  94. //
  95. // -debug, -debug
  96. //
  97. 0,(LPWSTR)c_sz_arg1_com_debug,
  98. 0,NULL,
  99. ARG_TYPE_DEBUG, ARG_FLAG_OPTIONAL|ARG_FLAG_HIDDEN,
  100. NULL,
  101. 0, NULL,
  102. #endif
  103. //
  104. // h, ?
  105. //
  106. 0,(LPWSTR)c_sz_arg1_com_help,
  107. 0,(LPWSTR)c_sz_arg2_com_help,
  108. ARG_TYPE_HELP, ARG_FLAG_OPTIONAL,
  109. NULL,
  110. 0, NULL,
  111. //
  112. // objecttype
  113. //
  114. 0,(LPWSTR)c_sz_arg1_com_objecttype,
  115. 0,NULL,
  116. ARG_TYPE_STR, ARG_FLAG_REQUIRED|ARG_FLAG_NOFLAG,
  117. 0,
  118. 0, NULL,
  119. //
  120. // s,server
  121. //
  122. 0,(LPWSTR)c_sz_arg1_com_server,
  123. 0,(LPWSTR)c_sz_arg2_com_server,
  124. ARG_TYPE_STR, ARG_FLAG_OPTIONAL,
  125. NULL,
  126. 0, NULL,
  127. //
  128. // d,domain
  129. //
  130. 0,(LPWSTR)c_sz_arg1_com_domain,
  131. 0,(LPWSTR)c_sz_arg2_com_domain,
  132. ARG_TYPE_STR, ARG_FLAG_OPTIONAL,
  133. NULL,
  134. 0, NULL,
  135. //
  136. // u, username
  137. //
  138. 0,(LPWSTR)c_sz_arg1_com_username,
  139. 0,(LPWSTR)c_sz_arg2_com_username,
  140. ARG_TYPE_STR, ARG_FLAG_OPTIONAL,
  141. NULL,
  142. 0, NULL,
  143. //
  144. // w, password
  145. //
  146. 0,(LPWSTR)c_sz_arg1_com_password,
  147. 0,(LPWSTR)c_sz_arg2_com_password,
  148. ARG_TYPE_STR, ARG_FLAG_OPTIONAL,
  149. NULL,
  150. 0, ValidateAdminPassword,
  151. //
  152. // c Continue
  153. //
  154. 0,(PWSTR)c_sz_arg1_com_continue,
  155. ID_ARG2_NULL, NULL,
  156. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  157. (CMD_TYPE)_T(""),
  158. 0, NULL,
  159. //
  160. // q,q
  161. //
  162. 0,(LPWSTR)c_sz_arg1_com_quiet,
  163. 0,NULL,
  164. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  165. NULL,
  166. 0, NULL,
  167. //
  168. // l List
  169. //
  170. 0,(LPWSTR)c_sz_arg1_com_listformat,
  171. 0,NULL,
  172. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  173. 0,
  174. 0, NULL,
  175. //
  176. // objectDN
  177. //
  178. 0,(LPWSTR)c_sz_arg1_com_objectDN,
  179. ID_ARG2_NULL,NULL,
  180. ARG_TYPE_MSZ, ARG_FLAG_REQUIRED|ARG_FLAG_NOFLAG|ARG_FLAG_STDIN|ARG_FLAG_DN,
  181. 0,
  182. 0, NULL,
  183. //
  184. // dn
  185. //
  186. 0, (PWSTR)g_pszArg1UserDN,
  187. ID_ARG2_NULL, NULL,
  188. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  189. 0,
  190. 0, NULL,
  191. //
  192. // description
  193. //
  194. 0, (PWSTR)c_sz_arg1_com_description,
  195. ID_ARG2_NULL, NULL,
  196. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  197. 0,
  198. 0, NULL,
  199. ARG_TERMINATOR
  200. };
  201. ARG_RECORD DSGET_USER_COMMANDS[]=
  202. {
  203. //
  204. // SamID
  205. //
  206. 0, (PWSTR)g_pszArg1UserSAMID,
  207. ID_ARG2_NULL, NULL,
  208. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  209. 0,
  210. 0, NULL,
  211. //
  212. // sid
  213. //
  214. 0, (PWSTR)g_pszArg1UserSID,
  215. ID_ARG2_NULL, NULL,
  216. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  217. 0,
  218. 0, NULL,
  219. //
  220. // upn
  221. //
  222. 0, (PWSTR)g_pszArg1UserUPN,
  223. ID_ARG2_NULL, NULL,
  224. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  225. 0,
  226. 0, NULL,
  227. //
  228. // fn. FirstName
  229. //
  230. 0, (PWSTR)g_pszArg1UserFirstName,
  231. ID_ARG2_NULL, NULL,
  232. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  233. 0,
  234. 0, NULL,
  235. //
  236. // mi Middle Initial
  237. //
  238. 0, (PWSTR)g_pszArg1UserMiddleInitial,
  239. ID_ARG2_NULL, NULL,
  240. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  241. 0,
  242. 0, NULL,
  243. //
  244. // ln LastName
  245. //
  246. 0, (PWSTR)g_pszArg1UserLastName,
  247. ID_ARG2_NULL, NULL,
  248. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  249. 0,
  250. 0, NULL,
  251. //
  252. // display DisplayName
  253. //
  254. 0, (PWSTR)g_pszArg1UserDisplayName,
  255. ID_ARG2_NULL, NULL,
  256. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  257. 0,
  258. 0, NULL,
  259. //
  260. // empid Employee ID
  261. //
  262. 0, (PWSTR)g_pszArg1UserEmployeeID,
  263. ID_ARG2_NULL, NULL,
  264. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  265. 0,
  266. 0, NULL,
  267. //
  268. // office Office Location
  269. //
  270. 0, (PWSTR)g_pszArg1UserOffice,
  271. ID_ARG2_NULL, NULL,
  272. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  273. 0,
  274. 0, NULL,
  275. //
  276. // tel Telephone
  277. //
  278. 0, (PWSTR)g_pszArg1UserTelephone,
  279. ID_ARG2_NULL, NULL,
  280. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  281. 0,
  282. 0, NULL,
  283. //
  284. // email E-mail
  285. //
  286. 0, (PWSTR)g_pszArg1UserEmail,
  287. ID_ARG2_NULL, NULL,
  288. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  289. 0,
  290. 0, NULL,
  291. //
  292. // hometel Home Telephone
  293. //
  294. 0, (PWSTR)g_pszArg1UserHomeTelephone,
  295. ID_ARG2_NULL, NULL,
  296. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  297. 0,
  298. 0, NULL,
  299. //
  300. // pager Pager number
  301. //
  302. 0, (PWSTR)g_pszArg1UserPagerNumber,
  303. ID_ARG2_NULL, NULL,
  304. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  305. 0,
  306. 0, NULL,
  307. //
  308. // mobile Mobile Telephone Number
  309. //
  310. 0, (PWSTR)g_pszArg1UserMobileNumber,
  311. ID_ARG2_NULL, NULL,
  312. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  313. 0,
  314. 0, NULL,
  315. //
  316. // fax Fax Number
  317. //
  318. 0, (PWSTR)g_pszArg1UserFaxNumber,
  319. ID_ARG2_NULL, NULL,
  320. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  321. 0,
  322. 0, NULL,
  323. //
  324. // iptel IP phone#
  325. //
  326. 0, (PWSTR)g_pszArg1UserIPTel,
  327. ID_ARG2_NULL, NULL,
  328. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  329. 0,
  330. 0, NULL,
  331. //
  332. // webpg Web Page
  333. //
  334. 0, (PWSTR)g_pszArg1UserWebPage,
  335. ID_ARG2_NULL, NULL,
  336. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  337. 0,
  338. 0, NULL,
  339. //
  340. // title Title
  341. //
  342. 0, (PWSTR)g_pszArg1UserTitle,
  343. ID_ARG2_NULL, NULL,
  344. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  345. 0,
  346. 0, NULL,
  347. //
  348. // dept Department
  349. //
  350. 0, (PWSTR)g_pszArg1UserDepartment,
  351. ID_ARG2_NULL, NULL,
  352. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  353. 0,
  354. 0, NULL,
  355. //
  356. // company Company
  357. //
  358. 0, (PWSTR)g_pszArg1UserCompany,
  359. ID_ARG2_NULL, NULL,
  360. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  361. 0,
  362. 0, NULL,
  363. //
  364. // mgr Manager
  365. //
  366. 0, (PWSTR)g_pszArg1UserManager,
  367. ID_ARG2_NULL, NULL,
  368. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  369. 0,
  370. 0, NULL,
  371. //
  372. // hmdir Home Directory
  373. //
  374. 0, (PWSTR)g_pszArg1UserHomeDirectory,
  375. ID_ARG2_NULL, NULL,
  376. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  377. 0,
  378. 0, NULL,
  379. //
  380. // hmdrv Home Drive
  381. //
  382. 0, (PWSTR)g_pszArg1UserHomeDrive,
  383. ID_ARG2_NULL, NULL,
  384. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  385. 0,
  386. 0, NULL,
  387. //
  388. // profile Profile
  389. //
  390. 0, (PWSTR)g_pszArg1UserProfile,
  391. ID_ARG2_NULL, NULL,
  392. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  393. 0,
  394. 0, NULL,
  395. //
  396. // loscr Logon Script
  397. //
  398. 0, (PWSTR)g_pszArg1UserLogonScript,
  399. ID_ARG2_NULL, NULL,
  400. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  401. 0,
  402. 0, NULL,
  403. //
  404. // mustchpwd Must Change Password at next logon
  405. //
  406. 0, (PWSTR)g_pszArg1UserMustChangePwd,
  407. ID_ARG2_NULL, NULL,
  408. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  409. 0,
  410. 0, NULL,
  411. //
  412. // canchpwd Can Change Password
  413. //
  414. 0, (PWSTR)g_pszArg1UserCanChangePwd,
  415. ID_ARG2_NULL, NULL,
  416. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  417. 0,
  418. 0, NULL,
  419. //
  420. // pwdneverexpires Password never expires
  421. //
  422. 0, (PWSTR)g_pszArg1UserPwdNeverExpires,
  423. ID_ARG2_NULL, NULL,
  424. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  425. 0,
  426. 0, NULL,
  427. //
  428. // disabled Disable Account
  429. //
  430. 0, (PWSTR)g_pszArg1UserDisableAccount,
  431. ID_ARG2_NULL, NULL,
  432. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  433. 0,
  434. 0, NULL,
  435. //
  436. // acctexpires Account Expires
  437. //
  438. 0, (PWSTR)g_pszArg1UserAcctExpires,
  439. ID_ARG2_NULL, NULL,
  440. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  441. 0,
  442. 0, NULL,
  443. //
  444. // reversiblepwd Password stored with reversible encryption
  445. //
  446. 0, (PWSTR)g_pszArg1UserReversiblePwd,
  447. ID_ARG2_NULL, NULL,
  448. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  449. 0,
  450. 0, NULL,
  451. //
  452. // memberof Member of group
  453. //
  454. 0, (PWSTR)g_pszArg1UserMemberOf,
  455. ID_ARG2_NULL, NULL,
  456. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  457. 0,
  458. 0, NULL,
  459. //
  460. // expand Recursively expand group membership
  461. //
  462. 0, (PWSTR)g_pszArg1UserExpand,
  463. ID_ARG2_NULL, NULL,
  464. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  465. 0,
  466. 0, NULL,
  467. ARG_TERMINATOR
  468. };
  469. ARG_RECORD DSGET_COMPUTER_COMMANDS[]=
  470. {
  471. //
  472. // SamID
  473. //
  474. 0, (PWSTR)g_pszArg1ComputerSAMID,
  475. ID_ARG2_NULL, NULL,
  476. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  477. 0,
  478. 0, NULL,
  479. //
  480. // sid
  481. //
  482. 0, (PWSTR)g_pszArg1ComputerSID,
  483. ID_ARG2_NULL, NULL,
  484. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  485. 0,
  486. 0, NULL,
  487. //
  488. // loc
  489. //
  490. 0, (PWSTR)g_pszArg1ComputerLoc,
  491. ID_ARG2_NULL, NULL,
  492. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  493. 0,
  494. 0, NULL,
  495. //
  496. // disabled Disable Account
  497. //
  498. 0, (PWSTR)g_pszArg1ComputerDisableAccount,
  499. ID_ARG2_NULL, NULL,
  500. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  501. 0,
  502. 0, NULL,
  503. //
  504. // memberof Member of group
  505. //
  506. 0, (PWSTR)g_pszArg1ComputerMemberOf,
  507. ID_ARG2_NULL, NULL,
  508. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  509. 0,
  510. 0, NULL,
  511. //
  512. // expand Recursively expand group membership
  513. //
  514. 0, (PWSTR)g_pszArg1ComputerExpand,
  515. ID_ARG2_NULL, NULL,
  516. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  517. (CMD_TYPE)_T(""),
  518. 0, NULL,
  519. ARG_TERMINATOR,
  520. };
  521. ARG_RECORD DSGET_GROUP_COMMANDS[]=
  522. {
  523. //
  524. // samname
  525. //
  526. 0, (PWSTR)g_pszArg1GroupSamid,
  527. ID_ARG2_NULL, NULL,
  528. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  529. 0,
  530. 0, NULL,
  531. //
  532. // sid
  533. //
  534. 0, (PWSTR)g_pszArg1GroupSID,
  535. ID_ARG2_NULL, NULL,
  536. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  537. 0,
  538. 0, NULL,
  539. //
  540. // secgrp Security enabled
  541. //
  542. 0, (PWSTR)g_pszArg1GroupSecGrp,
  543. ID_ARG2_NULL, NULL,
  544. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  545. 0,
  546. 0, NULL,
  547. //
  548. // scope Group scope (local/global/universal)
  549. //
  550. 0, (PWSTR)g_pszArg1GroupScope,
  551. ID_ARG2_NULL, NULL,
  552. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  553. 0,
  554. 0, NULL,
  555. //
  556. // memberof Member of groups
  557. //
  558. 0, (PWSTR)g_pszArg1GroupMemberOf,
  559. ID_ARG2_NULL, NULL,
  560. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  561. 0,
  562. 0, NULL,
  563. //
  564. // members Contains members
  565. //
  566. 0, (PWSTR)g_pszArg1GroupMembers,
  567. ID_ARG2_NULL, NULL,
  568. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  569. 0,
  570. 0, NULL,
  571. //
  572. // expand Recursively expand group membership
  573. //
  574. 0, (PWSTR)g_pszArg1GroupExpand,
  575. ID_ARG2_NULL, NULL,
  576. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  577. 0,
  578. 0, NULL,
  579. ARG_TERMINATOR,
  580. };
  581. ARG_RECORD DSGET_CONTACT_COMMANDS[]=
  582. {
  583. //
  584. // fn. FirstName
  585. //
  586. 0, (PWSTR)g_pszArg1UserFirstName,
  587. ID_ARG2_NULL, NULL,
  588. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  589. 0,
  590. 0, NULL,
  591. //
  592. // mi Middle Initial
  593. //
  594. 0, (PWSTR)g_pszArg1UserMiddleInitial,
  595. ID_ARG2_NULL, NULL,
  596. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  597. 0,
  598. 0, NULL,
  599. //
  600. // ln LastName
  601. //
  602. 0, (PWSTR)g_pszArg1UserLastName,
  603. ID_ARG2_NULL, NULL,
  604. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  605. 0,
  606. 0, NULL,
  607. //
  608. // display DisplayName
  609. //
  610. 0, (PWSTR)g_pszArg1UserDisplayName,
  611. ID_ARG2_NULL, NULL,
  612. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  613. 0,
  614. 0, NULL,
  615. //
  616. // office Office Location
  617. //
  618. 0, (PWSTR)g_pszArg1UserOffice,
  619. ID_ARG2_NULL, NULL,
  620. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  621. 0,
  622. 0, NULL,
  623. //
  624. // tel Telephone
  625. //
  626. 0, (PWSTR)g_pszArg1UserTelephone,
  627. ID_ARG2_NULL, NULL,
  628. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  629. 0,
  630. 0, NULL,
  631. //
  632. // email E-mail
  633. //
  634. 0, (PWSTR)g_pszArg1UserEmail,
  635. ID_ARG2_NULL, NULL,
  636. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  637. 0,
  638. 0, NULL,
  639. //
  640. // hometel Home Telephone
  641. //
  642. 0, (PWSTR)g_pszArg1UserHomeTelephone,
  643. ID_ARG2_NULL, NULL,
  644. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  645. 0,
  646. 0, NULL,
  647. //
  648. // pager Pager number
  649. //
  650. 0, (PWSTR)g_pszArg1UserPagerNumber,
  651. ID_ARG2_NULL, NULL,
  652. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  653. 0,
  654. 0, NULL,
  655. //
  656. // mobile Mobile Telephone Number
  657. //
  658. 0, (PWSTR)g_pszArg1UserMobileNumber,
  659. ID_ARG2_NULL, NULL,
  660. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  661. 0,
  662. 0, NULL,
  663. //
  664. // fax Fax Number
  665. //
  666. 0, (PWSTR)g_pszArg1UserFaxNumber,
  667. ID_ARG2_NULL, NULL,
  668. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  669. 0,
  670. 0, NULL,
  671. //
  672. // title Title
  673. //
  674. 0, (PWSTR)g_pszArg1UserTitle,
  675. ID_ARG2_NULL, NULL,
  676. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  677. 0,
  678. 0, NULL,
  679. //
  680. // dept Department
  681. //
  682. 0, (PWSTR)g_pszArg1UserDepartment,
  683. ID_ARG2_NULL, NULL,
  684. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  685. 0,
  686. 0, NULL,
  687. //
  688. // company Company
  689. //
  690. 0, (PWSTR)g_pszArg1UserCompany,
  691. ID_ARG2_NULL, NULL,
  692. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  693. 0,
  694. 0, NULL,
  695. ARG_TERMINATOR,
  696. };
  697. ARG_RECORD DSGET_SERVER_COMMANDS[]=
  698. {
  699. //
  700. // dnsname dnsHostName
  701. //
  702. 0, (PWSTR)g_pszArg1ServerDnsName,
  703. ID_ARG2_NULL, NULL,
  704. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  705. 0,
  706. 0, NULL,
  707. //
  708. // site
  709. //
  710. 0, (PWSTR)g_pszArg1ServerSite,
  711. ID_ARG2_NULL, NULL,
  712. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  713. 0,
  714. 0, NULL,
  715. //
  716. // isGC
  717. //
  718. 0, (PWSTR)g_pszArg1ServerIsGC,
  719. ID_ARG2_NULL, NULL,
  720. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  721. 0,
  722. 0, NULL,
  723. ARG_TERMINATOR,
  724. };
  725. ARG_RECORD DSGET_SITE_COMMANDS[]=
  726. {
  727. //
  728. // dnsname dnsHostName
  729. //
  730. 0, (PWSTR)g_pszArg1SiteAutotopology,
  731. ID_ARG2_NULL, NULL,
  732. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  733. 0,
  734. 0, NULL,
  735. //
  736. // site
  737. //
  738. 0, (PWSTR)g_pszArg1SiteCacheGroups,
  739. ID_ARG2_NULL, NULL,
  740. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  741. 0,
  742. 0, NULL,
  743. //
  744. // isGC
  745. //
  746. 0, (PWSTR)g_pszArg1SitePrefGCSite,
  747. ID_ARG2_NULL, NULL,
  748. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  749. 0,
  750. 0, NULL,
  751. ARG_TERMINATOR,
  752. };
  753. ARG_RECORD DSGET_SUBNET_COMMANDS[]=
  754. {
  755. //
  756. // loc Location
  757. //
  758. 0, (PWSTR)g_pszArg1SubnetLocation,
  759. ID_ARG2_NULL, NULL,
  760. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  761. 0,
  762. 0, NULL,
  763. //
  764. // site
  765. //
  766. 0, (PWSTR)g_pszArg1SubnetSite,
  767. ID_ARG2_NULL, NULL,
  768. ARG_TYPE_BOOL, ARG_FLAG_OPTIONAL,
  769. 0,
  770. 0, NULL,
  771. ARG_TERMINATOR,
  772. };
  773. //+-------------------------------------------------------------------------
  774. // Attributes
  775. //--------------------------------------------------------------------------
  776. //
  777. // Description
  778. //
  779. DSGET_ATTR_TABLE_ENTRY descriptionEntry =
  780. {
  781. c_sz_arg1_com_description,
  782. L"description",
  783. eCommDescription,
  784. CommonDisplayStringFunc,
  785. };
  786. //
  787. // SamID
  788. //
  789. DSGET_ATTR_TABLE_ENTRY UserSAMEntry =
  790. {
  791. g_pszArg1UserSAMID,
  792. L"sAMAccountName",
  793. eUserSamID,
  794. CommonDisplayStringFunc,
  795. };
  796. //
  797. // SamID
  798. //
  799. DSGET_ATTR_TABLE_ENTRY ComputerSAMEntry =
  800. {
  801. g_pszArg1ComputerSAMID,
  802. L"sAMAccountName",
  803. eComputerSamID,
  804. CommonDisplayStringFunc,
  805. };
  806. //
  807. // SID
  808. //
  809. DSGET_ATTR_TABLE_ENTRY UserSIDEntry =
  810. {
  811. g_pszArg1UserSID,
  812. L"objectSID",
  813. eUserSID,
  814. CommonDisplayStringFunc,
  815. };
  816. //
  817. // SID
  818. //
  819. DSGET_ATTR_TABLE_ENTRY ComputerSIDEntry =
  820. {
  821. g_pszArg1ComputerSID,
  822. L"objectSID",
  823. eComputerSID,
  824. CommonDisplayStringFunc,
  825. };
  826. //
  827. // SID
  828. //
  829. DSGET_ATTR_TABLE_ENTRY GroupSIDEntry =
  830. {
  831. g_pszArg1GroupSID,
  832. L"objectSID",
  833. eGroupSID,
  834. CommonDisplayStringFunc,
  835. };
  836. //
  837. // UPN
  838. //
  839. DSGET_ATTR_TABLE_ENTRY UserUPNEntry =
  840. {
  841. g_pszArg1UserUPN,
  842. L"userPrincipalName",
  843. eUserUpn,
  844. CommonDisplayStringFunc,
  845. };
  846. //
  847. // First name
  848. //
  849. DSGET_ATTR_TABLE_ENTRY firstNameUserEntry =
  850. {
  851. g_pszArg1UserFirstName,
  852. L"givenName",
  853. eUserFn,
  854. CommonDisplayStringFunc,
  855. };
  856. DSGET_ATTR_TABLE_ENTRY firstNameContactEntry =
  857. {
  858. g_pszArg1UserFirstName,
  859. L"givenName",
  860. eContactFn,
  861. CommonDisplayStringFunc,
  862. };
  863. //
  864. // Middle Initial
  865. //
  866. DSGET_ATTR_TABLE_ENTRY middleInitialUserEntry =
  867. {
  868. g_pszArg1UserMiddleInitial,
  869. L"initials",
  870. eUserMi,
  871. CommonDisplayStringFunc,
  872. };
  873. DSGET_ATTR_TABLE_ENTRY middleInitialContactEntry =
  874. {
  875. g_pszArg1UserMiddleInitial,
  876. L"initials",
  877. eContactMi,
  878. CommonDisplayStringFunc,
  879. };
  880. //
  881. // Last name
  882. //
  883. DSGET_ATTR_TABLE_ENTRY lastNameUserEntry =
  884. {
  885. g_pszArg1UserLastName,
  886. L"sn",
  887. eUserLn,
  888. CommonDisplayStringFunc,
  889. };
  890. DSGET_ATTR_TABLE_ENTRY lastNameContactEntry =
  891. {
  892. g_pszArg1UserLastName,
  893. L"sn",
  894. eContactLn,
  895. CommonDisplayStringFunc,
  896. };
  897. //
  898. // Display name
  899. //
  900. DSGET_ATTR_TABLE_ENTRY displayNameUserEntry =
  901. {
  902. g_pszArg1UserDisplayName,
  903. L"displayName",
  904. eUserDisplay,
  905. CommonDisplayStringFunc,
  906. };
  907. //
  908. // Employee ID
  909. //
  910. DSGET_ATTR_TABLE_ENTRY employeeIDUserEntry =
  911. {
  912. g_pszArg1UserEmployeeID,
  913. L"employeeID",
  914. eUserEmpID,
  915. CommonDisplayStringFunc,
  916. };
  917. DSGET_ATTR_TABLE_ENTRY displayNameContactEntry =
  918. {
  919. g_pszArg1UserDisplayName,
  920. L"displayName",
  921. eContactDisplay,
  922. CommonDisplayStringFunc,
  923. };
  924. //
  925. // Office
  926. //
  927. DSGET_ATTR_TABLE_ENTRY officeUserEntry =
  928. {
  929. g_pszArg1UserOffice,
  930. L"physicalDeliveryOfficeName",
  931. eUserOffice,
  932. CommonDisplayStringFunc,
  933. };
  934. DSGET_ATTR_TABLE_ENTRY officeContactEntry =
  935. {
  936. g_pszArg1UserOffice,
  937. L"physicalDeliveryOfficeName",
  938. eContactOffice,
  939. CommonDisplayStringFunc,
  940. };
  941. //
  942. // Telephone
  943. //
  944. DSGET_ATTR_TABLE_ENTRY telephoneUserEntry =
  945. {
  946. g_pszArg1UserTelephone,
  947. L"telephoneNumber",
  948. eUserTel,
  949. CommonDisplayStringFunc,
  950. };
  951. DSGET_ATTR_TABLE_ENTRY telephoneContactEntry =
  952. {
  953. g_pszArg1UserTelephone,
  954. L"telephoneNumber",
  955. eContactTel,
  956. CommonDisplayStringFunc,
  957. };
  958. //
  959. // Email
  960. //
  961. DSGET_ATTR_TABLE_ENTRY emailUserEntry =
  962. {
  963. g_pszArg1UserEmail,
  964. L"mail",
  965. eUserEmail,
  966. CommonDisplayStringFunc,
  967. };
  968. DSGET_ATTR_TABLE_ENTRY emailContactEntry =
  969. {
  970. g_pszArg1UserEmail,
  971. L"mail",
  972. eContactEmail,
  973. CommonDisplayStringFunc,
  974. };
  975. //
  976. // Home Telephone
  977. //
  978. DSGET_ATTR_TABLE_ENTRY homeTelephoneUserEntry =
  979. {
  980. g_pszArg1UserHomeTelephone,
  981. L"homePhone",
  982. eUserHometel,
  983. CommonDisplayStringFunc,
  984. };
  985. DSGET_ATTR_TABLE_ENTRY homeTelephoneContactEntry =
  986. {
  987. g_pszArg1UserHomeTelephone,
  988. L"homePhone",
  989. eContactHometel,
  990. CommonDisplayStringFunc,
  991. };
  992. //
  993. // Pager
  994. //
  995. DSGET_ATTR_TABLE_ENTRY pagerUserEntry =
  996. {
  997. g_pszArg1UserPagerNumber,
  998. L"pager",
  999. eUserPager,
  1000. CommonDisplayStringFunc,
  1001. };
  1002. DSGET_ATTR_TABLE_ENTRY pagerContactEntry =
  1003. {
  1004. g_pszArg1UserPagerNumber,
  1005. L"pager",
  1006. eContactPager,
  1007. CommonDisplayStringFunc,
  1008. };
  1009. //
  1010. // Mobile phone
  1011. //
  1012. DSGET_ATTR_TABLE_ENTRY mobileUserEntry =
  1013. {
  1014. g_pszArg1UserMobileNumber,
  1015. L"mobile",
  1016. eUserMobile,
  1017. CommonDisplayStringFunc,
  1018. };
  1019. DSGET_ATTR_TABLE_ENTRY mobileContactEntry =
  1020. {
  1021. g_pszArg1UserMobileNumber,
  1022. L"mobile",
  1023. eContactMobile,
  1024. CommonDisplayStringFunc,
  1025. };
  1026. //
  1027. // Fax
  1028. //
  1029. DSGET_ATTR_TABLE_ENTRY faxUserEntry =
  1030. {
  1031. g_pszArg1UserFaxNumber,
  1032. L"facsimileTelephoneNumber",
  1033. eUserFax,
  1034. CommonDisplayStringFunc,
  1035. };
  1036. DSGET_ATTR_TABLE_ENTRY faxContactEntry =
  1037. {
  1038. g_pszArg1UserFaxNumber,
  1039. L"facsimileTelephoneNumber",
  1040. eContactFax,
  1041. CommonDisplayStringFunc,
  1042. };
  1043. //
  1044. // IP phone #
  1045. //
  1046. DSGET_ATTR_TABLE_ENTRY ipPhoneUserEntry =
  1047. {
  1048. g_pszArg1UserIPTel,
  1049. L"ipPhones",
  1050. eUserIPTel,
  1051. CommonDisplayStringFunc,
  1052. };
  1053. //
  1054. // Web Page
  1055. //
  1056. DSGET_ATTR_TABLE_ENTRY webPageUserEntry =
  1057. {
  1058. g_pszArg1UserWebPage,
  1059. L"wWWHomePage",
  1060. eUserWebPage,
  1061. CommonDisplayStringFunc,
  1062. };
  1063. //
  1064. // Title
  1065. //
  1066. DSGET_ATTR_TABLE_ENTRY titleUserEntry =
  1067. {
  1068. g_pszArg1UserTitle,
  1069. L"title",
  1070. eUserTitle,
  1071. CommonDisplayStringFunc,
  1072. };
  1073. DSGET_ATTR_TABLE_ENTRY titleContactEntry =
  1074. {
  1075. g_pszArg1UserTitle,
  1076. L"title",
  1077. eContactTitle,
  1078. CommonDisplayStringFunc,
  1079. };
  1080. //
  1081. // Department
  1082. //
  1083. DSGET_ATTR_TABLE_ENTRY departmentUserEntry =
  1084. {
  1085. g_pszArg1UserDepartment,
  1086. L"department",
  1087. eUserDept,
  1088. CommonDisplayStringFunc,
  1089. };
  1090. DSGET_ATTR_TABLE_ENTRY departmentContactEntry =
  1091. {
  1092. g_pszArg1UserDepartment,
  1093. L"department",
  1094. eContactDept,
  1095. CommonDisplayStringFunc,
  1096. };
  1097. //
  1098. // Company
  1099. //
  1100. DSGET_ATTR_TABLE_ENTRY companyUserEntry =
  1101. {
  1102. g_pszArg1UserCompany,
  1103. L"company",
  1104. eUserCompany,
  1105. CommonDisplayStringFunc,
  1106. };
  1107. DSGET_ATTR_TABLE_ENTRY companyContactEntry =
  1108. {
  1109. g_pszArg1UserCompany,
  1110. L"company",
  1111. eContactCompany,
  1112. CommonDisplayStringFunc,
  1113. };
  1114. //
  1115. // Manager
  1116. //
  1117. DSGET_ATTR_TABLE_ENTRY managerUserEntry =
  1118. {
  1119. g_pszArg1UserManager,
  1120. L"manager",
  1121. eUserManager,
  1122. CommonDisplayStringFunc,
  1123. };
  1124. //
  1125. // Home directory
  1126. //
  1127. DSGET_ATTR_TABLE_ENTRY homeDirectoryUserEntry =
  1128. {
  1129. g_pszArg1UserHomeDirectory,
  1130. L"homeDirectory",
  1131. eUserHomeDirectory,
  1132. CommonDisplayStringFunc,
  1133. };
  1134. //
  1135. // Home drive
  1136. //
  1137. DSGET_ATTR_TABLE_ENTRY homeDriveUserEntry =
  1138. {
  1139. g_pszArg1UserHomeDrive,
  1140. L"homeDrive",
  1141. eUserHomeDrive,
  1142. CommonDisplayStringFunc,
  1143. };
  1144. //
  1145. // Profile path
  1146. //
  1147. DSGET_ATTR_TABLE_ENTRY profilePathUserEntry =
  1148. {
  1149. g_pszArg1UserProfile,
  1150. L"profilePath",
  1151. eUserProfilePath,
  1152. CommonDisplayStringFunc,
  1153. };
  1154. //
  1155. // Logon script
  1156. //
  1157. DSGET_ATTR_TABLE_ENTRY logonScriptUserEntry =
  1158. {
  1159. g_pszArg1UserLogonScript,
  1160. L"scriptPath",
  1161. eUserLogonScript,
  1162. CommonDisplayStringFunc,
  1163. };
  1164. //
  1165. // pwdLastSet
  1166. //
  1167. DSGET_ATTR_TABLE_ENTRY mustChangePwdUserEntry =
  1168. {
  1169. g_pszArg1UserMustChangePwd,
  1170. L"pwdLastSet",
  1171. eUserMustchpwd,
  1172. DisplayMustChangePassword,
  1173. };
  1174. //
  1175. // user account control
  1176. //
  1177. DSGET_ATTR_TABLE_ENTRY disableUserEntry =
  1178. {
  1179. g_pszArg1UserDisableAccount,
  1180. L"userAccountControl",
  1181. eUserDisabled,
  1182. DisplayAccountDisabled
  1183. };
  1184. DSGET_ATTR_TABLE_ENTRY disableComputerEntry =
  1185. {
  1186. g_pszArg1ComputerDisableAccount,
  1187. L"userAccountControl",
  1188. eComputerDisabled,
  1189. DisplayAccountDisabled
  1190. };
  1191. DSGET_ATTR_TABLE_ENTRY pwdNeverExpiresUserEntry =
  1192. {
  1193. g_pszArg1UserPwdNeverExpires,
  1194. L"userAccountControl",
  1195. eUserPwdneverexpires,
  1196. DisplayPasswordNeverExpires
  1197. };
  1198. DSGET_ATTR_TABLE_ENTRY reverisblePwdUserEntry =
  1199. {
  1200. g_pszArg1UserReversiblePwd,
  1201. L"userAccountControl",
  1202. eUserReversiblePwd,
  1203. DisplayReversiblePassword
  1204. };
  1205. //
  1206. // Account expires
  1207. //
  1208. DSGET_ATTR_TABLE_ENTRY accountExpiresUserEntry =
  1209. {
  1210. g_pszArg1UserAcctExpires,
  1211. L"accountExpires",
  1212. eUserAcctExpires,
  1213. DisplayAccountExpires,
  1214. };
  1215. //
  1216. // SAM Account Name
  1217. //
  1218. DSGET_ATTR_TABLE_ENTRY samNameGroupEntry =
  1219. {
  1220. g_pszArg1GroupSamid,
  1221. L"sAMAccountName",
  1222. eGroupSamname,
  1223. CommonDisplayStringFunc,
  1224. };
  1225. //
  1226. // Group Type
  1227. //
  1228. DSGET_ATTR_TABLE_ENTRY groupScopeTypeEntry =
  1229. {
  1230. g_pszArg1GroupScope,
  1231. L"groupType",
  1232. eGroupScope,
  1233. DisplayGroupScope
  1234. };
  1235. DSGET_ATTR_TABLE_ENTRY groupSecurityTypeEntry =
  1236. {
  1237. g_pszArg1GroupSecGrp,
  1238. L"groupType",
  1239. eGroupSecgrp,
  1240. DisplayGroupSecurityEnabled
  1241. };
  1242. //
  1243. // Group Members
  1244. //
  1245. DSGET_ATTR_TABLE_ENTRY membersGroupEntry =
  1246. {
  1247. g_pszArg1GroupMembers,
  1248. L"member",
  1249. eGroupMembers,
  1250. CommonDisplayStringFunc
  1251. };
  1252. //
  1253. // MemberOf
  1254. //
  1255. DSGET_ATTR_TABLE_ENTRY memberOfUserEntry =
  1256. {
  1257. L"Member of",
  1258. L"memberOf",
  1259. eUserMemberOf,
  1260. DisplayUserMemberOf
  1261. };
  1262. DSGET_ATTR_TABLE_ENTRY memberOfComputerEntry =
  1263. {
  1264. g_pszArg1UserMemberOf,
  1265. L"memberOf",
  1266. eComputerMemberOf,
  1267. DisplayComputerMemberOf
  1268. };
  1269. DSGET_ATTR_TABLE_ENTRY memberOfGroupEntry =
  1270. {
  1271. g_pszArg1GroupMemberOf,
  1272. L"memberOf",
  1273. eGroupMemberOf,
  1274. DisplayGroupMemberOf
  1275. };
  1276. //
  1277. // User Can Change Password
  1278. //
  1279. DSGET_ATTR_TABLE_ENTRY canChangePwdUserEntry =
  1280. {
  1281. g_pszArg1UserCanChangePwd,
  1282. NULL,
  1283. eUserCanchpwd,
  1284. DisplayCanChangePassword
  1285. };
  1286. //
  1287. // Server entries
  1288. //
  1289. DSGET_ATTR_TABLE_ENTRY dnsNameServerEntry =
  1290. {
  1291. g_pszArg1ServerDnsName,
  1292. L"dnsHostName",
  1293. eServerDnsName,
  1294. CommonDisplayStringFunc
  1295. };
  1296. DSGET_ATTR_TABLE_ENTRY siteServerEntry =
  1297. {
  1298. g_pszArg1ServerSite,
  1299. NULL,
  1300. eServerSite,
  1301. DisplayGrandparentRDN
  1302. };
  1303. DSGET_ATTR_TABLE_ENTRY isGCServerEntry =
  1304. {
  1305. g_pszArg1ServerIsGC,
  1306. NULL,
  1307. eServerIsGC,
  1308. IsServerGCDisplay
  1309. };
  1310. //
  1311. // Site entries
  1312. //
  1313. DSGET_ATTR_TABLE_ENTRY autoTopSiteEntry =
  1314. {
  1315. g_pszArg1SiteAutotopology,
  1316. NULL,
  1317. eSiteAutoTop,
  1318. IsAutotopologyEnabledSite
  1319. };
  1320. DSGET_ATTR_TABLE_ENTRY cacheGroupsSiteEntry =
  1321. {
  1322. g_pszArg1SiteCacheGroups,
  1323. NULL,
  1324. eSiteCacheGroups,
  1325. IsCacheGroupsEnabledSite
  1326. };
  1327. DSGET_ATTR_TABLE_ENTRY prefGCSiteEntry =
  1328. {
  1329. g_pszArg1SitePrefGCSite,
  1330. NULL,
  1331. eSitePrefGC,
  1332. DisplayPreferredGC
  1333. };
  1334. // Computer entries
  1335. DSGET_ATTR_TABLE_ENTRY locComputerEntry =
  1336. {
  1337. g_pszArg1ComputerLoc,
  1338. L"location",
  1339. eComputerLoc,
  1340. CommonDisplayStringFunc
  1341. };
  1342. //
  1343. // Subnet entries
  1344. //
  1345. DSGET_ATTR_TABLE_ENTRY locSubnetEntry =
  1346. {
  1347. g_pszArg1SubnetLocation,
  1348. L"location",
  1349. eSubnetLocation,
  1350. CommonDisplayStringFunc
  1351. };
  1352. DSGET_ATTR_TABLE_ENTRY siteSubnetEntry =
  1353. {
  1354. g_pszArg1SubnetSite,
  1355. L"siteObject",
  1356. eSubnetSite,
  1357. CommonDisplayStringFunc
  1358. };
  1359. //
  1360. //Attribute Table entries and ObjectTableEntries
  1361. //
  1362. //
  1363. // User
  1364. //
  1365. PDSGET_ATTR_TABLE_ENTRY UserAttributeTable[] =
  1366. {
  1367. &descriptionEntry,
  1368. &UserSAMEntry,
  1369. &UserSIDEntry,
  1370. &UserUPNEntry,
  1371. &firstNameUserEntry,
  1372. &middleInitialUserEntry,
  1373. &lastNameUserEntry,
  1374. &displayNameUserEntry,
  1375. &employeeIDUserEntry,
  1376. &officeUserEntry,
  1377. &telephoneUserEntry,
  1378. &emailUserEntry,
  1379. &homeTelephoneUserEntry,
  1380. &pagerUserEntry,
  1381. &mobileUserEntry,
  1382. &faxUserEntry,
  1383. &ipPhoneUserEntry,
  1384. &webPageUserEntry,
  1385. &titleUserEntry,
  1386. &departmentUserEntry,
  1387. &companyUserEntry,
  1388. &managerUserEntry,
  1389. &homeDirectoryUserEntry,
  1390. &homeDriveUserEntry,
  1391. &profilePathUserEntry,
  1392. &logonScriptUserEntry,
  1393. &mustChangePwdUserEntry,
  1394. &canChangePwdUserEntry,
  1395. &reverisblePwdUserEntry,
  1396. &pwdNeverExpiresUserEntry,
  1397. &accountExpiresUserEntry,
  1398. &disableUserEntry,
  1399. &memberOfUserEntry
  1400. };
  1401. DSGetObjectTableEntry g_UserObjectEntry =
  1402. {
  1403. L"user",
  1404. g_pszUser,
  1405. DSGET_USER_COMMANDS,
  1406. USAGE_DSGET_USER,
  1407. sizeof(UserAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1408. UserAttributeTable,
  1409. };
  1410. //
  1411. // Contact
  1412. //
  1413. PDSGET_ATTR_TABLE_ENTRY ContactAttributeTable[] =
  1414. {
  1415. &descriptionEntry,
  1416. &firstNameContactEntry,
  1417. &middleInitialContactEntry,
  1418. &lastNameContactEntry,
  1419. &displayNameContactEntry,
  1420. &officeContactEntry,
  1421. &telephoneContactEntry,
  1422. &emailContactEntry,
  1423. &homeTelephoneContactEntry,
  1424. &pagerContactEntry,
  1425. &mobileContactEntry,
  1426. &faxContactEntry,
  1427. &titleContactEntry,
  1428. &departmentContactEntry,
  1429. &companyContactEntry,
  1430. };
  1431. DSGetObjectTableEntry g_ContactObjectEntry =
  1432. {
  1433. L"contact",
  1434. g_pszContact,
  1435. DSGET_CONTACT_COMMANDS,
  1436. USAGE_DSGET_CONTACT,
  1437. sizeof(ContactAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1438. ContactAttributeTable,
  1439. };
  1440. //
  1441. // Computer
  1442. //
  1443. PDSGET_ATTR_TABLE_ENTRY ComputerAttributeTable[] =
  1444. {
  1445. &descriptionEntry,
  1446. &ComputerSAMEntry,
  1447. &ComputerSIDEntry,
  1448. &locComputerEntry,
  1449. &disableComputerEntry,
  1450. &memberOfComputerEntry,
  1451. };
  1452. DSGetObjectTableEntry g_ComputerObjectEntry =
  1453. {
  1454. L"computer",
  1455. g_pszComputer,
  1456. DSGET_COMPUTER_COMMANDS,
  1457. USAGE_DSGET_COMPUTER,
  1458. sizeof(ComputerAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1459. ComputerAttributeTable,
  1460. };
  1461. //
  1462. // Group
  1463. //
  1464. PDSGET_ATTR_TABLE_ENTRY GroupAttributeTable[] =
  1465. {
  1466. &descriptionEntry,
  1467. &samNameGroupEntry,
  1468. &GroupSIDEntry,
  1469. &groupScopeTypeEntry,
  1470. &groupSecurityTypeEntry,
  1471. &memberOfGroupEntry,
  1472. &membersGroupEntry,
  1473. };
  1474. DSGetObjectTableEntry g_GroupObjectEntry =
  1475. {
  1476. L"group",
  1477. g_pszGroup,
  1478. DSGET_GROUP_COMMANDS,
  1479. USAGE_DSGET_GROUP,
  1480. sizeof(GroupAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1481. GroupAttributeTable,
  1482. };
  1483. //
  1484. // OU
  1485. //
  1486. PDSGET_ATTR_TABLE_ENTRY OUAttributeTable[] =
  1487. {
  1488. &descriptionEntry
  1489. };
  1490. DSGetObjectTableEntry g_OUObjectEntry =
  1491. {
  1492. L"ou",
  1493. g_pszOU,
  1494. NULL,
  1495. USAGE_DSGET_OU,
  1496. sizeof(OUAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1497. OUAttributeTable,
  1498. };
  1499. //
  1500. // Server
  1501. //
  1502. PDSGET_ATTR_TABLE_ENTRY ServerAttributeTable[] =
  1503. {
  1504. &dnsNameServerEntry,
  1505. &siteServerEntry,
  1506. &isGCServerEntry
  1507. };
  1508. DSGetObjectTableEntry g_ServerObjectEntry =
  1509. {
  1510. L"server",
  1511. g_pszServer,
  1512. DSGET_SERVER_COMMANDS,
  1513. USAGE_DSGET_SERVER,
  1514. sizeof(ServerAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1515. ServerAttributeTable,
  1516. };
  1517. //
  1518. // Site
  1519. //
  1520. PDSGET_ATTR_TABLE_ENTRY SiteAttributeTable[] =
  1521. {
  1522. &autoTopSiteEntry,
  1523. &cacheGroupsSiteEntry,
  1524. &prefGCSiteEntry
  1525. };
  1526. DSGetObjectTableEntry g_SiteObjectEntry =
  1527. {
  1528. L"site",
  1529. g_pszSite,
  1530. DSGET_SITE_COMMANDS,
  1531. USAGE_DSGET_SITE,
  1532. sizeof(SiteAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1533. SiteAttributeTable,
  1534. };
  1535. //
  1536. // Subnet
  1537. //
  1538. PDSGET_ATTR_TABLE_ENTRY SubnetAttributeTable[] =
  1539. {
  1540. &descriptionEntry,
  1541. &locSubnetEntry,
  1542. &siteSubnetEntry
  1543. };
  1544. DSGetObjectTableEntry g_SubnetObjectEntry =
  1545. {
  1546. L"subnet",
  1547. g_pszSubnet,
  1548. DSGET_SUBNET_COMMANDS,
  1549. USAGE_DSGET_SUBNET,
  1550. sizeof(SubnetAttributeTable)/sizeof(PDSATTRIBUTETABLEENTRY),
  1551. SubnetAttributeTable,
  1552. };
  1553. //+-------------------------------------------------------------------------
  1554. // Object Table
  1555. //--------------------------------------------------------------------------
  1556. PDSGetObjectTableEntry g_DSObjectTable[] =
  1557. {
  1558. &g_OUObjectEntry,
  1559. &g_UserObjectEntry,
  1560. &g_ContactObjectEntry,
  1561. &g_ComputerObjectEntry,
  1562. &g_GroupObjectEntry,
  1563. &g_ServerObjectEntry,
  1564. &g_SiteObjectEntry,
  1565. &g_SubnetObjectEntry,
  1566. NULL
  1567. };