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.

944 lines
21 KiB

  1. Remove this file. No one us using it.
  2. //---------------------------------------------------------------------------
  3. //
  4. // Microsoft Windows
  5. // Copyright (C) Microsoft Corporation, 1992 - 1995
  6. //
  7. // File: oleds.odl
  8. //
  9. // Contents: Top level odl file for the ADs project
  10. //
  11. // History: 11-1-95 krishnag Created.
  12. //
  13. //----------------------------------------------------------------------------
  14. #include "ldap.hxx"
  15. #pragma hdrstop
  16. struct _propmap
  17. {
  18. LPTSTR pszADsProp;
  19. LPTSTR pszLDAPProp;
  20. } aCompPropMapping[] =
  21. { // { TEXT("Description"), TEXT("description") },
  22. // { TEXT("Owner"), TEXT("owner") },
  23. { TEXT("Role"), TEXT("machineRole") },
  24. { TEXT("NetAddresses"), TEXT("networkAddress") }
  25. };
  26. // Class CLDAPComputer
  27. DEFINE_IDispatch_Implementation(CLDAPComputer)
  28. DEFINE_CONTAINED_IADs_Implementation(CLDAPComputer)
  29. DEFINE_CONTAINED_IADsContainer_Implementation(CLDAPComputer)
  30. CLDAPComputer::CLDAPComputer()
  31. : _pADs(NULL),
  32. _pADsContainer(NULL),
  33. _pDispMgr(NULL)
  34. // _DomainName(NULL)
  35. {
  36. ENLIST_TRACKING(CLDAPDomain);
  37. }
  38. HRESULT
  39. CLDAPComputer::CreateComputer(
  40. IADs *pADs,
  41. REFIID riid,
  42. void **ppvObj
  43. )
  44. {
  45. CLDAPComputer FAR * pComputer = NULL;
  46. HRESULT hr = S_OK;
  47. hr = AllocateComputerObject(
  48. pADs,
  49. &pComputer
  50. );
  51. BAIL_ON_FAILURE(hr);
  52. hr = pComputer->QueryInterface(riid, ppvObj);
  53. BAIL_ON_FAILURE(hr);
  54. pComputer->Release();
  55. RRETURN(hr);
  56. error:
  57. *ppvObj = NULL;
  58. delete pComputer;
  59. RRETURN(hr);
  60. }
  61. #if 0
  62. HRESULT
  63. CLDAPComputer::CreateComputer(
  64. BSTR Parent,
  65. BSTR DomainName,
  66. BSTR ComputerName,
  67. DWORD dwObjectState,
  68. REFIID riid,
  69. void **ppvObj
  70. )
  71. {
  72. CLDAPComputer FAR * pComputer = NULL;
  73. HRESULT hr = S_OK;
  74. hr = AllocateComputerObject(
  75. &pComputer
  76. );
  77. BAIL_ON_FAILURE(hr);
  78. hr = pComputer->InitializeCoreObject(
  79. Parent,
  80. ComputerName,
  81. COMPUTER_CLASS_NAME,
  82. COMPUTER_SCHEMA_NAME,
  83. CLSID_WinNTComputer,
  84. dwObjectState
  85. );
  86. BAIL_ON_FAILURE(hr);
  87. hr = ADsAllocString( DomainName, &pComputer->_DomainName);
  88. BAIL_ON_FAILURE(hr);
  89. hr = pComputer->QueryInterface(riid, ppvObj);
  90. BAIL_ON_FAILURE(hr);
  91. pComputer->Release();
  92. RRETURN(hr);
  93. error:
  94. delete pComputer;
  95. RRETURN(hr);
  96. }
  97. #endif
  98. CLDAPComputer::~CLDAPComputer( )
  99. {
  100. if ( _pADs )
  101. _pADs->Release();
  102. if ( _pADsContainer )
  103. _pADsContainer->Release();
  104. delete _pDispMgr;
  105. }
  106. STDMETHODIMP
  107. CLDAPComputer::QueryInterface(
  108. REFIID iid,
  109. LPVOID FAR* ppv
  110. )
  111. {
  112. if (IsEqualIID(iid, IID_IUnknown))
  113. {
  114. *ppv = (IADsComputer FAR *) this;
  115. }
  116. else if (IsEqualIID(iid, IID_IADsComputer))
  117. {
  118. *ppv = (IADsComputer FAR *) this;
  119. }
  120. else if (IsEqualIID(iid, IID_IADsComputerOperations))
  121. {
  122. *ppv = (IADsComputerOperations FAR *) this;
  123. }
  124. else if (IsEqualIID(iid, IID_IADsContainer) && _pADsContainer )
  125. {
  126. *ppv = (IADsContainer FAR *) this;
  127. }
  128. else if (IsEqualIID(iid, IID_IADsPropertyList) && _pADsPropList )
  129. {
  130. *ppv = (IADsPropertyList FAR *) this;
  131. }
  132. else if (IsEqualIID(iid, IID_IADs))
  133. {
  134. *ppv = (IADsComputer FAR *) this;
  135. }
  136. else if (IsEqualIID(iid, IID_IDispatch))
  137. {
  138. *ppv = (IADsComputer FAR *) this;
  139. }
  140. else
  141. {
  142. *ppv = NULL;
  143. return E_NOINTERFACE;
  144. }
  145. AddRef();
  146. return NOERROR;
  147. }
  148. HRESULT
  149. CLDAPComputer::AllocateComputerObject(
  150. IADs *pADs,
  151. CLDAPComputer ** ppComputer
  152. )
  153. {
  154. CLDAPComputer FAR * pComputer = NULL;
  155. CAggregateeDispMgr FAR * pDispMgr = NULL;
  156. HRESULT hr = S_OK;
  157. IADsContainer FAR * pADsContainer = NULL;
  158. IDispatch *pDispatch = NULL;
  159. pComputer = new CLDAPComputer();
  160. if (pComputer == NULL) {
  161. hr = E_OUTOFMEMORY;
  162. }
  163. BAIL_ON_FAILURE(hr);
  164. pDispMgr = new CAggregateeDispMgr;
  165. if (pDispMgr == NULL) {
  166. hr = E_OUTOFMEMORY;
  167. }
  168. BAIL_ON_FAILURE(hr);
  169. hr = pDispMgr->LoadTypeInfoEntry(
  170. LIBID_ADs,
  171. IID_IADsComputer,
  172. (IADsComputer *)pComputer,
  173. DISPID_REGULAR
  174. );
  175. BAIL_ON_FAILURE(hr);
  176. hr = pDispMgr->LoadTypeInfoEntry(
  177. LIBID_ADs,
  178. IID_IADsComputerOperations,
  179. (IADsComputerOperations *)pComputer,
  180. DISPID_REGULAR
  181. );
  182. BAIL_ON_FAILURE(hr);
  183. hr = pDispMgr->LoadTypeInfoEntry(
  184. LIBID_ADs,
  185. IID_IADsContainer,
  186. (IADsContainer *)pComputer,
  187. DISPID_NEWENUM
  188. );
  189. BAIL_ON_FAILURE(hr);
  190. hr = pDispMgr->LoadTypeInfoEntry(
  191. LIBID_ADs,
  192. IID_IADsPropertyList,
  193. (IADsPropertyList *)pComputer,
  194. DISPID_VALUE
  195. );
  196. BAIL_ON_FAILURE(hr);
  197. hr = pADs->QueryInterface(IID_IDispatch, (void **)&pDispatch);
  198. BAIL_ON_FAILURE(hr);
  199. pDispMgr->RegisterBaseDispatchPtr(pDispatch);
  200. pComputer->_pADs = pADs;
  201. pADs->AddRef();
  202. hr = pADs->QueryInterface(
  203. IID_IADsContainer,
  204. (void **) &pADsContainer );
  205. BAIL_ON_FAILURE(hr);
  206. pComputer->_pADsContainer = pADsContainer;
  207. pComputer->_pDispMgr = pDispMgr;
  208. *ppComputer = pComputer;
  209. RRETURN(hr);
  210. error:
  211. if ( pADsContainer )
  212. pADsContainer->Release();
  213. delete pDispMgr;
  214. delete pComputer;
  215. RRETURN(hr);
  216. }
  217. /* IADs methods */
  218. STDMETHODIMP
  219. CLDAPComputer::Get(THIS_ BSTR bstrName, VARIANT FAR* pvProp)
  220. {
  221. LPTSTR pszPropName = bstrName;
  222. for ( DWORD i = 0; i < ARRAY_SIZE(aCompPropMapping); i++ )
  223. {
  224. if ( _tcsicmp(bstrName, aCompPropMapping[i].pszADsProp ) == 0 )
  225. {
  226. pszPropName = aCompPropMapping[i].pszLDAPProp;
  227. break;
  228. }
  229. }
  230. RRETURN(_pADs->Get( pszPropName, pvProp));
  231. }
  232. STDMETHODIMP
  233. CLDAPComputer::Put(THIS_ BSTR bstrName, VARIANT vProp)
  234. {
  235. LPTSTR pszPropName = bstrName;
  236. for ( DWORD i = 0; i < ARRAY_SIZE(aCompPropMapping); i++ )
  237. {
  238. if ( _tcsicmp(bstrName, aCompPropMapping[i].pszADsProp) == 0 )
  239. {
  240. pszPropName = aCompPropMapping[i].pszLDAPProp;
  241. break;
  242. }
  243. }
  244. RRETURN(_pADs->Put( pszPropName, vProp));
  245. }
  246. #if 0
  247. STDMETHODIMP
  248. CLDAPComputer::SetInfo(THIS)
  249. {
  250. HRESULT hr = S_OK;
  251. NET_API_STATUS nasStatus;
  252. WCHAR szHostServerName[MAX_PATH];
  253. if (GetObjectState() == ADS_OBJECT_UNBOUND) {
  254. hr = WinNTGetCachedPDCName(
  255. _DomainName,
  256. szHostServerName
  257. );
  258. BAIL_ON_FAILURE(hr);
  259. hr = WinNTCreateComputer(
  260. (szHostServerName + 2),
  261. _Name
  262. );
  263. BAIL_ON_FAILURE(hr);
  264. SetObjectState(ADS_OBJECT_BOUND);
  265. }else {
  266. RRETURN(E_NOTIMPL);
  267. }
  268. error:
  269. RRETURN(hr);
  270. }
  271. STDMETHODIMP
  272. CLDAPComputer::GetInfo(THIS)
  273. {
  274. RRETURN(GetInfo(4, TRUE));
  275. }
  276. #endif
  277. /* IADsContainer methods */
  278. #if 0
  279. STDMETHODIMP
  280. CLDAPComputer::get__NewEnum(THIS_ IUnknown * FAR* retval)
  281. {
  282. HRESULT hr;
  283. IUnknown FAR* punkEnum=NULL;
  284. IEnumVARIANT * penum = NULL;
  285. *retval = NULL;
  286. hr = CLDAPComputerEnum::Create(
  287. (CLDAPComputerEnum **)&penum,
  288. _ADsPath,
  289. _DomainName,
  290. _Name,
  291. _vFilter
  292. );
  293. BAIL_ON_FAILURE(hr);
  294. hr = penum->QueryInterface(
  295. IID_IUnknown,
  296. (VOID FAR* FAR*)retval
  297. );
  298. BAIL_ON_FAILURE(hr);
  299. if (penum) {
  300. penum->Release();
  301. }
  302. RRETURN(NOERROR);
  303. error:
  304. if (penum) {
  305. delete penum;
  306. }
  307. RRETURN(hr);
  308. }
  309. STDMETHODIMP
  310. CLDAPComputer::Create(
  311. THIS_ BSTR ClassName,
  312. BSTR RelativeName,
  313. IUnknown * FAR* ppObject
  314. )
  315. {
  316. ULONG ObjectType = 0;
  317. HRESULT hr;
  318. POBJECTINFO pObjectInfo = NULL;
  319. hr = GetObjectType(gpFilters,
  320. gdwMaxFilters,
  321. ClassName,
  322. (PDWORD)&ObjectType
  323. );
  324. BAIL_ON_FAILURE(hr);
  325. hr = BuildObjectInfo(_ADsPath,
  326. RelativeName,
  327. &pObjectInfo
  328. );
  329. BAIL_ON_FAILURE(hr);
  330. hr = ValidateObject(ObjectType,
  331. pObjectInfo
  332. );
  333. if(SUCCEEDED(hr)){
  334. hr = HRESULT_FROM_WIN32(NERR_ResourceExists);
  335. BAIL_ON_FAILURE(hr);
  336. }
  337. switch (ObjectType) {
  338. case WINNT_USER_ID:
  339. hr = CLDAPNTUser::CreateUser(_ADsPath,
  340. WINNT_COMPUTER_ID,
  341. NULL,
  342. _Name,
  343. RelativeName,
  344. ADS_OBJECT_UNBOUND,
  345. IID_IUnknown,
  346. (void **)ppObject
  347. );
  348. BAIL_ON_FAILURE(hr);
  349. break;
  350. case WINNT_PRINTER_ID:
  351. hr = CLDAPNTPrintQueue::CreatePrintQueue(_ADsPath,
  352. WINNT_COMPUTER_ID,
  353. pObjectInfo->ComponentArray[0],
  354. pObjectInfo->ComponentArray[1],
  355. RelativeName,
  356. ADS_OBJECT_UNBOUND,
  357. IID_IUnknown,
  358. (void**)ppObject
  359. );
  360. BAIL_ON_FAILURE(hr);
  361. break;
  362. case WINNT_GROUP_ID:
  363. hr = CLDAPNTGroup::CreateGroup(
  364. _ADsPath,
  365. WINNT_COMPUTER_ID,
  366. NULL,
  367. _Name,
  368. RelativeName,
  369. WINNT_GROUP_LOCAL,
  370. ADS_OBJECT_UNBOUND,
  371. IID_IUnknown,
  372. (void **)ppObject
  373. );
  374. BAIL_ON_FAILURE(hr);
  375. break;
  376. case WINNT_SERVICE_ID:
  377. hr = CLDAPNTService::Create(_ADsPath,
  378. pObjectInfo->ComponentArray[0],
  379. pObjectInfo->ComponentArray[1],
  380. RelativeName,
  381. ADS_OBJECT_UNBOUND,
  382. IID_IUnknown,
  383. (void**)ppObject
  384. );
  385. BAIL_ON_FAILURE(hr);
  386. break;
  387. default:
  388. RRETURN(E_ADS_UNKNOWN_OBJECT);
  389. }
  390. error:
  391. FreeObjectInfo(pObjectInfo);
  392. RRETURN(hr);
  393. }
  394. STDMETHODIMP
  395. CLDAPComputer::Delete(
  396. BSTR bstrClassName,
  397. BSTR bstrSourceName
  398. )
  399. {
  400. ULONG ObjectType = 0;
  401. POBJECTINFO pObjectInfo = NULL;
  402. BOOL fStatus = FALSE;
  403. HRESULT hr = S_OK;
  404. WCHAR szUncServerName[MAX_PATH];
  405. hr = GetObjectType(gpFilters,
  406. gdwMaxFilters,
  407. bstrClassName,
  408. (PDWORD)&ObjectType );
  409. BAIL_ON_FAILURE(hr);
  410. hr = BuildObjectInfo(
  411. _ADsPath,
  412. bstrSourceName,
  413. &pObjectInfo
  414. );
  415. BAIL_ON_FAILURE(hr);
  416. switch (ObjectType) {
  417. case WINNT_USER_ID:
  418. hr = WinNTDeleteUser(pObjectInfo);
  419. BAIL_ON_FAILURE(hr);
  420. break;
  421. case WINNT_GROUP_ID:
  422. hr = WinNTDeleteGroup(pObjectInfo);
  423. BAIL_ON_FAILURE(hr);
  424. break;
  425. case WINNT_PRINTER_ID:
  426. hr = WinNTDeletePrinter(pObjectInfo);
  427. BAIL_ON_FAILURE(hr);
  428. break;
  429. case WINNT_SERVICE_ID:
  430. hr = WinNTDeleteService(pObjectInfo);
  431. BAIL_ON_FAILURE(hr);
  432. break;
  433. default:
  434. hr = E_ADS_UNKNOWN_OBJECT;
  435. break;
  436. }
  437. error:
  438. if (pObjectInfo) {
  439. FreeObjectInfo(pObjectInfo);
  440. }
  441. RRETURN(hr);
  442. }
  443. #endif
  444. #if 0
  445. WCHAR *szCurrentVersion = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
  446. WCHAR *szHardwareInfo = L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
  447. STDMETHODIMP
  448. CLDAPComputer::GetInfo(
  449. THIS_ DWORD dwApiLevel,
  450. BOOL fExplicit
  451. )
  452. {
  453. COMP_INFO_4 CompInfo4;
  454. PCOMP_INFO_4 pCompInfo4 = &CompInfo4;
  455. DWORD dwRet = 0;
  456. HKEY hKey = NULL;
  457. HKEY hCurrentKey = NULL;
  458. HKEY hHardwareKey = NULL;
  459. DWORD cbData = 0;
  460. HRESULT hr = S_OK;
  461. WCHAR lpszServerName[MAX_PATH];
  462. memset(pCompInfo4, 0, sizeof(COMP_INFO_4));
  463. switch (dwApiLevel) {
  464. case 4:
  465. hr = MakeUncName(_Name, lpszServerName);
  466. BAIL_ON_FAILURE(hr);
  467. dwRet = RegConnectRegistry(
  468. lpszServerName,
  469. HKEY_LOCAL_MACHINE,
  470. &hKey
  471. );
  472. if (dwRet !=ERROR_SUCCESS) {
  473. hr = HRESULT_FROM_WIN32(dwRet);
  474. BAIL_ON_FAILURE(hr);
  475. }
  476. dwRet = RegOpenKeyEx(
  477. hKey,
  478. szCurrentVersion,
  479. 0,
  480. KEY_READ,
  481. &hCurrentKey
  482. );
  483. if (dwRet != ERROR_SUCCESS) {
  484. hr = HRESULT_FROM_WIN32(dwRet);
  485. BAIL_ON_FAILURE(hr);
  486. }
  487. wcscpy(pCompInfo4->szOS, L"Windows NT");
  488. cbData = sizeof(pCompInfo4->szOSVersion);
  489. dwRet = RegQueryValueEx(
  490. hCurrentKey,
  491. L"CurrentVersion",
  492. NULL,
  493. NULL,
  494. (LPBYTE)pCompInfo4->szOSVersion,
  495. &cbData
  496. );
  497. cbData = sizeof(pCompInfo4->szOwner);
  498. dwRet = RegQueryValueEx(
  499. hCurrentKey,
  500. L"RegisteredOwner",
  501. NULL,
  502. NULL,
  503. (LPBYTE)pCompInfo4->szOwner,
  504. &cbData
  505. );
  506. cbData = sizeof(pCompInfo4->szDivision),
  507. dwRet = RegQueryValueEx(
  508. hCurrentKey,
  509. L"RegisteredOrganization",
  510. NULL,
  511. NULL,
  512. (LPBYTE)pCompInfo4->szDivision,
  513. &cbData
  514. );
  515. cbData = sizeof(pCompInfo4->szProcessorCount),
  516. dwRet = RegQueryValueEx(
  517. hCurrentKey,
  518. L"CurrentType",
  519. NULL,
  520. NULL,
  521. (LPBYTE)pCompInfo4->szProcessorCount,
  522. &cbData
  523. );
  524. dwRet = RegOpenKeyEx(
  525. hKey,
  526. szHardwareInfo,
  527. 0,
  528. KEY_READ,
  529. &hHardwareKey
  530. );
  531. if (dwRet != ERROR_SUCCESS) {
  532. hr = HRESULT_FROM_WIN32(dwRet);
  533. BAIL_ON_FAILURE(hr);
  534. }
  535. cbData = sizeof(pCompInfo4->szProcessor),
  536. dwRet = RegQueryValueEx(
  537. hHardwareKey,
  538. L"Identifier",
  539. NULL,
  540. NULL,
  541. (LPBYTE)pCompInfo4->szProcessor,
  542. &cbData
  543. );
  544. hr = UnMarshall_Level4(fExplicit, pCompInfo4);
  545. error:
  546. if (hCurrentKey) {
  547. RegCloseKey(hCurrentKey);
  548. }
  549. if (hHardwareKey) {
  550. RegCloseKey(hHardwareKey);
  551. }
  552. if (hKey) {
  553. RegCloseKey(hKey);
  554. }
  555. RRETURN(hr);
  556. default:
  557. RRETURN(E_FAIL);
  558. }
  559. }
  560. HRESULT
  561. CLDAPComputer::UnMarshall_Level4(
  562. BOOL fExplicit,
  563. LPCOMP_INFO_4 pCompInfo4
  564. )
  565. {
  566. HRESULT hr = S_OK;
  567. hr = SetLPTSTRPropertyInCache(
  568. _pPropertyCache,
  569. TEXT("OperatingSystem"),
  570. pCompInfo4->szOS,
  571. fExplicit
  572. );
  573. hr = SetLPTSTRPropertyInCache(
  574. _pPropertyCache,
  575. TEXT("OperatingSystemVersion"),
  576. pCompInfo4->szOSVersion,
  577. fExplicit
  578. );
  579. hr = SetLPTSTRPropertyInCache(
  580. _pPropertyCache,
  581. TEXT("Owner"),
  582. pCompInfo4->szOwner,
  583. fExplicit
  584. );
  585. hr = SetLPTSTRPropertyInCache(
  586. _pPropertyCache,
  587. TEXT("Division"),
  588. pCompInfo4->szDivision,
  589. fExplicit
  590. );
  591. hr = SetLPTSTRPropertyInCache(
  592. _pPropertyCache,
  593. TEXT("ProcessorCount"),
  594. pCompInfo4->szProcessorCount,
  595. fExplicit
  596. );
  597. hr = SetLPTSTRPropertyInCache(
  598. _pPropertyCache,
  599. TEXT("Processor"),
  600. pCompInfo4->szProcessor,
  601. fExplicit
  602. );
  603. RRETURN(S_OK);
  604. }
  605. #endif
  606. /* IADsComputerOperations methods */
  607. STDMETHODIMP
  608. CLDAPComputer::Status(
  609. IDispatch * FAR * ppObject
  610. )
  611. {
  612. RRETURN(E_NOTIMPL);
  613. }
  614. STDMETHODIMP
  615. CLDAPComputer::Shutdown(
  616. VARIANT_BOOL bReboot
  617. )
  618. {
  619. RRETURN(E_NOTIMPL);
  620. }
  621. /* IADsComputer methods */
  622. STDMETHODIMP CLDAPComputer::get_ComputerID(THIS_ BSTR FAR* retval)
  623. {
  624. GET_PROPERTY_BSTR((IADsComputer *)this, ComputerID);
  625. }
  626. STDMETHODIMP CLDAPComputer::get_Site(THIS_ BSTR FAR* retval)
  627. {
  628. GET_PROPERTY_BSTR((IADsComputer *)this, Site);
  629. }
  630. STDMETHODIMP CLDAPComputer::get_Description(THIS_ BSTR FAR* retval)
  631. {
  632. GET_PROPERTY_BSTR((IADsComputer *)this, Description);
  633. }
  634. STDMETHODIMP CLDAPComputer::put_Description(THIS_ BSTR bstrDescription)
  635. {
  636. PUT_PROPERTY_BSTR((IADsComputer *)this, Description);
  637. }
  638. STDMETHODIMP CLDAPComputer::get_Location(THIS_ BSTR FAR* retval)
  639. {
  640. GET_PROPERTY_BSTR((IADsComputer *)this, Location);
  641. }
  642. STDMETHODIMP CLDAPComputer::put_Location(THIS_ BSTR bstrLocation)
  643. {
  644. PUT_PROPERTY_BSTR((IADsComputer *)this, Location);
  645. }
  646. STDMETHODIMP CLDAPComputer::get_PrimaryUser(THIS_ BSTR FAR* retval)
  647. {
  648. GET_PROPERTY_BSTR((IADsComputer *)this, PrimaryUser);
  649. }
  650. STDMETHODIMP CLDAPComputer::put_PrimaryUser(THIS_ BSTR bstrPrimaryUser)
  651. {
  652. PUT_PROPERTY_BSTR((IADsComputer *)this, PrimaryUser);
  653. }
  654. STDMETHODIMP CLDAPComputer::get_Owner(THIS_ BSTR FAR* retval)
  655. {
  656. GET_PROPERTY_BSTR((IADsComputer *)this, Owner);
  657. }
  658. STDMETHODIMP CLDAPComputer::put_Owner(THIS_ BSTR bstrOwner)
  659. {
  660. PUT_PROPERTY_BSTR((IADsComputer *)this, Owner);
  661. }
  662. STDMETHODIMP CLDAPComputer::get_Division(THIS_ BSTR FAR* retval)
  663. {
  664. GET_PROPERTY_BSTR((IADsComputer *)this, Division);
  665. }
  666. STDMETHODIMP CLDAPComputer::put_Division(THIS_ BSTR bstrDivision)
  667. {
  668. PUT_PROPERTY_BSTR((IADsComputer *)this, Division);
  669. }
  670. STDMETHODIMP CLDAPComputer::get_Department(THIS_ BSTR FAR* retval)
  671. {
  672. GET_PROPERTY_BSTR((IADsComputer *)this, Department);
  673. }
  674. STDMETHODIMP CLDAPComputer::put_Department(THIS_ BSTR bstrDepartment)
  675. {
  676. PUT_PROPERTY_BSTR((IADsComputer *)this, Department);
  677. }
  678. STDMETHODIMP CLDAPComputer::get_Role(THIS_ BSTR FAR* retval)
  679. {
  680. GET_PROPERTY_BSTR((IADsComputer *)this, Role);
  681. }
  682. STDMETHODIMP CLDAPComputer::put_Role(THIS_ BSTR bstrRole)
  683. {
  684. PUT_PROPERTY_BSTR((IADsComputer *)this, Role);
  685. }
  686. STDMETHODIMP CLDAPComputer::get_OperatingSystem(THIS_ BSTR FAR* retval)
  687. {
  688. GET_PROPERTY_BSTR((IADsComputer *)this, OperatingSystem);
  689. }
  690. STDMETHODIMP CLDAPComputer::put_OperatingSystem(THIS_ BSTR bstrOperatingSystem)
  691. {
  692. PUT_PROPERTY_BSTR((IADsComputer *)this, OperatingSystem);
  693. }
  694. STDMETHODIMP CLDAPComputer::get_OperatingSystemVersion(THIS_ BSTR FAR* retval)
  695. {
  696. GET_PROPERTY_BSTR((IADsComputer *)this, OperatingSystemVersion);
  697. }
  698. STDMETHODIMP CLDAPComputer::put_OperatingSystemVersion(THIS_ BSTR bstrOperatingSystemVersion)
  699. {
  700. PUT_PROPERTY_BSTR((IADsComputer *)this, OperatingSystemVersion);
  701. }
  702. STDMETHODIMP CLDAPComputer::get_Model(THIS_ BSTR FAR* retval)
  703. {
  704. GET_PROPERTY_BSTR((IADsComputer *)this, Model);
  705. }
  706. STDMETHODIMP CLDAPComputer::put_Model(THIS_ BSTR bstrModel)
  707. {
  708. PUT_PROPERTY_BSTR((IADsComputer *)this, Model);
  709. }
  710. STDMETHODIMP CLDAPComputer::get_Processor(THIS_ BSTR FAR* retval)
  711. {
  712. GET_PROPERTY_BSTR((IADsComputer *)this, Processor);
  713. }
  714. STDMETHODIMP CLDAPComputer::put_Processor(THIS_ BSTR bstrProcessor)
  715. {
  716. PUT_PROPERTY_BSTR((IADsComputer *)this, Processor);
  717. }
  718. STDMETHODIMP CLDAPComputer::get_ProcessorCount(THIS_ BSTR FAR* retval)
  719. {
  720. GET_PROPERTY_BSTR((IADsComputer *)this, ProcessorCount);
  721. }
  722. STDMETHODIMP CLDAPComputer::put_ProcessorCount(THIS_ BSTR bstrProcessorCount)
  723. {
  724. PUT_PROPERTY_BSTR((IADsComputer *)this, ProcessorCount);
  725. }
  726. STDMETHODIMP CLDAPComputer::get_MemorySize(THIS_ BSTR FAR* retval)
  727. {
  728. GET_PROPERTY_BSTR((IADsComputer *)this, MemorySize);
  729. }
  730. STDMETHODIMP CLDAPComputer::put_MemorySize(THIS_ BSTR bstrMemorySize)
  731. {
  732. PUT_PROPERTY_BSTR((IADsComputer *)this, MemorySize);
  733. }
  734. STDMETHODIMP CLDAPComputer::get_StorageCapacity(THIS_ BSTR FAR* retval)
  735. {
  736. GET_PROPERTY_BSTR((IADsComputer *)this, StorageCapacity);
  737. }
  738. STDMETHODIMP CLDAPComputer::put_StorageCapacity(THIS_ BSTR bstrStorageCapacity)
  739. {
  740. PUT_PROPERTY_BSTR((IADsComputer *)this, StorageCapacity);
  741. }
  742. STDMETHODIMP CLDAPComputer::get_NetAddresses(THIS_ VARIANT FAR* retval)
  743. {
  744. GET_PROPERTY_VARIANT((IADsComputer *)this, NetAddresses);
  745. }
  746. STDMETHODIMP CLDAPComputer::put_NetAddresses(THIS_ VARIANT vNetAddresses)
  747. {
  748. PUT_PROPERTY_VARIANT((IADsComputer *)this, NetAddresses);
  749. }