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.

720 lines
23 KiB

  1. /*++
  2. Copyright (c) 1992-2002 Microsoft Corporation
  3. Module Name:
  4. Memory.c
  5. Abstract:
  6. This module contains the memory options dialog callback and supporting
  7. routines to choose options for memory display.
  8. --*/
  9. #include "precomp.hxx"
  10. #pragma hdrstop
  11. _FORMATS_MEM_WIN g_FormatsMemWin[] = {
  12. {8, fmtAscii, 0, FALSE, 1, _T("ASCII")},
  13. {16, fmtUnicode, 0, FALSE, 1, _T("Unicode")},
  14. {8, fmtBit, 2, FALSE, 8, _T("Bit")},
  15. {8, fmtInt | fmtZeroPad, 16, TRUE, 2, _T("Byte")},
  16. {16, fmtInt | fmtSpacePad, 10, FALSE, 6, _T("Short")},
  17. {16, fmtUInt | fmtZeroPad, 16, FALSE, 4, _T("Short Hex")},
  18. {16, fmtUInt | fmtSpacePad, 10, FALSE, 5, _T("Short Unsigned")},
  19. {32, fmtInt | fmtSpacePad, 10, FALSE, 11, _T("Long")},
  20. {32, fmtUInt | fmtZeroPad, 16, FALSE, 8, _T("Long Hex")},
  21. {32, fmtUInt | fmtSpacePad, 10, FALSE, 10, _T("Long Unsigned")},
  22. {64, fmtInt | fmtSpacePad, 10, FALSE, 21, _T("Quad")},
  23. {64, fmtUInt | fmtZeroPad, 16, FALSE, 16, _T("Quad Hex")},
  24. {64, fmtUInt | fmtSpacePad, 10, FALSE, 20, _T("Quad Unsigned")},
  25. {32, fmtFloat, 10, FALSE, 14, _T("Real (32-bit)")},
  26. {64, fmtFloat, 10, FALSE, 23, _T("Real (64-bit)")},
  27. {80, fmtFloat, 10, FALSE, 25, _T("Real (10-byte)")},
  28. {128,fmtFloat, 10, FALSE, 42, _T("Real (16-byte)")}
  29. };
  30. const int g_nMaxNumFormatsMemWin = sizeof(g_FormatsMemWin) / sizeof(g_FormatsMemWin[0]);
  31. HWND hwndMemOptsParent = NULL;
  32. void
  33. Init(HWND,
  34. HINSTANCE,
  35. LPPROPSHEETHEADER,
  36. PROPSHEETPAGE [],
  37. const int
  38. );
  39. INT_PTR CALLBACK DlgProc_Physical_Mem(HWND, UINT, WPARAM, LPARAM);
  40. INT_PTR CALLBACK DlgProc_Virtual_Mem(HWND, UINT, WPARAM, LPARAM);
  41. INT_PTR CALLBACK DlgProc_IO_Mem(HWND, UINT, WPARAM, LPARAM);
  42. INT_PTR CALLBACK DlgProc_Bus_Mem(HWND, UINT, WPARAM, LPARAM);
  43. INT_PTR CALLBACK DlgProc_Control_Mem(HWND, UINT, WPARAM, LPARAM);
  44. INT_PTR CALLBACK DlgProc_MSR_Mem(HWND, UINT, WPARAM, LPARAM);
  45. INT_PTR
  46. CALLBACK
  47. DlgProc_MemoryProperties(MEMORY_TYPE, HWND, UINT, WPARAM, LPARAM);
  48. int
  49. MemType_To_DlgId(
  50. MEMORY_TYPE memtype
  51. )
  52. {
  53. int i;
  54. struct {
  55. MEMORY_TYPE memtype;
  56. int nId;
  57. } rgMap[] = {
  58. { PHYSICAL_MEM_TYPE, IDD_DLG_MEM_PHYSICAL },
  59. { VIRTUAL_MEM_TYPE, IDD_DLG_MEM_VIRTUAL },
  60. { BUS_MEM_TYPE, IDD_DLG_MEM_BUS_DATA },
  61. { CONTROL_MEM_TYPE, IDD_DLG_MEM_CONTROL },
  62. { IO_MEM_TYPE, IDD_DLG_MEM_IO },
  63. { MSR_MEM_TYPE, IDD_DLG_MEM_MSR }
  64. };
  65. for (i=0; i<sizeof(rgMap)/sizeof(rgMap[0]); i++) {
  66. if (memtype == rgMap[i].memtype) {
  67. return rgMap[i].nId;
  68. }
  69. }
  70. Assert(!"This should not happen");
  71. return 0;
  72. }
  73. INT_PTR
  74. DisplayOptionsPropSheet(
  75. HWND hwndOwner,
  76. HINSTANCE hinst,
  77. MEMORY_TYPE memtypeStartPage
  78. )
  79. /*++
  80. Routine Description:
  81. Will Initialize and display the Options property sheet. Handle the return codes,
  82. and the commitment of changes to the debugger.
  83. Arguments:
  84. hwndOwner
  85. hinst
  86. Are both used initialize the property sheet dialog.
  87. nStart - Is used to specify the page that is to be initially
  88. displayed when the prop sheet first appears. The default
  89. value is 0. The values specified correspond to array index
  90. of the PROPSHEETPAGE array.
  91. Returns
  92. Button pushed IDOK, etc...
  93. --*/
  94. {
  95. INT_PTR nRes = 0;
  96. PROPSHEETHEADER psh = {0};
  97. PROPSHEETPAGE apsp[MAX_MEMORY_TYPE] = {0};
  98. int nNumPropPages = sizeof(apsp) / sizeof(PROPSHEETPAGE);
  99. Init(hwndOwner, hinst, &psh, apsp, nNumPropPages);
  100. {
  101. //
  102. // Figure out the initial page to be displayed
  103. //
  104. int i;
  105. int nStartPage = 0;
  106. int nId = MemType_To_DlgId(memtypeStartPage);
  107. for (i=0; i<MAX_MEMORY_TYPE; i++) {
  108. if ( (PVOID)(MAKEINTRESOURCE(nId)) == (PVOID)(apsp[i].pszTemplate) ) {
  109. nStartPage = i;
  110. break;
  111. }
  112. }
  113. psh.nStartPage = nStartPage;
  114. }
  115. hwndMemOptsParent = hwndOwner;
  116. nRes = PropertySheet(&psh);
  117. hwndMemOptsParent = NULL;
  118. if (IDOK == nRes) {
  119. // Save workspace changes here
  120. }
  121. return nRes;
  122. }
  123. void
  124. Init(
  125. HWND hwndOwner,
  126. HINSTANCE hinst,
  127. LPPROPSHEETHEADER lppsh,
  128. PROPSHEETPAGE apsp[],
  129. const int nMaxPropPages
  130. )
  131. /*++
  132. Routine Description:
  133. Initializes the property sheet header and pages.
  134. Arguments:
  135. hwndOwner
  136. hinst
  137. Are both used by the PROPSHEETHEADER & PROPSHEETPAGE structure.
  138. Please see the docs for the these structures for more info.
  139. lppsh
  140. Standard prop sheet structure.
  141. apsp[]
  142. An array of prop pages
  143. Standard prop sheet structure.
  144. nNumPropPages
  145. Number of prop pages in the "apsp" array.
  146. --*/
  147. {
  148. int nPropIdx;
  149. memset(lppsh, 0, sizeof(PROPSHEETHEADER));
  150. lppsh->dwSize = sizeof(PROPSHEETHEADER);
  151. lppsh->dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW;
  152. lppsh->hwndParent = hwndOwner;
  153. lppsh->hInstance = hinst;
  154. lppsh->pszCaption = "Memory Options";
  155. lppsh->nPages = 0;
  156. lppsh->ppsp = apsp;
  157. // Init the first one, then copy its contents to all the others
  158. memset(apsp, 0, sizeof(PROPSHEETPAGE));
  159. apsp[0].dwSize = sizeof(PROPSHEETPAGE);
  160. // apsp[0].dwFlags = PSP_HASHELP;
  161. apsp[0].hInstance = hinst;
  162. for (nPropIdx = 1; nPropIdx < nMaxPropPages; nPropIdx++) {
  163. memcpy(&(apsp[nPropIdx]), &apsp[0], sizeof(PROPSHEETPAGE));
  164. }
  165. // Only init the distinct values
  166. nPropIdx = 0;
  167. apsp[nPropIdx].pszTemplate = MAKEINTRESOURCE(IDD_DLG_MEM_VIRTUAL);
  168. apsp[nPropIdx].pfnDlgProc = DlgProc_Virtual_Mem;
  169. if (g_TargetClass == DEBUG_CLASS_KERNEL)
  170. {
  171. nPropIdx = 1;
  172. apsp[nPropIdx].pszTemplate = MAKEINTRESOURCE(IDD_DLG_MEM_PHYSICAL);
  173. apsp[nPropIdx].pfnDlgProc = DlgProc_Physical_Mem;
  174. nPropIdx = 2;
  175. apsp[nPropIdx].pszTemplate = MAKEINTRESOURCE(IDD_DLG_MEM_BUS_DATA);
  176. apsp[nPropIdx].pfnDlgProc = DlgProc_Bus_Mem;
  177. nPropIdx = 3;
  178. apsp[nPropIdx].pszTemplate = MAKEINTRESOURCE(IDD_DLG_MEM_CONTROL);
  179. apsp[nPropIdx].pfnDlgProc = DlgProc_Control_Mem;
  180. nPropIdx = 4;
  181. apsp[nPropIdx].pszTemplate = MAKEINTRESOURCE(IDD_DLG_MEM_IO);
  182. apsp[nPropIdx].pfnDlgProc = DlgProc_IO_Mem;
  183. nPropIdx = 5;
  184. apsp[nPropIdx].pszTemplate = MAKEINTRESOURCE(IDD_DLG_MEM_MSR);
  185. apsp[nPropIdx].pfnDlgProc = DlgProc_MSR_Mem;
  186. }
  187. Assert(nPropIdx < nMaxPropPages);
  188. lppsh->nPages = nPropIdx + 1;
  189. }
  190. INT_PTR
  191. CALLBACK
  192. DlgProc_MemoryProperties(
  193. MEMORY_TYPE memtype,
  194. HWND hDlg,
  195. UINT uMsg,
  196. WPARAM wParam,
  197. LPARAM lParam
  198. )
  199. {
  200. LRESULT nPos;
  201. MEMWIN_DATA *pMemWinData = GetMemWinData( hwndMemOptsParent );
  202. switch (uMsg) {
  203. /*
  204. case WM_HELP:
  205. WinHelp((HWND)((LPHELPINFO) lParam)->hItemHandle, "windbg.hlp", HELP_WM_HELP,
  206. (DWORD_PTR)(LPVOID) HelpArray );
  207. return TRUE;
  208. case WM_CONTEXTMENU:
  209. WinHelp ((HWND) wParam, "windbg.hlp", HELP_CONTEXTMENU,
  210. (DWORD_PTR)(LPVOID) HelpArray );
  211. return TRUE;
  212. */
  213. case WM_COMMAND:
  214. /*{
  215. WORD wNotifyCode = HIWORD(wParam); // notification code
  216. WORD wID = LOWORD(wParam); // item, control, or accelerator identifier
  217. HWND hwndCtl = (HWND) lParam; // handle of control
  218. BOOL bEnabled;
  219. switch(wID) {
  220. case ID_ENV_SRCHPATH:
  221. if (BN_CLICKED == wNotifyCode) {
  222. BOOL b = IsDlgButtonChecked(hDlg, ID_ENV_SRCHPATH);
  223. EnableWindow(GetDlgItem(hDlg, IDC_EDIT_EXECUTABLE_SEARCH_PATH), b);
  224. EnableWindow(GetDlgItem(hDlg, IDC_BUT_BROWSE), b);
  225. return TRUE;
  226. }
  227. break;
  228. }
  229. }*/
  230. break;
  231. case WM_INITDIALOG:
  232. { // begin Prog & Arguments code block
  233. int nIdx;
  234. TCHAR szTmp[MAX_MSG_TXT];
  235. //
  236. // Enter the display formats
  237. //
  238. for (nIdx=0; nIdx < g_nMaxNumFormatsMemWin; nIdx++) {
  239. nPos = SendDlgItemMessage(hDlg,
  240. IDC_COMBO_DISPLAY_FORMAT,
  241. CB_ADDSTRING,
  242. 0,
  243. (LPARAM) g_FormatsMemWin[nIdx].lpszDescription
  244. );
  245. SendDlgItemMessage(hDlg,
  246. IDC_COMBO_DISPLAY_FORMAT,
  247. CB_SETITEMDATA,
  248. (WPARAM) nPos,
  249. (LPARAM) (UINT) nIdx
  250. );
  251. }
  252. SendDlgItemMessage(hDlg,
  253. IDC_COMBO_DISPLAY_FORMAT,
  254. CB_SELECTSTRING,
  255. (WPARAM) -1,
  256. (LPARAM) g_FormatsMemWin[pMemWinData->m_GenMemData.nDisplayFormat].lpszDescription
  257. );
  258. //
  259. // Update the offset. Offset is common to all dialogs
  260. //
  261. SendDlgItemMessage(hDlg, IDC_EDIT_OFFSET, EM_LIMITTEXT,
  262. sizeof(pMemWinData->m_OffsetExpr) - 1, 0);
  263. SetDlgItemText(hDlg, IDC_EDIT_OFFSET, pMemWinData->m_OffsetExpr);
  264. switch (memtype) {
  265. default:
  266. Assert(!"Unhandled value");
  267. break;
  268. case VIRTUAL_MEM_TYPE:
  269. // Nothing to do
  270. break;
  271. case PHYSICAL_MEM_TYPE:
  272. // Nothing to do
  273. break;
  274. case CONTROL_MEM_TYPE:
  275. SendDlgItemMessage(hDlg, IDC_EDIT_PROCESSOR, EM_LIMITTEXT,
  276. 32, 0);
  277. sprintf(szTmp, "%d",
  278. pMemWinData->m_GenMemData.any.control.Processor);
  279. SetDlgItemText(hDlg, IDC_EDIT_PROCESSOR, szTmp);
  280. break;
  281. case IO_MEM_TYPE:
  282. SendDlgItemMessage(hDlg, IDC_EDIT_BUS_NUMBER, EM_LIMITTEXT,
  283. 32, 0);
  284. SendDlgItemMessage(hDlg, IDC_EDIT_ADDRESS_SPACE, EM_LIMITTEXT,
  285. 32, 0);
  286. sprintf(szTmp, "%d",
  287. pMemWinData->m_GenMemData.any.io.BusNumber);
  288. SetDlgItemText(hDlg, IDC_EDIT_BUS_NUMBER, szTmp);
  289. sprintf(szTmp, "%d",
  290. pMemWinData->m_GenMemData.any.io.AddressSpace);
  291. SetDlgItemText(hDlg, IDC_EDIT_ADDRESS_SPACE, szTmp);
  292. //
  293. // Enter the interface types
  294. //
  295. for (nIdx = 0; nIdx < sizeof(rgInterfaceTypeNames) /
  296. sizeof(rgInterfaceTypeNames[0]); nIdx++) {
  297. nPos = SendDlgItemMessage(hDlg,
  298. IDC_COMBO_INTERFACE_TYPE,
  299. CB_ADDSTRING,
  300. 0,
  301. (LPARAM) rgInterfaceTypeNames[nIdx].psz
  302. );
  303. SendDlgItemMessage(hDlg,
  304. IDC_COMBO_INTERFACE_TYPE,
  305. CB_SETITEMDATA,
  306. (WPARAM) nPos,
  307. (LPARAM) (UINT) nIdx
  308. );
  309. }
  310. if (memtype == pMemWinData->m_GenMemData.memtype) {
  311. nIdx = pMemWinData->m_GenMemData.any.io.interface_type;
  312. } else {
  313. nIdx = 0;
  314. }
  315. SendDlgItemMessage(hDlg,
  316. IDC_COMBO_INTERFACE_TYPE,
  317. CB_SELECTSTRING,
  318. (WPARAM) -1,
  319. (LPARAM) rgInterfaceTypeNames[nIdx].psz
  320. );
  321. break;
  322. case MSR_MEM_TYPE:
  323. // Nothing to do
  324. break;
  325. case BUS_MEM_TYPE:
  326. SendDlgItemMessage(hDlg, IDC_EDIT_BUS_NUMBER, EM_LIMITTEXT,
  327. 32, 0);
  328. SendDlgItemMessage(hDlg, IDC_EDIT_SLOT_NUMBER, EM_LIMITTEXT,
  329. 32, 0);
  330. sprintf(szTmp, "%d",
  331. pMemWinData->m_GenMemData.any.bus.BusNumber);
  332. SetDlgItemText(hDlg, IDC_EDIT_BUS_NUMBER, szTmp);
  333. sprintf(szTmp, "%d",
  334. pMemWinData->m_GenMemData.any.bus.SlotNumber);
  335. SetDlgItemText(hDlg, IDC_EDIT_SLOT_NUMBER, szTmp);
  336. //
  337. // Enter the bus types
  338. //
  339. for (nIdx = 0; nIdx < sizeof(rgBusTypeNames) /
  340. sizeof(rgBusTypeNames[0]); nIdx++) {
  341. nPos = SendDlgItemMessage(hDlg,
  342. IDC_COMBO_BUS_DATA_TYPE,
  343. CB_ADDSTRING,
  344. 0,
  345. (LPARAM) rgBusTypeNames[nIdx].psz
  346. );
  347. SendDlgItemMessage(hDlg,
  348. IDC_COMBO_BUS_DATA_TYPE,
  349. CB_SETITEMDATA,
  350. (WPARAM) nPos,
  351. (LPARAM) (UINT) nIdx
  352. );
  353. }
  354. if (memtype == pMemWinData->m_GenMemData.memtype) {
  355. nIdx = pMemWinData->m_GenMemData.any.bus.bus_type;
  356. } else {
  357. nIdx = 0;
  358. }
  359. SendDlgItemMessage(hDlg,
  360. IDC_COMBO_BUS_DATA_TYPE,
  361. CB_SELECTSTRING,
  362. (WPARAM) -1,
  363. (LPARAM) rgBusTypeNames[nIdx].psz
  364. );
  365. break;
  366. }
  367. return FALSE;
  368. } // end Prog & Arguments code block
  369. break;
  370. case WM_NOTIFY:
  371. switch (((NMHDR FAR *) lParam)->code) {
  372. case PSN_SETACTIVE:
  373. pMemWinData->m_GenMemData.memtype = memtype;
  374. return 0;
  375. case PSN_KILLACTIVE:
  376. SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
  377. return 1;
  378. case PSN_APPLY:
  379. if (memtype != pMemWinData->m_GenMemData.memtype) {
  380. // This isn't the current page so ignore.
  381. break;
  382. }
  383. int nIdx;
  384. TCHAR szTmp[MAX_MSG_TXT];
  385. //
  386. // Get the display formats
  387. //
  388. nPos = SendDlgItemMessage(hDlg,
  389. IDC_COMBO_DISPLAY_FORMAT,
  390. CB_GETCURSEL,
  391. 0,
  392. 0
  393. );
  394. if (CB_ERR == nPos) {
  395. pMemWinData->m_GenMemData.nDisplayFormat = 0;
  396. } else {
  397. nIdx = (int)SendDlgItemMessage(hDlg,
  398. IDC_COMBO_DISPLAY_FORMAT,
  399. CB_GETITEMDATA,
  400. (WPARAM) nPos,
  401. 0
  402. );
  403. if (CB_ERR == nIdx) {
  404. pMemWinData->m_GenMemData.nDisplayFormat = 0;
  405. } else {
  406. pMemWinData->m_GenMemData.nDisplayFormat = nIdx;
  407. }
  408. }
  409. //
  410. // Update the offset. Offset is common to all dialogs
  411. //
  412. GetDlgItemText(hDlg, IDC_EDIT_OFFSET,
  413. pMemWinData->m_OffsetExpr,
  414. sizeof(pMemWinData->m_OffsetExpr));
  415. switch (memtype) {
  416. default:
  417. Assert(!"Unhandled value");
  418. break;
  419. case VIRTUAL_MEM_TYPE:
  420. // Nothing to do
  421. break;
  422. case PHYSICAL_MEM_TYPE:
  423. // Nothing to do
  424. break;
  425. case CONTROL_MEM_TYPE:
  426. GetDlgItemText(hDlg, IDC_EDIT_PROCESSOR,
  427. szTmp, _tsizeof(szTmp));
  428. if (sscanf(szTmp, "%d", &pMemWinData->
  429. m_GenMemData.any.control.Processor) != 1)
  430. {
  431. pMemWinData->m_GenMemData.any.control.Processor = 0;
  432. }
  433. break;
  434. case IO_MEM_TYPE:
  435. GetDlgItemText(hDlg, IDC_EDIT_BUS_NUMBER,
  436. szTmp, _tsizeof(szTmp));
  437. if (sscanf(szTmp, "%d", &pMemWinData->
  438. m_GenMemData.any.io.BusNumber) != 1)
  439. {
  440. pMemWinData->m_GenMemData.any.io.BusNumber = 0;
  441. }
  442. GetDlgItemText(hDlg, IDC_EDIT_ADDRESS_SPACE,
  443. szTmp, _tsizeof(szTmp));
  444. if (sscanf(szTmp, "%d", &pMemWinData->
  445. m_GenMemData.any.io.AddressSpace) != 1)
  446. {
  447. pMemWinData->m_GenMemData.any.io.AddressSpace = 0;
  448. }
  449. //
  450. // Get the interface types
  451. //
  452. nPos = SendDlgItemMessage(hDlg,
  453. IDC_COMBO_INTERFACE_TYPE,
  454. CB_GETCURSEL,
  455. 0,
  456. 0
  457. );
  458. if (CB_ERR == nPos) {
  459. pMemWinData->m_GenMemData.any.io.interface_type =
  460. _INTERFACE_TYPE(0);
  461. } else {
  462. nIdx = (int)SendDlgItemMessage(hDlg,
  463. IDC_COMBO_INTERFACE_TYPE,
  464. CB_GETITEMDATA,
  465. (WPARAM) nPos,
  466. 0
  467. );
  468. if (CB_ERR == nIdx) {
  469. pMemWinData->m_GenMemData.any.io.interface_type =
  470. _INTERFACE_TYPE(0);
  471. } else {
  472. pMemWinData->m_GenMemData.any.io.interface_type =
  473. _INTERFACE_TYPE(nIdx);
  474. }
  475. }
  476. break;
  477. case MSR_MEM_TYPE:
  478. // Nothing to do
  479. break;
  480. case BUS_MEM_TYPE:
  481. GetDlgItemText(hDlg, IDC_EDIT_BUS_NUMBER,
  482. szTmp, _tsizeof(szTmp));
  483. if (sscanf(szTmp, "%d", &pMemWinData->
  484. m_GenMemData.any.bus.BusNumber) != 1)
  485. {
  486. pMemWinData->m_GenMemData.any.bus.BusNumber = 0;
  487. }
  488. GetDlgItemText(hDlg, IDC_EDIT_SLOT_NUMBER,
  489. szTmp, _tsizeof(szTmp));
  490. if (sscanf(szTmp, "%d", &pMemWinData->
  491. m_GenMemData.any.bus.SlotNumber) != 1)
  492. {
  493. pMemWinData->m_GenMemData.any.bus.SlotNumber = 0;
  494. }
  495. //
  496. // Get the bus type
  497. //
  498. nPos = SendDlgItemMessage(hDlg,
  499. IDC_COMBO_BUS_DATA_TYPE,
  500. CB_GETCURSEL,
  501. 0,
  502. 0
  503. );
  504. if (CB_ERR == nPos) {
  505. pMemWinData->m_GenMemData.any.bus.bus_type =
  506. _BUS_DATA_TYPE(0);
  507. } else {
  508. nIdx = (int)SendDlgItemMessage(hDlg,
  509. IDC_COMBO_BUS_DATA_TYPE,
  510. CB_GETITEMDATA,
  511. (WPARAM) nPos,
  512. 0
  513. );
  514. if (CB_ERR == nIdx) {
  515. pMemWinData->m_GenMemData.any.bus.bus_type =
  516. _BUS_DATA_TYPE(0);
  517. } else {
  518. pMemWinData->m_GenMemData.any.bus.bus_type =
  519. _BUS_DATA_TYPE(nIdx);
  520. }
  521. }
  522. break;
  523. }
  524. return FALSE;
  525. }
  526. break;
  527. }
  528. return FALSE;
  529. }
  530. INT_PTR
  531. CALLBACK
  532. DlgProc_Physical_Mem(
  533. HWND hDlg,
  534. UINT uMsg,
  535. WPARAM wParam,
  536. LPARAM lParam
  537. )
  538. {
  539. return DlgProc_MemoryProperties(PHYSICAL_MEM_TYPE, hDlg, uMsg, wParam, lParam);
  540. }
  541. INT_PTR
  542. CALLBACK
  543. DlgProc_Virtual_Mem(
  544. HWND hDlg,
  545. UINT uMsg,
  546. WPARAM wParam,
  547. LPARAM lParam
  548. )
  549. {
  550. return DlgProc_MemoryProperties(VIRTUAL_MEM_TYPE, hDlg, uMsg, wParam, lParam);
  551. }
  552. INT_PTR
  553. CALLBACK
  554. DlgProc_IO_Mem(
  555. HWND hDlg,
  556. UINT uMsg,
  557. WPARAM wParam,
  558. LPARAM lParam
  559. )
  560. {
  561. return DlgProc_MemoryProperties(IO_MEM_TYPE, hDlg, uMsg, wParam, lParam);
  562. }
  563. INT_PTR
  564. CALLBACK
  565. DlgProc_Bus_Mem(
  566. HWND hDlg,
  567. UINT uMsg,
  568. WPARAM wParam,
  569. LPARAM lParam
  570. )
  571. {
  572. return DlgProc_MemoryProperties(BUS_MEM_TYPE, hDlg, uMsg, wParam, lParam);
  573. }
  574. INT_PTR
  575. CALLBACK
  576. DlgProc_Control_Mem(
  577. HWND hDlg,
  578. UINT uMsg,
  579. WPARAM wParam,
  580. LPARAM lParam
  581. )
  582. {
  583. return DlgProc_MemoryProperties(CONTROL_MEM_TYPE, hDlg, uMsg, wParam, lParam);
  584. }
  585. INT_PTR
  586. CALLBACK
  587. DlgProc_MSR_Mem(
  588. HWND hDlg,
  589. UINT uMsg,
  590. WPARAM wParam,
  591. LPARAM lParam
  592. )
  593. {
  594. return DlgProc_MemoryProperties(MSR_MEM_TYPE, hDlg, uMsg, wParam, lParam);
  595. }