···7575 /*
7676 * Enable a checkbox for each processor present in the system
7777 */
7878- if (dwSystemAffinityMask & (1 << nCpu))
7878+ if (dwSystemAffinityMask & ((ULONG_PTR)1 << nCpu))
7979 EnableWindow(GetDlgItem(hDlg, dwCpuTable[nCpu]), TRUE);
8080 /*
8181 * Check each checkbox that the current process
8282 * has affinity with
8383 */
8484- if (dwProcessAffinityMask & (1 << nCpu))
8484+ if (dwProcessAffinityMask & ((ULONG_PTR)1 << nCpu))
8585 CheckDlgButton(hDlg, dwCpuTable[nCpu], BST_CHECKED);
8686 }
8787···109109 * checkbox that the user checked.
110110 */
111111 if (IsDlgButtonChecked(hDlg, dwCpuTable[nCpu]))
112112- dwProcessAffinityMask |= (1 << nCpu);
112112+ dwProcessAffinityMask |= ((ULONG_PTR)1 << nCpu);
113113 }
114114115115 /*