mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
adjustments for GCC and MinGW
svn path=/trunk/; revision=15264
This commit is contained in:
parent
a0cb9c83ab
commit
3feb9db02b
1 changed files with 6 additions and 2 deletions
|
@ -2013,28 +2013,32 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
|
|||
|
||||
case ID_CONNECT_NETWORK_DRIVE: {
|
||||
DWORD ret = WNetConnectionDialog(hwnd, RESOURCETYPE_DISK);
|
||||
if (ret!=NO_ERROR && ret!=(DWORD)-1)
|
||||
if (ret!=NO_ERROR && ret!=(DWORD)-1) {
|
||||
if (ret == ERROR_EXTENDED_ERROR)
|
||||
display_network_error(hwnd);
|
||||
else
|
||||
display_error(hwnd, ret);
|
||||
}
|
||||
break;}
|
||||
|
||||
case ID_DISCONNECT_NETWORK_DRIVE: {
|
||||
DWORD ret = WNetDisconnectDialog(hwnd, RESOURCETYPE_DISK);
|
||||
if (ret!=NO_ERROR && ret!=(DWORD)-1)
|
||||
if (ret!=NO_ERROR && ret!=(DWORD)-1) {
|
||||
if (ret == ERROR_EXTENDED_ERROR)
|
||||
display_network_error(hwnd);
|
||||
else
|
||||
display_error(hwnd, ret);
|
||||
}
|
||||
break;}
|
||||
|
||||
#ifndef __MINGW32__ /* SHFormatDrive missing in MinGW (as of 13.5.2005) */
|
||||
case ID_FORMAT_DISK: {
|
||||
UINT sem_org = SetErrorMode(0); /* Get the current Error Mode settings. */
|
||||
SetErrorMode(sem_org & ~SEM_FAILCRITICALERRORS); /* Force O/S to handle */
|
||||
SHFormatDrive(hwnd, 0 /* A: */, SHFMT_ID_DEFAULT, 0);
|
||||
SetErrorMode(sem_org); /* Put it back the way it was. */
|
||||
break;}
|
||||
#endif
|
||||
|
||||
case ID_HELP:
|
||||
WinHelp(hwnd, RS(b1,IDS_WINEFILE), HELP_INDEX, 0);
|
||||
|
|
Loading…
Reference in a new issue