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.

1415 lines
36 KiB

  1. //
  2. // Driver Verifier UI
  3. // Copyright (c) Microsoft Corporation, 1999
  4. //
  5. //
  6. // module: ModSPage.cxx
  7. // author: DMihai
  8. // created: 01/04/98
  9. //
  10. // Description:
  11. //
  12. // Modify settings PropertyPage.
  13. #include "stdafx.h"
  14. #include "drvvctrl.hxx"
  15. #include "ModSPage.hxx"
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. //
  22. // if this is FALSE we will prompt the user when Exit is clicked
  23. //
  24. BOOL g_bSettingsSaved = FALSE;
  25. //
  26. // help IDs
  27. //
  28. static DWORD MyHelpIds[] =
  29. {
  30. IDC_DRIVERS_LIST, IDH_DV_SettingsTab_driver_details,
  31. IDC_VERIFALL_RADIO, IDH_DV_SettingsTab_verifyall,
  32. IDC_VERIFSEL_RADIO, IDH_DV_SettingsTab_verifyselec,
  33. IDC_NORMAL_VERIF_CHECK, IDH_DV_SettingsTab_verifytype_sppool,
  34. IDC_PAGEDC_VERIF_CHECK, IDH_DV_SettingsTab_verifytype_irql,
  35. IDC_ALLOCF_VERIF_CHECK, IDH_DV_SettingsTab_verifytype_resource,
  36. IDC_POOLT_VERIF_CHECK, IDH_DV_SettingsTab_verifytype_pooltrack,
  37. IDC_IO_VERIF_CHECK, IDH_DV_SettingsTab_verifytype_io,
  38. IDC_VERIFY_BUTTON, IDH_DV_SettingsTab_verifybut,
  39. IDC_DONTVERIFY_BUTTON, IDH_DV_SettingsTab_noverifybut,
  40. ID_APPLY_BUTTON, IDH_DV_SettingsTab_applybut,
  41. IDC_ADDIT_DRVNAMES_EDIT, IDH_DV_SettingsTab_verifyaddfield,
  42. ID_RESETALL_BUTTON, IDH_DV_SettingsTab_resetallbut,
  43. ID_PREF_BUTTON, IDH_DV_SettingsTab_prefsetbut,
  44. IDC_MODSETT_IO_SELDRIVERS_RADIO,IDH_DV_SettingsTab_verifytype_io_level1,
  45. IDC_MODSETT_IO_SYSWIDE_RADIO, IDH_DV_SettingsTab_verifytype_io_level2,
  46. 0, 0
  47. };
  48. /////////////////////////////////////////
  49. void __cdecl VrfError ( TCHAR *fmt, ...)
  50. {
  51. TCHAR strMessage[ 256 ];
  52. va_list prms;
  53. if( fmt == NULL )
  54. return;
  55. va_start (prms, fmt);
  56. _vsntprintf ( strMessage, ARRAY_LENGTH( strMessage ), fmt, prms);
  57. if( g_bCommandLineMode )
  58. {
  59. VrfPutTS( strMessage );
  60. }
  61. else
  62. {
  63. AfxMessageBox( strMessage, MB_OK | MB_ICONSTOP );
  64. }
  65. va_end (prms);
  66. }
  67. /////////////////////////////////////////
  68. void
  69. __cdecl
  70. VrfErrorResourceFormat(
  71. UINT uIdResourceFormat,
  72. ... )
  73. {
  74. TCHAR strMessage[ 256 ];
  75. TCHAR strFormat[ 256 ];
  76. va_list prms;
  77. if( GetStringFromResources(
  78. uIdResourceFormat,
  79. strFormat,
  80. ARRAY_LENGTH( strFormat ) ) )
  81. {
  82. va_start (prms, uIdResourceFormat);
  83. _vsntprintf ( strMessage, ARRAY_LENGTH( strMessage ), strFormat, prms);
  84. if( g_bCommandLineMode )
  85. {
  86. VrfPutTS( strMessage );
  87. }
  88. else
  89. {
  90. AfxMessageBox( strMessage, MB_OK | MB_ICONSTOP );
  91. }
  92. va_end (prms);
  93. }
  94. else
  95. {
  96. ASSERT( FALSE );
  97. }
  98. }
  99. /////////////////////////////////////////////////////////////////////////////
  100. // CModifSettPage property page
  101. IMPLEMENT_DYNCREATE(CModifSettPage, CPropertyPage)
  102. CModifSettPage::CModifSettPage() : CPropertyPage(CModifSettPage::IDD)
  103. {
  104. //{{AFX_DATA_INIT(CModifSettPage)
  105. m_bAllocFCheck = FALSE;
  106. m_bSpecialPoolCheck = FALSE;
  107. m_bPagedCCheck = FALSE;
  108. m_bPoolTCheck = FALSE;
  109. m_bIoVerifierCheck = FALSE;
  110. m_nVerifyAllRadio = -1;
  111. m_strAdditDrivers = _T("");
  112. //}}AFX_DATA_INIT
  113. m_nIoVerTypeRadio = 0;
  114. m_eListState = vrfControlEnabled;
  115. m_eApplyButtonState = vrfControlDisabled;
  116. m_bAscendDrvVerifSort = FALSE;
  117. m_bAscendDrvNameSort = FALSE;
  118. m_bAscendProviderSort = FALSE;
  119. m_bAscendVersionSort = FALSE;
  120. m_nLastColumnClicked = -1;
  121. }
  122. CModifSettPage::~CModifSettPage()
  123. {
  124. }
  125. void CModifSettPage::DoDataExchange(CDataExchange* pDX)
  126. {
  127. // CPropertyPage::DoDataExchange(pDX);
  128. //{{AFX_DATA_MAP(CModifSettPage)
  129. DDX_Control(pDX, IDC_PAGEDC_VERIF_CHECK, m_PagedCCheck);
  130. DDX_Control(pDX, IDC_NORMAL_VERIF_CHECK, m_SpecialPoolVerifCheck);
  131. DDX_Control(pDX, IDC_ALLOCF_VERIF_CHECK, m_AllocFCheck);
  132. DDX_Control(pDX, IDC_POOLT_VERIF_CHECK, m_PoolTCheck);
  133. DDX_Control(pDX, IDC_IO_VERIF_CHECK, m_IOVerifCheck);
  134. DDX_Control(pDX, IDC_ADDIT_DRVNAMES_EDIT, m_AdditDrvEdit);
  135. DDX_Control(pDX, ID_RESETALL_BUTTON, m_ResetAllButton);
  136. DDX_Control(pDX, IDC_VERIFY_BUTTON, m_VerifyButton);
  137. DDX_Control(pDX, IDC_DRIVERS_LIST, m_DriversList);
  138. DDX_Control(pDX, IDC_DONTVERIFY_BUTTON, m_DontVerifButton);
  139. DDX_Control(pDX, ID_APPLY_BUTTON, m_ApplyButton);
  140. DDX_Check(pDX, IDC_ALLOCF_VERIF_CHECK, m_bAllocFCheck);
  141. DDX_Check(pDX, IDC_NORMAL_VERIF_CHECK, m_bSpecialPoolCheck);
  142. DDX_Check(pDX, IDC_PAGEDC_VERIF_CHECK, m_bPagedCCheck);
  143. DDX_Check(pDX, IDC_POOLT_VERIF_CHECK, m_bPoolTCheck);
  144. DDX_Check(pDX, IDC_IO_VERIF_CHECK, m_bIoVerifierCheck);
  145. DDX_Radio(pDX, IDC_VERIFALL_RADIO, m_nVerifyAllRadio);
  146. DDX_Radio(pDX, IDC_MODSETT_IO_SELDRIVERS_RADIO, m_nIoVerTypeRadio);
  147. //}}AFX_DATA_MAP
  148. DDX_Text(pDX, IDC_ADDIT_DRVNAMES_EDIT, m_strAdditDrivers);
  149. DDV_MaxChars(pDX, m_strAdditDrivers, MI_SUSPECT_DRIVER_BUFFER_LENGTH - 1 );
  150. if( pDX->m_bSaveAndValidate )
  151. {
  152. m_VerifState.AllDriversVerified = ( m_nVerifyAllRadio == 0 );
  153. m_VerifState.SpecialPoolVerification = m_bSpecialPoolCheck;
  154. m_VerifState.PagedCodeVerification = m_bPagedCCheck;
  155. m_VerifState.AllocationFaultInjection = m_bAllocFCheck;
  156. m_VerifState.PoolTracking = m_bPoolTCheck;
  157. m_VerifState.IoVerifier = m_bIoVerifierCheck;
  158. m_VerifState.SysIoVerifierLevel = m_nIoVerTypeRadio + 1;
  159. _tcscpy( m_VerifState.AdditionalDriverNames,
  160. (LPCTSTR)m_strAdditDrivers );
  161. }
  162. }
  163. BEGIN_MESSAGE_MAP(CModifSettPage, CPropertyPage)
  164. //{{AFX_MSG_MAP(CModifSettPage)
  165. ON_BN_CLICKED(IDC_VERIFALL_RADIO, OnVerifallRadio)
  166. ON_BN_CLICKED(IDC_VERIFSEL_RADIO, OnVerifselRadio)
  167. ON_BN_CLICKED(IDC_ALLOCF_VERIF_CHECK, OnCheck )
  168. ON_BN_CLICKED(IDC_VERIFY_BUTTON, OnVerifyButton)
  169. ON_BN_CLICKED(IDC_DONTVERIFY_BUTTON, OnDontverifyButton)
  170. ON_BN_CLICKED(ID_APPLY_BUTTON, OnApplyButton)
  171. ON_NOTIFY(LVN_COLUMNCLICK, IDC_DRIVERS_LIST, OnColumnclickDriversList)
  172. ON_EN_CHANGE(IDC_ADDIT_DRVNAMES_EDIT, OnChangeAdditDrvnamesEdit)
  173. ON_BN_CLICKED(ID_RESETALL_BUTTON, OnResetallButton)
  174. ON_BN_CLICKED(ID_PREF_BUTTON, OnPrefButton)
  175. ON_BN_CLICKED(IDC_NORMAL_VERIF_CHECK, OnCheck )
  176. ON_BN_CLICKED(IDC_PAGEDC_VERIF_CHECK, OnCheck )
  177. ON_BN_CLICKED(IDC_POOLT_VERIF_CHECK, OnCheck )
  178. ON_BN_CLICKED(IDC_IO_VERIF_CHECK, OnIoCheck )
  179. ON_NOTIFY(NM_RCLICK, IDC_DRIVERS_LIST, OnRclickDriversList)
  180. ON_COMMAND(ID_MODIF_DO_VERIFY, OnDoVerify)
  181. ON_COMMAND(ID_MODIF_DONT_VERIFY, OnDontVerify)
  182. ON_BN_CLICKED(IDC_MODSETT_IO_SELDRIVERS_RADIO, OnCheck)
  183. ON_BN_CLICKED(IDC_MODSETT_IO_SYSWIDE_RADIO, OnCheck)
  184. ON_MESSAGE( WM_HELP, OnHelp )
  185. ON_MESSAGE( WM_CONTEXTMENU, OnContextMenu )
  186. //}}AFX_MSG_MAP
  187. END_MESSAGE_MAP()
  188. /////////////////////////////////////////////////////////////////////////////
  189. // CModifSettPage implementation
  190. void CModifSettPage::GetDlgDataFromSett()
  191. {
  192. m_strAdditDrivers = m_VerifState.AdditionalDriverNames;
  193. // all drivers verified ?
  194. if( m_VerifState.AllDriversVerified )
  195. {
  196. m_nVerifyAllRadio = 0;
  197. // list state
  198. m_eListState = vrfControlDisabled;
  199. }
  200. else
  201. {
  202. m_nVerifyAllRadio = 1;
  203. // list state
  204. m_eListState = vrfControlEnabled;
  205. }
  206. // SpecialPoolVerification
  207. m_bSpecialPoolCheck = m_VerifState.SpecialPoolVerification;
  208. // PagedCodeVerification
  209. m_bPagedCCheck = m_VerifState.PagedCodeVerification;
  210. // AllocationFaultInjection
  211. m_bAllocFCheck = m_VerifState.AllocationFaultInjection;
  212. // PoolTracking
  213. m_bPoolTCheck = m_VerifState.PoolTracking;
  214. // IoVerifier
  215. m_bIoVerifierCheck = m_VerifState.IoVerifier;
  216. if( m_bIoVerifierCheck )
  217. {
  218. m_eIoRadioState = vrfControlEnabled;
  219. }
  220. else
  221. {
  222. m_eIoRadioState = vrfControlDisabled;
  223. }
  224. // SysIoVerifierLevel
  225. if( m_VerifState.SysIoVerifierLevel )
  226. {
  227. ASSERT( m_bIoVerifierCheck );
  228. m_nIoVerTypeRadio = m_VerifState.SysIoVerifierLevel - 1;
  229. }
  230. else
  231. {
  232. m_nIoVerTypeRadio = 0;
  233. }
  234. // Apply button state
  235. m_eApplyButtonState = vrfControlDisabled;
  236. }
  237. /////////////////////////////////////////////////////////////////////////////
  238. void CModifSettPage::UpdateControlsState()
  239. {
  240. CWnd *pRadioButton;
  241. EnableControl( m_DriversList, m_eListState );
  242. EnableControl( m_VerifyButton, m_eListState );
  243. EnableControl( m_DontVerifButton, m_eListState );
  244. EnableControl( m_AdditDrvEdit, m_eListState );
  245. EnableControl( m_ApplyButton, m_eApplyButtonState );
  246. pRadioButton = GetDlgItem( IDC_MODSETT_IO_SELDRIVERS_RADIO );
  247. if( pRadioButton != NULL )
  248. {
  249. EnableControl( *pRadioButton, m_eIoRadioState );
  250. }
  251. else
  252. {
  253. ASSERT( FALSE );
  254. }
  255. pRadioButton = GetDlgItem( IDC_MODSETT_IO_SYSWIDE_RADIO );
  256. if( pRadioButton != NULL )
  257. {
  258. EnableControl( *pRadioButton, m_eIoRadioState );
  259. }
  260. else
  261. {
  262. ASSERT( FALSE );
  263. }
  264. }
  265. /////////////////////////////////////////////////////////////////////////////
  266. void CModifSettPage::EnableControl( CWnd &wndCtrl,
  267. VRF_CONTROL_STATE eNewState )
  268. {
  269. BOOL bEnabled = wndCtrl.IsWindowEnabled();
  270. if( bEnabled )
  271. {
  272. if( eNewState == vrfControlDisabled )
  273. wndCtrl.EnableWindow( FALSE );
  274. }
  275. else
  276. {
  277. if( eNewState == vrfControlEnabled )
  278. wndCtrl.EnableWindow( TRUE );
  279. }
  280. }
  281. /////////////////////////////////////////////////////////////////////////////
  282. void CModifSettPage::SetupTheList()
  283. {
  284. SetupListHeader();
  285. AddTheListItems();
  286. }
  287. /////////////////////////////////////////////////////////////////////////////
  288. void CModifSettPage::SetupListHeader()
  289. {
  290. CString strDrivers, strStatus, strProvider, strVersion;
  291. VERIFY( strDrivers.LoadString( IDS_DRIVERS ) );
  292. VERIFY( strStatus.LoadString( IDS_VERIFICATION_STATUS ) );
  293. VERIFY( strProvider.LoadString( IDS_PROVIDER ) );
  294. VERIFY( strVersion.LoadString( IDS_VERSION ) );
  295. CRect rectWnd;
  296. m_DriversList.GetClientRect( &rectWnd );
  297. LVCOLUMN lvColumn;
  298. // column 0
  299. memset( &lvColumn, 0, sizeof( lvColumn ) );
  300. lvColumn.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
  301. lvColumn.fmt = LVCFMT_LEFT;
  302. lvColumn.iSubItem = 0;
  303. lvColumn.pszText = strDrivers.GetBuffer( strDrivers.GetLength() + 1 );
  304. lvColumn.cx = (int)( rectWnd.Width() * 0.17 );
  305. VERIFY( m_DriversList.InsertColumn( 0, &lvColumn ) != -1 );
  306. strDrivers.ReleaseBuffer();
  307. // column 1
  308. lvColumn.iSubItem = 1;
  309. lvColumn.pszText = strStatus.GetBuffer( strStatus.GetLength() + 1 );
  310. lvColumn.cx = (int)( rectWnd.Width() * 0.34 );
  311. VERIFY( m_DriversList.InsertColumn( 1, &lvColumn ) != -1 );
  312. strStatus.ReleaseBuffer();
  313. // column 2
  314. lvColumn.iSubItem = 2;
  315. lvColumn.pszText = strProvider.GetBuffer( strProvider.GetLength() + 1 );
  316. lvColumn.cx = (int)( rectWnd.Width() * 0.27 );
  317. VERIFY( m_DriversList.InsertColumn( 2, &lvColumn ) != -1 );
  318. strProvider.ReleaseBuffer();
  319. // column 3
  320. lvColumn.iSubItem = 3;
  321. lvColumn.pszText = strVersion.GetBuffer( strVersion.GetLength() + 1 );
  322. lvColumn.cx = (int)( rectWnd.Width() * 0.19 );
  323. VERIFY( m_DriversList.InsertColumn( 3, &lvColumn ) != -1 );
  324. strVersion.ReleaseBuffer();
  325. }
  326. /////////////////////////////////////////////////////////////////////////////
  327. void CModifSettPage::AddTheListItems()
  328. {
  329. LVITEM lvItem;
  330. int nActualIndex;
  331. VERIFY( m_DriversList.DeleteAllItems() );
  332. ASSERT( m_VerifState.DriverCount == 0 ||
  333. ::AfxIsValidAddress(
  334. m_VerifState.DriverInfo,
  335. m_VerifState.DriverCount * sizeof( PVRF_DRIVER_STATE ),
  336. TRUE)
  337. );
  338. memset( &lvItem, 0, sizeof( lvItem ) );
  339. for(UINT uCrtItem = 0; uCrtItem < m_VerifState.DriverCount; uCrtItem++ )
  340. {
  341. //
  342. // sub-item 0
  343. //
  344. lvItem.mask = LVIF_TEXT | LVIF_PARAM;
  345. lvItem.lParam = uCrtItem;
  346. lvItem.iItem = m_DriversList.GetItemCount();
  347. lvItem.iSubItem = 0;
  348. lvItem.pszText = m_VerifState.DriverInfo[ uCrtItem ].Name;
  349. nActualIndex = m_DriversList.InsertItem( &lvItem );
  350. if( nActualIndex != -1 )
  351. {
  352. //
  353. // sub-item 1
  354. //
  355. UpdateSecondColumn( nActualIndex,
  356. m_VerifState.DriverInfo[ uCrtItem ].Verified,
  357. m_VerifState.DriverInfo[ uCrtItem ].CurrentlyVerified );
  358. //
  359. // sub-item 2
  360. //
  361. lvItem.mask = LVIF_TEXT;
  362. lvItem.iItem = nActualIndex;
  363. lvItem.iSubItem = 2;
  364. lvItem.pszText = m_VerifState.DriverInfo[ uCrtItem ].Provider;
  365. VERIFY( m_DriversList.SetItem( &lvItem ) != -1 );
  366. //
  367. // sub-item 3
  368. //
  369. lvItem.mask = LVIF_TEXT;
  370. lvItem.iItem = nActualIndex;
  371. lvItem.iSubItem = 3;
  372. lvItem.pszText = m_VerifState.DriverInfo[ uCrtItem ].Version;
  373. VERIFY( m_DriversList.SetItem( &lvItem ) != -1 );
  374. }
  375. else
  376. {
  377. //
  378. // cannot add a list item?!?
  379. //
  380. ASSERT( FALSE );
  381. }
  382. }
  383. }
  384. /////////////////////////////////////////////////////////////////////////////
  385. void CModifSettPage::UpdateSecondColumn( int nItemIndex,
  386. BOOL bVerifiedAfterBoot, BOOL bVerifiedNow )
  387. {
  388. LVITEM lvItem;
  389. CString strValue;
  390. ASSERT( nItemIndex >= 0 &&
  391. (UINT)nItemIndex < m_VerifState.DriverCount &&
  392. nItemIndex < m_DriversList.GetItemCount() );
  393. // determine what's the status
  394. if( bVerifiedAfterBoot )
  395. {
  396. if( bVerifiedNow )
  397. {
  398. VERIFY( strValue.LoadString( IDS_VERIFIED ) );
  399. }
  400. else
  401. {
  402. VERIFY( strValue.LoadString( IDS_VERIFIED_AFTER_BOOT ) );
  403. }
  404. }
  405. else
  406. {
  407. if( bVerifiedNow )
  408. {
  409. VERIFY( strValue.LoadString( IDS_NOT_VERIFIED_AFTER_BOOT ) );
  410. }
  411. else
  412. {
  413. VERIFY( strValue.LoadString( IDS_NOT_VERIFIED ) );
  414. }
  415. }
  416. // update the list item
  417. memset( &lvItem, 0, sizeof( lvItem ) );
  418. lvItem.mask = LVIF_TEXT;
  419. lvItem.iItem = nItemIndex;
  420. lvItem.iSubItem = 1;
  421. lvItem.pszText = strValue.GetBuffer( strValue.GetLength() + 1 );
  422. VERIFY( m_DriversList.SetItem( &lvItem ) != -1 );
  423. strValue.ReleaseBuffer();
  424. }
  425. /////////////////////////////////////////////////////////////////////////////
  426. int CALLBACK CModifSettPage::DrvVerifCmpFunc(
  427. LPARAM lParam1,
  428. LPARAM lParam2,
  429. LPARAM lParamSort)
  430. {
  431. UINT uIndex1 = (UINT)lParam1;
  432. UINT uIndex2 = (UINT)lParam2;
  433. CModifSettPage *pThis = (CModifSettPage *)lParamSort;
  434. ASSERT_VALID( pThis );
  435. int nCmpRez = 0;
  436. // sanity check
  437. if( uIndex1 > pThis->m_VerifState.DriverCount ||
  438. uIndex2 > pThis->m_VerifState.DriverCount )
  439. {
  440. ASSERT( FALSE );
  441. return 0;
  442. }
  443. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified ==
  444. pThis->m_VerifState.DriverInfo[ uIndex2 ].Verified )
  445. {
  446. // same flag for after boot verified
  447. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].CurrentlyVerified ==
  448. pThis->m_VerifState.DriverInfo[ uIndex2 ].CurrentlyVerified )
  449. {
  450. // same flag for currently verified
  451. nCmpRez = _tcsicmp( pThis->m_VerifState.DriverInfo[ uIndex1 ].Name,
  452. pThis->m_VerifState.DriverInfo[ uIndex2 ].Name );
  453. }
  454. else
  455. {
  456. // different flags for currently verified
  457. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].CurrentlyVerified )
  458. {
  459. nCmpRez = 1;
  460. }
  461. else
  462. {
  463. nCmpRez = -1;
  464. }
  465. }
  466. }
  467. else
  468. {
  469. // different flags for after boot verified
  470. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified )
  471. {
  472. nCmpRez = 1;
  473. }
  474. else
  475. {
  476. nCmpRez = -1;
  477. }
  478. }
  479. if( pThis->m_bAscendDrvVerifSort )
  480. nCmpRez *= -1;
  481. return nCmpRez;
  482. }
  483. /////////////////////////////////////////////////////////////////////////////
  484. int CALLBACK CModifSettPage::DrvNameCmpFunc(
  485. LPARAM lParam1,
  486. LPARAM lParam2,
  487. LPARAM lParamSort)
  488. {
  489. UINT uIndex1 = (UINT)lParam1;
  490. UINT uIndex2 = (UINT)lParam2;
  491. CModifSettPage *pThis = (CModifSettPage *)lParamSort;
  492. ASSERT_VALID( pThis );
  493. int nCmpRez = 0;
  494. // sanity check
  495. if( uIndex1 > pThis->m_VerifState.DriverCount ||
  496. uIndex2 > pThis->m_VerifState.DriverCount )
  497. {
  498. ASSERT( FALSE );
  499. return 0;
  500. }
  501. // compare the names
  502. nCmpRez = _tcsicmp( pThis->m_VerifState.DriverInfo[ uIndex1 ].Name,
  503. pThis->m_VerifState.DriverInfo[ uIndex2 ].Name );
  504. if( ! nCmpRez )
  505. {
  506. // same name ???
  507. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified ==
  508. pThis->m_VerifState.DriverInfo[ uIndex2 ].Verified )
  509. {
  510. // same flag
  511. return 0;
  512. }
  513. else
  514. {
  515. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified )
  516. {
  517. if( pThis->m_bAscendDrvVerifSort )
  518. return 1;
  519. else
  520. return -1;
  521. }
  522. else
  523. {
  524. if( pThis->m_bAscendDrvVerifSort )
  525. return -1;
  526. else
  527. return 1;
  528. }
  529. }
  530. }
  531. else
  532. {
  533. if( pThis->m_bAscendDrvNameSort )
  534. nCmpRez *= -1;
  535. }
  536. return nCmpRez;
  537. }
  538. /////////////////////////////////////////////////////////////////////////////
  539. int CALLBACK CModifSettPage::ProviderCmpFunc(
  540. LPARAM lParam1,
  541. LPARAM lParam2,
  542. LPARAM lParamSort)
  543. {
  544. BOOL bNotAvailable1;
  545. BOOL bNotAvailable2;
  546. CString strNotAvailable;
  547. UINT uIndex1 = (UINT)lParam1;
  548. UINT uIndex2 = (UINT)lParam2;
  549. CModifSettPage *pThis = (CModifSettPage *)lParamSort;
  550. ASSERT_VALID( pThis );
  551. int nCmpRez = 0;
  552. //
  553. // sanity checks
  554. //
  555. if( uIndex1 > pThis->m_VerifState.DriverCount ||
  556. uIndex2 > pThis->m_VerifState.DriverCount )
  557. {
  558. ASSERT( FALSE );
  559. return 0;
  560. }
  561. //
  562. // are the strings valid or (Not Available)?
  563. //
  564. VERIFY( strNotAvailable.LoadString( IDS_NOT_AVAILABLE ) );
  565. bNotAvailable1 = ( strNotAvailable.CompareNoCase(
  566. pThis->m_VerifState.DriverInfo[ uIndex1 ].Provider ) == 0 );
  567. bNotAvailable2 = ( strNotAvailable.CompareNoCase(
  568. pThis->m_VerifState.DriverInfo[ uIndex2 ].Provider ) == 0 );
  569. if( bNotAvailable1 )
  570. {
  571. if( bNotAvailable2 )
  572. {
  573. return 0;
  574. }
  575. else
  576. {
  577. if( pThis->m_bAscendProviderSort )
  578. {
  579. return -1;
  580. }
  581. else
  582. {
  583. return 1;
  584. }
  585. }
  586. }
  587. else
  588. {
  589. if( bNotAvailable2 )
  590. {
  591. if( pThis->m_bAscendProviderSort )
  592. {
  593. return 1;
  594. }
  595. else
  596. {
  597. return -1;
  598. }
  599. }
  600. }
  601. //
  602. // compare the names of the providers
  603. //
  604. nCmpRez = _tcsicmp( pThis->m_VerifState.DriverInfo[ uIndex1 ].Provider,
  605. pThis->m_VerifState.DriverInfo[ uIndex2 ].Provider );
  606. if( ! nCmpRez )
  607. {
  608. //
  609. // same name for the provider
  610. //
  611. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified ==
  612. pThis->m_VerifState.DriverInfo[ uIndex2 ].Verified )
  613. {
  614. //
  615. // same verified flag
  616. //
  617. return 0;
  618. }
  619. else
  620. {
  621. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified )
  622. {
  623. return 1;
  624. }
  625. else
  626. {
  627. return -1;
  628. }
  629. }
  630. }
  631. else
  632. {
  633. if( pThis->m_bAscendProviderSort )
  634. nCmpRez *= -1;
  635. }
  636. return nCmpRez;
  637. }
  638. /////////////////////////////////////////////////////////////////////////////
  639. int CALLBACK CModifSettPage::VersionCmpFunc(
  640. LPARAM lParam1,
  641. LPARAM lParam2,
  642. LPARAM lParamSort)
  643. {
  644. BOOL bNotAvailable1;
  645. BOOL bNotAvailable2;
  646. CString strNotAvailable;
  647. UINT uIndex1 = (UINT)lParam1;
  648. UINT uIndex2 = (UINT)lParam2;
  649. CModifSettPage *pThis = (CModifSettPage *)lParamSort;
  650. ASSERT_VALID( pThis );
  651. int nCmpRez = 0;
  652. //
  653. // sanity checks
  654. //
  655. if( uIndex1 > pThis->m_VerifState.DriverCount ||
  656. uIndex2 > pThis->m_VerifState.DriverCount )
  657. {
  658. ASSERT( FALSE );
  659. return 0;
  660. }
  661. //
  662. // are the strings valid or (Not Available)?
  663. //
  664. VERIFY( strNotAvailable.LoadString( IDS_NOT_AVAILABLE ) );
  665. bNotAvailable1 = ( strNotAvailable.CompareNoCase(
  666. pThis->m_VerifState.DriverInfo[ uIndex1 ].Version ) == 0 );
  667. bNotAvailable2 = ( strNotAvailable.CompareNoCase(
  668. pThis->m_VerifState.DriverInfo[ uIndex2 ].Version ) == 0 );
  669. if( bNotAvailable1 )
  670. {
  671. if( bNotAvailable2 )
  672. {
  673. return 0;
  674. }
  675. else
  676. {
  677. if( pThis->m_bAscendVersionSort )
  678. {
  679. return -1;
  680. }
  681. else
  682. {
  683. return 1;
  684. }
  685. }
  686. }
  687. else
  688. {
  689. if( bNotAvailable2 )
  690. {
  691. if( pThis->m_bAscendVersionSort )
  692. {
  693. return 1;
  694. }
  695. else
  696. {
  697. return -1;
  698. }
  699. }
  700. }
  701. //
  702. // compare the names of the providers
  703. //
  704. nCmpRez = _tcsicmp( pThis->m_VerifState.DriverInfo[ uIndex1 ].Version,
  705. pThis->m_VerifState.DriverInfo[ uIndex2 ].Version );
  706. if( ! nCmpRez )
  707. {
  708. //
  709. // same name for the provider
  710. //
  711. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified ==
  712. pThis->m_VerifState.DriverInfo[ uIndex2 ].Verified )
  713. {
  714. //
  715. // same verified flag
  716. //
  717. return 0;
  718. }
  719. else
  720. {
  721. if( pThis->m_VerifState.DriverInfo[ uIndex1 ].Verified )
  722. {
  723. return 1;
  724. }
  725. else
  726. {
  727. return -1;
  728. }
  729. }
  730. }
  731. else
  732. {
  733. if( pThis->m_bAscendVersionSort )
  734. nCmpRez *= -1;
  735. }
  736. return nCmpRez;
  737. }
  738. /////////////////////////////////////////////////////////////////////////////
  739. // CModifSettPage message handlers
  740. /////////////////////////////////////////////////////////////////////////////
  741. void CModifSettPage::OnVerifallRadio()
  742. {
  743. m_eListState = vrfControlDisabled;
  744. m_eApplyButtonState = vrfControlEnabled;
  745. UpdateControlsState();
  746. }
  747. /////////////////////////////////////////////////////////////////////////////
  748. void CModifSettPage::OnVerifselRadio()
  749. {
  750. m_eListState = vrfControlEnabled;
  751. m_eApplyButtonState = vrfControlEnabled;
  752. UpdateControlsState();
  753. }
  754. /////////////////////////////////////////////////////////////////////////////
  755. void CModifSettPage::OnIoCheck()
  756. {
  757. if( m_IOVerifCheck.GetCheck() == 1 )
  758. {
  759. m_eIoRadioState = vrfControlEnabled;
  760. }
  761. else
  762. {
  763. m_eIoRadioState = vrfControlDisabled;
  764. }
  765. OnCheck();
  766. }
  767. /////////////////////////////////////////////////////////////////////////////
  768. void CModifSettPage::OnCheck()
  769. {
  770. m_eApplyButtonState = vrfControlEnabled;
  771. UpdateControlsState();
  772. }
  773. /////////////////////////////////////////////////////////////////////////////
  774. void CModifSettPage::ToggleItemsState( BOOL bVerified )
  775. {
  776. BOOL bChanged = FALSE;
  777. if( m_eListState != vrfControlEnabled )
  778. return;
  779. int nItems = m_DriversList.GetItemCount();
  780. for(int nCrtItem = 0; nCrtItem < nItems; nCrtItem++ )
  781. {
  782. if( m_DriversList.GetItemState( nCrtItem, LVIS_SELECTED ) &
  783. LVIS_SELECTED )
  784. {
  785. UINT uIndexInArray = (UINT)m_DriversList.GetItemData( nCrtItem );
  786. if( m_VerifState.DriverInfo[ uIndexInArray ].Verified !=
  787. bVerified )
  788. {
  789. //
  790. // Toggle its state
  791. //
  792. m_VerifState.DriverInfo[ uIndexInArray ].Verified = bVerified;
  793. if( bVerified )
  794. {
  795. //
  796. // Will be verified from now on.
  797. // Send a notification about this, in order to detect any miniports.
  798. //
  799. VrfNotifyDriverSelection( &m_VerifState, uIndexInArray );
  800. }
  801. bChanged = TRUE;
  802. }
  803. }
  804. }
  805. // refill the second column of the list
  806. for(nCrtItem = 0; nCrtItem < nItems; nCrtItem++ )
  807. {
  808. UINT uIndexInArray = (UINT)m_DriversList.GetItemData( nCrtItem );
  809. UpdateSecondColumn( nCrtItem,
  810. m_VerifState.DriverInfo[ uIndexInArray ].Verified,
  811. m_VerifState.DriverInfo[ uIndexInArray ].CurrentlyVerified );
  812. }
  813. // some status changed, enable the Apply button
  814. if( bChanged )
  815. {
  816. m_eApplyButtonState = vrfControlEnabled;
  817. UpdateControlsState();
  818. }
  819. }
  820. /////////////////////////////////////////////////////////////////////////////
  821. void CModifSettPage::OnVerifyButton()
  822. {
  823. ToggleItemsState( TRUE );
  824. }
  825. /////////////////////////////////////////////////////////////////////////////
  826. void CModifSettPage::OnDontverifyButton()
  827. {
  828. ToggleItemsState( FALSE );
  829. }
  830. /////////////////////////////////////////////////////////////////////////////
  831. void CModifSettPage::OnApplyButton()
  832. {
  833. if( ApplyTheChanges() )
  834. {
  835. CWaitCursor WaitCursor;
  836. g_bSettingsSaved = TRUE;
  837. VrfGetVerifierState( &m_VerifState );
  838. GetDlgDataFromSett();
  839. UpdateData( FALSE );
  840. AddTheListItems();
  841. // all updated
  842. m_eApplyButtonState = vrfControlDisabled;
  843. UpdateControlsState();
  844. WaitCursor.Restore();
  845. }
  846. }
  847. /////////////////////////////////////////////////////////////////////////////
  848. BOOL CModifSettPage::ApplyTheChanges()
  849. {
  850. if( UpdateData( TRUE ) )
  851. {
  852. // check if we have to clean-up all the registry values
  853. BOOL bAnythingEnabled = FALSE;
  854. if( m_VerifState.AllDriversVerified ||
  855. m_VerifState.SpecialPoolVerification ||
  856. m_VerifState.PagedCodeVerification ||
  857. m_VerifState.AllocationFaultInjection ||
  858. m_VerifState.PoolTracking ||
  859. m_VerifState.IoVerifier )
  860. {
  861. bAnythingEnabled = TRUE;
  862. }
  863. else
  864. {
  865. for( ULONG uCrtDriver = 0; uCrtDriver < m_VerifState.DriverCount; uCrtDriver++ )
  866. {
  867. if( m_VerifState.DriverInfo[ uCrtDriver ].Verified )
  868. {
  869. bAnythingEnabled = TRUE;
  870. break;
  871. }
  872. }
  873. if( ! bAnythingEnabled )
  874. {
  875. // check if we have some significative characters in Additional... edit
  876. int nBufferSize = sizeof( m_VerifState.AdditionalDriverNames ) / sizeof( TCHAR );
  877. for(int nCrtChar = 0; nCrtChar < nBufferSize; nCrtChar++ )
  878. {
  879. if( m_VerifState.AdditionalDriverNames[nCrtChar] == (TCHAR)0 )
  880. {
  881. // end of string
  882. break;
  883. }
  884. if( m_VerifState.AdditionalDriverNames[nCrtChar] != _T(' ') )
  885. {
  886. // significant char
  887. bAnythingEnabled = TRUE;
  888. break;
  889. }
  890. }
  891. }
  892. }
  893. if( bAnythingEnabled )
  894. return VrfSetVerifierState( &m_VerifState );
  895. else
  896. return VrfClearAllVerifierSettings();
  897. }
  898. return FALSE;
  899. }
  900. /////////////////////////////////////////////////////////////////////////////
  901. void CModifSettPage::OnColumnclickDriversList(NMHDR* pNMHDR, LRESULT* pResult)
  902. {
  903. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  904. switch( pNMListView->iSubItem )
  905. {
  906. case 0:
  907. if( m_nLastColumnClicked == pNMListView->iSubItem )
  908. {
  909. //
  910. // change the sort order for this sub-item
  911. //
  912. m_bAscendDrvNameSort = !m_bAscendDrvNameSort;
  913. }
  914. m_DriversList.SortItems( DrvNameCmpFunc, (LPARAM)this );
  915. break;
  916. case 1:
  917. if( m_nLastColumnClicked == pNMListView->iSubItem )
  918. {
  919. //
  920. // change the sort order for this sub-item
  921. //
  922. m_bAscendDrvVerifSort = !m_bAscendDrvVerifSort;
  923. }
  924. m_DriversList.SortItems( DrvVerifCmpFunc, (LPARAM)this );
  925. break;
  926. case 2:
  927. if( m_nLastColumnClicked == pNMListView->iSubItem )
  928. {
  929. //
  930. // change the sort order for this sub-item
  931. //
  932. m_bAscendProviderSort = !m_bAscendProviderSort;
  933. }
  934. m_DriversList.SortItems( ProviderCmpFunc, (LPARAM)this );
  935. break;
  936. case 3:
  937. if( m_nLastColumnClicked == pNMListView->iSubItem )
  938. {
  939. //
  940. // change the sort order for this sub-item
  941. //
  942. m_bAscendVersionSort = !m_bAscendVersionSort;
  943. }
  944. m_DriversList.SortItems( VersionCmpFunc, (LPARAM)this );
  945. break;
  946. default:
  947. ASSERT( FALSE );
  948. }
  949. //
  950. // keep the index of the last clicked column
  951. //
  952. m_nLastColumnClicked = pNMListView->iSubItem;
  953. *pResult = 0;
  954. }
  955. /////////////////////////////////////////////////////////////////////////////
  956. void CModifSettPage::OnChangeAdditDrvnamesEdit()
  957. {
  958. // send this notification unless you override the CDialog::OnInitDialog()
  959. // function and call CRichEditCtrl().SetEventMask()
  960. // with the ENM_CHANGE flag ORed into the mask.
  961. // TODO: Add your control notification handler code here
  962. m_eApplyButtonState = vrfControlEnabled;
  963. UpdateControlsState();
  964. }
  965. /////////////////////////////////////////////////////////////////////////////
  966. void CModifSettPage::OnResetallButton()
  967. {
  968. m_VerifState.AllDriversVerified = FALSE;
  969. m_VerifState.SpecialPoolVerification = FALSE;
  970. m_VerifState.PagedCodeVerification = FALSE;
  971. m_VerifState.AllocationFaultInjection = FALSE;
  972. m_VerifState.PoolTracking = FALSE;
  973. m_VerifState.IoVerifier = FALSE;
  974. for(ULONG uCrtDriver = 0; uCrtDriver < m_VerifState.DriverCount;
  975. uCrtDriver++ )
  976. {
  977. m_VerifState.DriverInfo[ uCrtDriver ].Verified = FALSE;
  978. }
  979. m_VerifState.AdditionalDriverNames[0] = (TCHAR)0;
  980. AddTheListItems();
  981. CheckRadioButton( IDC_VERIFALL_RADIO, IDC_VERIFSEL_RADIO,
  982. IDC_VERIFSEL_RADIO );
  983. m_PagedCCheck.SetCheck( 0 );
  984. m_SpecialPoolVerifCheck.SetCheck( 0 );
  985. m_AllocFCheck.SetCheck( 0 );
  986. m_PoolTCheck.SetCheck( 0 );
  987. m_IOVerifCheck.SetCheck( 0 );
  988. m_AdditDrvEdit.SetWindowText( _T("") );
  989. m_eListState = vrfControlEnabled;
  990. m_eApplyButtonState = vrfControlEnabled;
  991. m_eIoRadioState = vrfControlDisabled;
  992. UpdateControlsState();
  993. }
  994. /////////////////////////////////////////////////////////////////////////////
  995. void CModifSettPage::OnPrefButton()
  996. {
  997. m_VerifState.AllDriversVerified = TRUE;
  998. m_VerifState.SpecialPoolVerification = TRUE;
  999. m_VerifState.PagedCodeVerification = TRUE;
  1000. m_VerifState.AllocationFaultInjection = FALSE;
  1001. m_VerifState.PoolTracking = TRUE;
  1002. m_VerifState.IoVerifier = TRUE;
  1003. m_VerifState.SysIoVerifierLevel = 1;
  1004. m_VerifState.AdditionalDriverNames[0] = (TCHAR)0;
  1005. CheckRadioButton( IDC_VERIFALL_RADIO, IDC_VERIFSEL_RADIO,
  1006. IDC_VERIFALL_RADIO );
  1007. m_PagedCCheck.SetCheck( 1 );
  1008. m_SpecialPoolVerifCheck.SetCheck( 1 );
  1009. m_PoolTCheck.SetCheck( 1 );
  1010. m_AllocFCheck.SetCheck( 0 );
  1011. m_IOVerifCheck.SetCheck( 1 );
  1012. m_eListState = vrfControlDisabled;
  1013. m_eApplyButtonState = vrfControlEnabled;
  1014. m_eIoRadioState = vrfControlEnabled;
  1015. CheckRadioButton(
  1016. IDC_MODSETT_IO_SELDRIVERS_RADIO,
  1017. IDC_MODSETT_IO_SYSWIDE_RADIO,
  1018. IDC_MODSETT_IO_SYSWIDE_RADIO );
  1019. UpdateControlsState();
  1020. }
  1021. /////////////////////////////////////////////////////////////////////////////
  1022. BOOL CModifSettPage::OnInitDialog()
  1023. {
  1024. //
  1025. // get the current status
  1026. //
  1027. CWaitCursor WaitCursor;
  1028. VrfGetVerifierState( &m_VerifState );
  1029. if( m_VerifState.IoVerifier == TRUE )
  1030. {
  1031. m_eIoRadioState = vrfControlEnabled;
  1032. }
  1033. else
  1034. {
  1035. m_eIoRadioState = vrfControlDisabled;
  1036. }
  1037. GetDlgDataFromSett();
  1038. CPropertyPage::OnInitDialog();
  1039. //
  1040. // the list of drivers
  1041. //
  1042. SetupTheList();
  1043. //
  1044. // sort the list by the driver name
  1045. //
  1046. m_nLastColumnClicked = 0;
  1047. m_DriversList.SortItems( DrvNameCmpFunc, (LPARAM)this );
  1048. //
  1049. // update all controls
  1050. //
  1051. UpdateControlsState();
  1052. WaitCursor.Restore();
  1053. return TRUE; // return TRUE unless you set the focus to a control
  1054. // EXCEPTION: OCX Property Pages should return FALSE
  1055. }
  1056. /////////////////////////////////////////////////////////////////////////////
  1057. void CModifSettPage::OnRclickDriversList(NMHDR* pNMHDR, LRESULT* pResult)
  1058. {
  1059. POINT point;
  1060. CMenu theMenu, *pTrackedMenu = NULL;
  1061. BOOL bVerifiedMenu = FALSE, bNotVerifiedMenu = FALSE;
  1062. if( m_eListState != vrfControlEnabled )
  1063. return;
  1064. int nItems = m_DriversList.GetItemCount();
  1065. for(int nCrtItem = 0; nCrtItem < nItems; nCrtItem++ )
  1066. {
  1067. if( m_DriversList.GetItemState( nCrtItem, LVIS_SELECTED ) &
  1068. LVIS_SELECTED )
  1069. {
  1070. UINT uIndexInArray = (UINT)m_DriversList.GetItemData( nCrtItem );
  1071. if( m_VerifState.DriverInfo[ uIndexInArray ].Verified )
  1072. {
  1073. bVerifiedMenu = TRUE;
  1074. }
  1075. else
  1076. {
  1077. bNotVerifiedMenu = TRUE;
  1078. }
  1079. }
  1080. }
  1081. if( bVerifiedMenu && bNotVerifiedMenu )
  1082. {
  1083. VERIFY( theMenu.LoadMenu( IDM_BOTH_VERIFIED_ITEM ) );
  1084. }
  1085. else
  1086. {
  1087. if( bVerifiedMenu )
  1088. {
  1089. VERIFY( theMenu.LoadMenu( IDM_VERIFIED_ITEM ) );
  1090. }
  1091. else
  1092. {
  1093. if( bNotVerifiedMenu )
  1094. {
  1095. VERIFY( theMenu.LoadMenu( IDM_NOT_VERIFIED_ITEM ) );
  1096. }
  1097. }
  1098. }
  1099. pTrackedMenu = theMenu.GetSubMenu( 0 );
  1100. if( pTrackedMenu != NULL )
  1101. {
  1102. ASSERT_VALID( pTrackedMenu );
  1103. VERIFY( ::GetCursorPos( &point ) );
  1104. VERIFY( pTrackedMenu->TrackPopupMenu(
  1105. TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON,
  1106. point.x, point.y,
  1107. this ) );
  1108. }
  1109. else
  1110. {
  1111. ASSERT( FALSE );
  1112. }
  1113. *pResult = 0;
  1114. }
  1115. /////////////////////////////////////////////////////////////////////////////
  1116. void CModifSettPage::OnDoVerify()
  1117. {
  1118. OnVerifyButton();
  1119. }
  1120. /////////////////////////////////////////////////////////////////////////////
  1121. void CModifSettPage::OnDontVerify()
  1122. {
  1123. OnDontverifyButton();
  1124. }
  1125. /////////////////////////////////////////////////////////////////////////////
  1126. void CModifSettPage::OnCancel()
  1127. {
  1128. if( g_bSettingsSaved )
  1129. {
  1130. ::AfxMessageBox( IDS_REBOOT, MB_OK | MB_ICONINFORMATION );
  1131. }
  1132. CPropertyPage::OnCancel();
  1133. }
  1134. /////////////////////////////////////////////////////////////////////////////
  1135. void CModifSettPage::OnOK()
  1136. {
  1137. if( g_bSettingsSaved )
  1138. {
  1139. ::AfxMessageBox( IDS_REBOOT, MB_OK | MB_ICONINFORMATION );
  1140. }
  1141. CPropertyPage::OnOK();
  1142. }
  1143. /////////////////////////////////////////////////////////////////////////////
  1144. BOOL CModifSettPage::OnQueryCancel()
  1145. {
  1146. if( m_eApplyButtonState == vrfControlEnabled )
  1147. {
  1148. if( ::AfxMessageBox( IDS_CHANGES_NOT_SAVED,
  1149. MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2 ) == IDNO )
  1150. return FALSE;
  1151. }
  1152. return CPropertyPage::OnQueryCancel();
  1153. }
  1154. /////////////////////////////////////////////////////////////////////////////
  1155. BOOL CModifSettPage::OnApply()
  1156. {
  1157. return FALSE;
  1158. }
  1159. /////////////////////////////////////////////////////////////
  1160. LONG CModifSettPage::OnHelp( WPARAM wParam, LPARAM lParam )
  1161. {
  1162. LONG lResult = 0;
  1163. LPHELPINFO lpHelpInfo = (LPHELPINFO)lParam;
  1164. ::WinHelp(
  1165. (HWND) lpHelpInfo->hItemHandle,
  1166. VERIFIER_HELP_FILE,
  1167. HELP_WM_HELP,
  1168. (DWORD_PTR) MyHelpIds );
  1169. return lResult;
  1170. }
  1171. /////////////////////////////////////////////////////////////
  1172. LONG CModifSettPage::OnContextMenu( WPARAM wParam, LPARAM lParam )
  1173. {
  1174. LONG lResult = 0;
  1175. ::WinHelp(
  1176. (HWND) wParam,
  1177. VERIFIER_HELP_FILE,
  1178. HELP_CONTEXTMENU,
  1179. (DWORD_PTR) MyHelpIds );
  1180. return lResult;
  1181. }