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.

854 lines
20 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CSAccountPage.cpp
  7. //
  8. // Maintained By:
  9. // David Potter (DavidP) 22-MAR-2001
  10. // Geoffrey Pease (GPease) 12-MAY-2000
  11. //
  12. //////////////////////////////////////////////////////////////////////////////
  13. #include "Pch.h"
  14. #include "CSAccountPage.h"
  15. #include "WizardUtils.h"
  16. DEFINE_THISCLASS("CCSAccountPage");
  17. //////////////////////////////////////////////////////////////////////////////
  18. //++
  19. //
  20. // CCSAccountPage::CCSAccountPage(
  21. // CClusCfgWizard * pccwIn,
  22. // ECreateAddMode ecamCreateAddModeIn,
  23. // BSTR * pbstrUsernameIn,
  24. // BSTR * pbstrPasswordIn,
  25. // BSTR * pbstrDomainIn,
  26. // BSTR * pbstrClusterNameIn
  27. // )
  28. //
  29. //--
  30. //////////////////////////////////////////////////////////////////////////////
  31. CCSAccountPage::CCSAccountPage(
  32. CClusCfgWizard * pccwIn,
  33. ECreateAddMode ecamCreateAddModeIn,
  34. IClusCfgCredentials * pcccIn
  35. )
  36. : m_pccw( pccwIn )
  37. , m_pccc( pcccIn )
  38. {
  39. TraceFunc( "" );
  40. // m_hwnd
  41. Assert( pccwIn != NULL );
  42. m_pccw->AddRef();
  43. Assert( pcccIn != NULL );
  44. m_pccc->AddRef();
  45. m_ecamCreateAddMode = ecamCreateAddModeIn;
  46. m_cRef = 0;
  47. m_ptgd = NULL;
  48. TraceFuncExit();
  49. } //*** CCSAccountPage::CCSAccountPage
  50. //////////////////////////////////////////////////////////////////////////////
  51. //++
  52. //
  53. // CCSAccountPage::~CCSAccountPage( void )
  54. //
  55. //--
  56. //////////////////////////////////////////////////////////////////////////////
  57. CCSAccountPage::~CCSAccountPage( void )
  58. {
  59. TraceFunc( "" );
  60. if ( m_pccw != NULL )
  61. {
  62. m_pccw->Release();
  63. }
  64. if ( m_pccc != NULL )
  65. {
  66. m_pccc->Release();
  67. }
  68. if ( m_ptgd != NULL )
  69. {
  70. // Make sure we don't get called anymore.
  71. THR( m_ptgd->SetCallback( NULL ) );
  72. m_ptgd->Release();
  73. }
  74. Assert( m_cRef == 0 );
  75. TraceFuncExit();
  76. } //*** CCSAccountPage::~CCSAccountPage
  77. //////////////////////////////////////////////////////////////////////////////
  78. //++
  79. //
  80. // CCSAccountPage::OnInitDialog
  81. //
  82. // Description:
  83. // Handle the WM_INITDIALOG message.
  84. //
  85. // Arguments:
  86. // None.
  87. //
  88. // Return Values:
  89. // FALSE
  90. //
  91. //--
  92. //////////////////////////////////////////////////////////////////////////////
  93. LRESULT
  94. CCSAccountPage::OnInitDialog( void )
  95. {
  96. TraceFunc( "" );
  97. HRESULT hr;
  98. BSTR bstrUser = NULL;
  99. BSTR bstrDomain = NULL;
  100. BSTR bstrPassword = NULL;
  101. IUnknown * punkTask = NULL;
  102. LRESULT lr = FALSE;
  103. //
  104. // (jfranco, bug #477671) Limit user name length to ADJUSTED_DNS_MAX_NAME_LENGTH
  105. // according to msdn, EM_(SET)LIMITTEXT does not return a value, so ignore what SendDlgItemMessage returns
  106. //
  107. SendDlgItemMessage( m_hwnd, IDC_CSACCOUNT_E_USERNAME, EM_SETLIMITTEXT, ADJUSTED_DNS_MAX_NAME_LENGTH, 0 );
  108. //
  109. // (jfranco, bug #462673) Limit domain length to ADJUSTED_DNS_MAX_NAME_LENGTH.
  110. // According to MSDN, the return value of CB_LIMITTEXT is always true, so ignore what SendDlgItemMessage returns
  111. //
  112. SendDlgItemMessage( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN, CB_LIMITTEXT, ADJUSTED_DNS_MAX_NAME_LENGTH, 0 );
  113. //
  114. // Create the task to get the domains.
  115. //
  116. hr = THR( m_pccw->HrCreateTask( TASK_GetDomains, &punkTask ) );
  117. if ( FAILED( hr ) )
  118. {
  119. goto Cleanup;
  120. }
  121. hr = THR( punkTask->TypeSafeQI( ITaskGetDomains, &m_ptgd ) );
  122. if ( FAILED( hr ) )
  123. {
  124. goto Cleanup;
  125. }
  126. hr = THR( m_ptgd->SetCallback( static_cast< ITaskGetDomainsCallback * >( this ) ) );
  127. if ( FAILED( hr ) )
  128. {
  129. goto Cleanup;
  130. }
  131. hr = THR( m_pccw->HrSubmitTask( m_ptgd ) );
  132. if ( FAILED( hr ) )
  133. {
  134. goto Cleanup;
  135. }
  136. //
  137. // Default to the script supplied information.
  138. //
  139. hr = THR( m_pccc->GetCredentials( &bstrUser, &bstrDomain, &bstrPassword ) );
  140. if ( FAILED( hr ) )
  141. {
  142. goto Cleanup;
  143. }
  144. SetDlgItemText( m_hwnd, IDC_CSACCOUNT_E_USERNAME, bstrUser );
  145. SetDlgItemText( m_hwnd, IDC_CSACCOUNT_E_PASSWORD, bstrPassword );
  146. SecureZeroMemory( bstrPassword, SysStringLen( bstrPassword ) * sizeof( *bstrPassword ) );
  147. if ( SysStringLen( bstrDomain ) > 0 )
  148. {
  149. SetDlgItemText( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN, bstrDomain );
  150. TraceMemoryAddBSTR( bstrDomain );
  151. }
  152. else
  153. {
  154. //
  155. // Use the cluster's domain.
  156. //
  157. hr = THR( m_pccw->HrGetClusterDomain( &bstrDomain ) );
  158. if ( FAILED( hr ) )
  159. {
  160. goto Cleanup;
  161. }
  162. SetDlgItemText( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN, bstrDomain );
  163. }
  164. Cleanup:
  165. OnUpdateWizardButtons(); // Ignore return value because OnUpdateWizardButtons always returns true, but we want OnInitDialog to return false.
  166. if ( punkTask != NULL )
  167. {
  168. punkTask->Release();
  169. }
  170. SysFreeString( bstrUser );
  171. TraceSysFreeString( bstrDomain );
  172. SysFreeString( bstrPassword );
  173. RETURN( lr );
  174. } //*** CCSAccountPage::OnInitDialog
  175. //////////////////////////////////////////////////////////////////////////////
  176. //++
  177. //
  178. // LRESULT
  179. // CCSAccountPage::OnCommand(
  180. // UINT idNotificationIn,
  181. // UINT idControlIn,
  182. // HWND hwndSenderIn
  183. // )
  184. //
  185. //--
  186. //////////////////////////////////////////////////////////////////////////////
  187. LRESULT
  188. CCSAccountPage::OnCommand(
  189. UINT idNotificationIn,
  190. UINT idControlIn,
  191. HWND hwndSenderIn
  192. )
  193. {
  194. TraceFunc( "" );
  195. LRESULT lr = FALSE;
  196. switch ( idControlIn )
  197. {
  198. case IDC_CSACCOUNT_E_PASSWORD:
  199. case IDC_CSACCOUNT_E_USERNAME:
  200. if ( idNotificationIn == EN_CHANGE )
  201. {
  202. lr = OnUpdateWizardButtons();
  203. }
  204. break;
  205. case IDC_CSACCOUNT_CB_DOMAIN:
  206. if ( ( idNotificationIn == CBN_EDITCHANGE ) || ( idNotificationIn == CBN_SELENDOK ) )
  207. {
  208. if ( PostMessage( m_hwnd, WM_CCW_UPDATEBUTTONS, 0, 0 ) == 0 )
  209. {
  210. TW32( GetLastError() );
  211. }
  212. lr = TRUE;
  213. }
  214. break;
  215. }
  216. RETURN( lr );
  217. } //*** CCSAccountPage::OnCommand
  218. //////////////////////////////////////////////////////////////////////////////
  219. //++
  220. //
  221. // LRESULT
  222. // CCSAccountPage::OnUpdateWizardButtons( void )
  223. //
  224. //--
  225. //////////////////////////////////////////////////////////////////////////////
  226. LRESULT
  227. CCSAccountPage::OnUpdateWizardButtons( void )
  228. {
  229. TraceFunc( "" );
  230. LRESULT lr = TRUE;
  231. HRESULT hr = S_OK;
  232. BSTR bstrName = NULL;
  233. BSTR bstrDomain = NULL;
  234. DWORD mEnabledButtons = PSWIZB_BACK;
  235. HWND hwndUser = GetDlgItem( m_hwnd, IDC_CSACCOUNT_E_USERNAME );
  236. HWND hwndDomain = GetDlgItem( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN );
  237. BOOL fUserIsDNSName = FALSE;
  238. //
  239. // Password could be blank so don't count on it!
  240. //
  241. hr = STHR( HrGetPrincipalName( hwndUser, hwndDomain, &bstrName, &bstrDomain, &fUserIsDNSName ) );
  242. if ( hr == S_OK )
  243. {
  244. mEnabledButtons |= PSWIZB_NEXT;
  245. }
  246. PropSheet_SetWizButtons( GetParent( m_hwnd ), mEnabledButtons );
  247. EnableWindow( hwndDomain, !fUserIsDNSName );
  248. TraceSysFreeString( bstrName );
  249. TraceSysFreeString( bstrDomain );
  250. RETURN( lr );
  251. } //*** CCSAccountPage::OnUpdateWizardButtons
  252. //////////////////////////////////////////////////////////////////////////////
  253. //++
  254. //
  255. // LRESULT
  256. // CCSAccountPage::OnNotifyQueryCancel( void )
  257. //
  258. //--
  259. //////////////////////////////////////////////////////////////////////////////
  260. LRESULT
  261. CCSAccountPage::OnNotifyQueryCancel( void )
  262. {
  263. TraceFunc( "" );
  264. LRESULT lr = TRUE;
  265. int iRet;
  266. iRet = MessageBoxFromStrings( m_hwnd,
  267. IDS_QUERY_CANCEL_TITLE,
  268. IDS_QUERY_CANCEL_TEXT,
  269. MB_YESNO
  270. );
  271. if ( iRet == IDNO )
  272. {
  273. SetWindowLongPtr( m_hwnd, DWLP_MSGRESULT, -1 );
  274. } // if:
  275. else
  276. {
  277. THR( m_pccw->HrLaunchCleanupTask() );
  278. } // else:
  279. RETURN( lr );
  280. } //*** CCSAccountPage::OnNotifyQueryCancel
  281. //////////////////////////////////////////////////////////////////////////////
  282. //++
  283. //
  284. // LRESULT
  285. // CCSAccountPage::OnNotifySetActive( void )
  286. //
  287. //--
  288. //////////////////////////////////////////////////////////////////////////////
  289. LRESULT
  290. CCSAccountPage::OnNotifySetActive( void )
  291. {
  292. TraceFunc( "" );
  293. HRESULT hr;
  294. LRESULT lr = TRUE;
  295. IClusCfgClusterInfo * pccci = NULL;
  296. IClusCfgCredentials * piccc = NULL;
  297. BSTR bstrUsername = NULL;
  298. BSTR bstrDomain = NULL;
  299. if ( m_ecamCreateAddMode == camADDING )
  300. {
  301. //
  302. // See if the cluster configuration information has something
  303. // different.
  304. //
  305. hr = THR( m_pccw->HrGetClusterObject( &pccci ) );
  306. if ( FAILED( hr ) )
  307. {
  308. goto Cleanup;
  309. }
  310. hr = THR( pccci->GetClusterServiceAccountCredentials( &piccc ) );
  311. if ( FAILED( hr ) )
  312. {
  313. goto Cleanup;
  314. }
  315. hr = THR( piccc->GetIdentity( &bstrUsername, &bstrDomain ) );
  316. if ( FAILED( hr ) )
  317. {
  318. goto Cleanup;
  319. }
  320. TraceMemoryAddBSTR( bstrUsername );
  321. TraceMemoryAddBSTR( bstrDomain );
  322. SetDlgItemText( m_hwnd, IDC_CSACCOUNT_E_USERNAME, bstrUsername );
  323. SetDlgItemText( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN, bstrDomain );
  324. //
  325. // Disable the username and domain windows.
  326. //
  327. EnableWindow( GetDlgItem( m_hwnd, IDC_CSACCOUNT_E_USERNAME ), FALSE );
  328. EnableWindow( GetDlgItem( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN ), FALSE );
  329. }
  330. Cleanup:
  331. lr = OnUpdateWizardButtons();
  332. if ( piccc != NULL )
  333. {
  334. piccc->Release();
  335. }
  336. if ( pccci != NULL )
  337. {
  338. pccci->Release();
  339. }
  340. TraceSysFreeString( bstrUsername );
  341. TraceSysFreeString( bstrDomain );
  342. RETURN( lr );
  343. } //*** CCSAccountPage::OnNotifySetActive
  344. //////////////////////////////////////////////////////////////////////////////
  345. //++
  346. //
  347. // LRESULT
  348. // CCSAccountPage::OnNotifyWizNext( void )
  349. //
  350. //--
  351. //////////////////////////////////////////////////////////////////////////////
  352. LRESULT
  353. CCSAccountPage::OnNotifyWizNext( void )
  354. {
  355. TraceFunc( "" );
  356. HRESULT hr;
  357. HWND hwnd;
  358. DWORD dwLen;
  359. BSTR bstrUsername = NULL;
  360. BSTR bstrPassword = NULL;
  361. BSTR bstrDomain = NULL;
  362. LRESULT lr = TRUE;
  363. IClusCfgClusterInfo * pccci = NULL;
  364. IClusCfgCredentials * piccc = NULL;
  365. //
  366. // Get the user and domain names from the UI.
  367. //
  368. hr = THR( HrGetPrincipalName(
  369. GetDlgItem( m_hwnd, IDC_CSACCOUNT_E_USERNAME )
  370. , GetDlgItem( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN )
  371. , &bstrUsername
  372. , &bstrDomain
  373. ) );
  374. if ( hr != S_OK )
  375. {
  376. goto Error;
  377. }
  378. //
  379. // Get the password from the UI.
  380. //
  381. hwnd = GetDlgItem( m_hwnd, IDC_CSACCOUNT_E_PASSWORD );
  382. Assert( hwnd != NULL );
  383. dwLen = GetWindowTextLength( hwnd );
  384. bstrPassword = TraceSysAllocStringLen( NULL, dwLen );
  385. if ( bstrPassword == NULL )
  386. {
  387. goto OutOfMemory;
  388. }
  389. GetWindowText( hwnd, bstrPassword, dwLen + 1 );
  390. THR( m_pccc->SetCredentials( bstrUsername, bstrDomain, bstrPassword ) );
  391. SecureZeroMemory( bstrPassword, SysStringLen( bstrPassword ) * sizeof( *bstrPassword ) );
  392. if ( FAILED( hr ) )
  393. {
  394. goto Cleanup;
  395. }
  396. //
  397. // Get the cluster configuration info.
  398. //
  399. hr = THR( m_pccw->HrGetClusterObject( &pccci ) );
  400. if ( FAILED( hr ) )
  401. {
  402. goto Cleanup;
  403. }
  404. //
  405. // Set the cluster service account credentials...
  406. //
  407. hr = THR( pccci->GetClusterServiceAccountCredentials( &piccc ) );
  408. if ( FAILED( hr ) )
  409. {
  410. goto Error;
  411. }
  412. hr = THR( m_pccc->AssignTo( piccc ) );
  413. if ( FAILED( hr ) )
  414. {
  415. goto Error;
  416. }
  417. Cleanup:
  418. TraceSysFreeString( bstrUsername );
  419. TraceSysFreeString( bstrPassword );
  420. TraceSysFreeString( bstrDomain );
  421. if ( piccc != NULL )
  422. {
  423. piccc->Release();
  424. }
  425. if ( pccci != NULL )
  426. {
  427. pccci->Release();
  428. }
  429. RETURN( lr );
  430. Error:
  431. SetWindowLongPtr( m_hwnd, DWLP_MSGRESULT, -1 );
  432. goto Cleanup;
  433. OutOfMemory:
  434. goto Error;
  435. } //*** CCSAccountPage::OnNotifyWizNext
  436. //////////////////////////////////////////////////////////////////////////////
  437. //++
  438. //
  439. // LRESULT
  440. // CCSAccountPage::OnNotify(
  441. // WPARAM idCtrlIn,
  442. // LPNMHDR pnmhdrIn
  443. // )
  444. //
  445. //--
  446. //////////////////////////////////////////////////////////////////////////////
  447. LRESULT
  448. CCSAccountPage::OnNotify(
  449. WPARAM idCtrlIn,
  450. LPNMHDR pnmhdrIn
  451. )
  452. {
  453. TraceFunc( "" );
  454. LRESULT lr = TRUE;
  455. SetWindowLongPtr( m_hwnd, DWLP_MSGRESULT, 0 );
  456. switch( pnmhdrIn->code )
  457. {
  458. case PSN_SETACTIVE:
  459. lr = OnNotifySetActive();
  460. break;
  461. case PSN_WIZNEXT:
  462. lr = OnNotifyWizNext();
  463. break;
  464. case PSN_QUERYCANCEL:
  465. lr = OnNotifyQueryCancel();
  466. break;
  467. }
  468. RETURN( lr );
  469. } //*** CCSAccountPage::OnNotify
  470. //////////////////////////////////////////////////////////////////////////////
  471. //++
  472. //
  473. // INT_PTR
  474. // CALLBACK
  475. // CCSAccountPage::S_DlgProc(
  476. // HWND hDlgIn,
  477. // UINT MsgIn,
  478. // WPARAM wParam,
  479. // LPARAM lParam
  480. // )
  481. //
  482. //--
  483. //////////////////////////////////////////////////////////////////////////////
  484. INT_PTR
  485. CALLBACK
  486. CCSAccountPage::S_DlgProc(
  487. HWND hDlgIn,
  488. UINT MsgIn,
  489. WPARAM wParam,
  490. LPARAM lParam
  491. )
  492. {
  493. // Don't do TraceFunc because every mouse movement
  494. // will cause this function to be called.
  495. WndMsg( hDlgIn, MsgIn, wParam, lParam );
  496. LRESULT lr = FALSE;
  497. CCSAccountPage * pPage = reinterpret_cast< CCSAccountPage *> ( GetWindowLongPtr( hDlgIn, GWLP_USERDATA ) );
  498. if ( MsgIn == WM_INITDIALOG )
  499. {
  500. PROPSHEETPAGE * ppage = reinterpret_cast< PROPSHEETPAGE * >( lParam );
  501. SetWindowLongPtr( hDlgIn, GWLP_USERDATA, (LPARAM) ppage->lParam );
  502. pPage = reinterpret_cast< CCSAccountPage * >( ppage->lParam );
  503. pPage->m_hwnd = hDlgIn;
  504. }
  505. if ( pPage != NULL )
  506. {
  507. Assert( hDlgIn == pPage->m_hwnd );
  508. switch( MsgIn )
  509. {
  510. case WM_INITDIALOG:
  511. lr = pPage->OnInitDialog();
  512. break;
  513. case WM_NOTIFY:
  514. lr = pPage->OnNotify( wParam, reinterpret_cast< LPNMHDR >( lParam ) );
  515. break;
  516. case WM_COMMAND:
  517. lr= pPage->OnCommand( HIWORD( wParam ), LOWORD( wParam ), (HWND) lParam );
  518. break;
  519. case WM_CCW_UPDATEBUTTONS:
  520. lr = pPage->OnUpdateWizardButtons();
  521. break;
  522. // no default clause needed
  523. }
  524. }
  525. return lr;
  526. } //*** CCSAccountPage::S_DlgProc
  527. // ************************************************************************
  528. //
  529. // IUnknown
  530. //
  531. // ************************************************************************
  532. //////////////////////////////////////////////////////////////////////////////
  533. //++
  534. //
  535. // CCSAccountPage::QueryInterface
  536. //
  537. // Description:
  538. // Query this object for the passed in interface.
  539. //
  540. // Arguments:
  541. // riidIn
  542. // Id of interface requested.
  543. //
  544. // ppvOut
  545. // Pointer to the requested interface.
  546. //
  547. // Return Value:
  548. // S_OK
  549. // If the interface is available on this object.
  550. //
  551. // E_NOINTERFACE
  552. // If the interface is not available.
  553. //
  554. // E_POINTER
  555. // ppvOut was NULL.
  556. //
  557. // Remarks:
  558. // None.
  559. //
  560. //--
  561. //////////////////////////////////////////////////////////////////////////////
  562. STDMETHODIMP
  563. CCSAccountPage::QueryInterface(
  564. REFIID riidIn
  565. , void ** ppvOut
  566. )
  567. {
  568. TraceQIFunc( riidIn, ppvOut );
  569. HRESULT hr = S_OK;
  570. //
  571. // Validate arguments.
  572. //
  573. Assert( ppvOut != NULL );
  574. if ( ppvOut == NULL )
  575. {
  576. hr = THR( E_POINTER );
  577. goto Cleanup;
  578. }
  579. //
  580. // Handle known interfaces.
  581. //
  582. if ( IsEqualIID( riidIn, IID_IUnknown ) )
  583. {
  584. *ppvOut = static_cast< ITaskGetDomainsCallback * >( this );
  585. } // if: IUnknown
  586. else if ( IsEqualIID( riidIn, IID_ITaskGetDomainsCallback ) )
  587. {
  588. *ppvOut = TraceInterface( __THISCLASS__, ITaskGetDomainsCallback, this, 0 );
  589. } // else if: ITaskGetDomainsCallback
  590. else
  591. {
  592. *ppvOut = NULL;
  593. hr = E_NOINTERFACE;
  594. } // else
  595. //
  596. // Add a reference to the interface if successful.
  597. //
  598. if ( SUCCEEDED( hr ) )
  599. {
  600. ((IUnknown *) *ppvOut)->AddRef();
  601. } // if: success
  602. Cleanup:
  603. QIRETURN_IGNORESTDMARSHALLING( hr, riidIn );
  604. } //*** CCSAccountPage::QueryInterface
  605. //////////////////////////////////////////////////////////////////////////////
  606. //++
  607. //
  608. // STDMETHODIMP_( ULONG )
  609. // CCSAccountPage::AddRef
  610. //
  611. //--
  612. //////////////////////////////////////////////////////////////////////////////
  613. STDMETHODIMP_( ULONG )
  614. CCSAccountPage::AddRef( void )
  615. {
  616. TraceFunc( "[IUnknown]" );
  617. InterlockedIncrement( &m_cRef );
  618. CRETURN( m_cRef );
  619. } //*** CCSAccountPage::AddRef
  620. //////////////////////////////////////////////////////////////////////////////
  621. //++
  622. //
  623. // STDMETHODIMP_( ULONG )
  624. // CCSAccountPage::Release
  625. //
  626. //--
  627. //////////////////////////////////////////////////////////////////////////////
  628. STDMETHODIMP_( ULONG )
  629. CCSAccountPage::Release( void )
  630. {
  631. TraceFunc( "[IUnknown]" );
  632. LONG cRef;
  633. cRef = InterlockedDecrement( &m_cRef );
  634. if ( cRef == 0 )
  635. {
  636. // do nothing -- COM interface does not control object lifetime
  637. }
  638. CRETURN( cRef );
  639. } //*** CCSAccountPage::Release
  640. //****************************************************************************
  641. //
  642. // ITaskGetDomainsCallback
  643. //
  644. //****************************************************************************
  645. //////////////////////////////////////////////////////////////////////////////
  646. //++
  647. //
  648. // STDMETHODIMP
  649. // CCSAccountPage::ReceiveDomainResult(
  650. // HRESULT hrIn
  651. // )
  652. //
  653. //--
  654. //////////////////////////////////////////////////////////////////////////////
  655. STDMETHODIMP
  656. CCSAccountPage::ReceiveDomainResult(
  657. HRESULT hrIn
  658. )
  659. {
  660. TraceFunc( "[ITaskGetDomainsCallback]" );
  661. HRESULT hr;
  662. hr = THR( m_ptgd->SetCallback( NULL ) );
  663. HRETURN( hr );
  664. } //*** CCSAccountPage::ReceiveResult
  665. //////////////////////////////////////////////////////////////////////////////
  666. //++
  667. //
  668. // STDMETHODIMP
  669. // CCSAccountPage::ReceiveDomainName(
  670. // LPCWSTR pcszDomainIn
  671. // )
  672. //
  673. //--
  674. //////////////////////////////////////////////////////////////////////////////
  675. STDMETHODIMP
  676. CCSAccountPage::ReceiveDomainName(
  677. LPCWSTR pcszDomainIn
  678. )
  679. {
  680. TraceFunc( "[ITaskGetDomainsCallback]" );
  681. HRESULT hr = S_OK;
  682. ComboBox_AddString( GetDlgItem( m_hwnd, IDC_CSACCOUNT_CB_DOMAIN ), pcszDomainIn );
  683. HRETURN( hr );
  684. } //*** CCSAccountPage::ReceiveName