diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index 1b25536f9e3..929e35cc14d 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -7550,6 +7550,11 @@ CM_Request_Device_Eject_ExW( if (pszVetoName == NULL && ulNameLength != 0) return CR_INVALID_POINTER; + /* Windows 2003 SP2 ignores pszVetoName when ulNameLength is zero + * and behaves like when pszVetoName is NULL */ + if (ulNameLength == 0) + pszVetoName = NULL; + if (hMachine != NULL) { BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;