Skip to content

Commit

Permalink
[HOTPLUG] Add owner window for error message box
Browse files Browse the repository at this point in the history
  • Loading branch information
TAN-Gaming committed Oct 30, 2023
1 parent 0ef3e1c commit 9aa7ed5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dll/cpl/hotplug/eject.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ FillConfirmDeviceList(
static
VOID
SafeRemoveDevice(
_In_ DEVINST DevInst)
_In_ DEVINST DevInst,
_In_opt_ HWND hwndDlg)
{
PNP_VETO_TYPE VetoType = PNP_VetoTypeUnknown;
CONFIGRET cr;
Expand All @@ -64,7 +65,7 @@ SafeRemoveDevice(
{
WCHAR szError[64];
swprintf(szError, L"Failed to remove device (0x%x)", cr);
MessageBoxW(NULL, szError, NULL, MB_ICONEXCLAMATION | MB_OK);
MessageBoxW(hwndDlg, szError, NULL, MB_ICONEXCLAMATION | MB_OK);
}
}

Expand Down Expand Up @@ -102,7 +103,7 @@ ConfirmRemovalDlgProc(
switch (LOWORD(wParam))
{
case IDOK:
SafeRemoveDevice(GetDeviceInstForRemoval(pHotplugData));
SafeRemoveDevice(GetDeviceInstForRemoval(pHotplugData), hwndDlg);
EndDialog(hwndDlg, LOWORD(wParam));
break;

Expand Down

0 comments on commit 9aa7ed5

Please sign in to comment.