Implement CM_Request_Eject_PC[_Ex].
Modified: trunk/reactos/include/idl/pnp.idl
Modified: trunk/reactos/include/wine/cfgmgr32.h
Modified: trunk/reactos/lib/setupapi/cfgmgr.c
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
Modified: trunk/reactos/w32api/include/ddk/cfgmgr32.h
_____
Modified: trunk/reactos/include/idl/pnp.idl
--- trunk/reactos/include/idl/pnp.idl 2005-10-02 09:42:12 UTC (rev
18206)
+++ trunk/reactos/include/idl/pnp.idl 2005-10-02 10:07:25 UTC (rev
18207)
@@ -134,4 +134,7 @@
/* Function 38 */
CONFIGRET PNP_IsDockStationPresent(handle_t BindingHandle,
[out]PBOOL Present);
+
+ /* Function 39 */
+ CONFIGRET PNP_RequestEjectPC(handle_t BindingHandle);
}
_____
Modified: trunk/reactos/include/wine/cfgmgr32.h
--- trunk/reactos/include/wine/cfgmgr32.h 2005-10-02 09:42:12 UTC
(rev 18206)
+++ trunk/reactos/include/wine/cfgmgr32.h 2005-10-02 10:07:25 UTC
(rev 18207)
@@ -223,6 +223,9 @@
CONFIGRET WINAPI CM_Open_Class_Key_ExW(LPGUID, LPCWSTR, REGSAM,
REGDISPOSITION, PHKEY, ULONG, HMACHINE);
#define CM_Open_Class_Key_Ex WINELIB_NAME_AW(CM_Open_Class_Key_Ex)
+CONFIGRET WINAPI CM_Request_Eject_PC( VOID );
+CONFIGRET WINAPI CM_Request_Eject_PC_Ex( HMACHINE );
+
CONFIGRET WINAPI CM_Set_DevNode_Problem( DEVINST, ULONG, ULONG );
CONFIGRET WINAPI CM_Set_DevNode_Problem_Ex( DEVINST, ULONG, ULONG,
HMACHINE );
CONFIGRET WINAPI CM_Set_DevNode_Registry_PropertyA( DEVINST, ULONG,
PCVOID, ULONG, ULONG );
_____
Modified: trunk/reactos/lib/setupapi/cfgmgr.c
--- trunk/reactos/lib/setupapi/cfgmgr.c 2005-10-02 09:42:12 UTC (rev
18206)
+++ trunk/reactos/lib/setupapi/cfgmgr.c 2005-10-02 10:07:25 UTC (rev
18207)
@@ -1539,7 +1539,7 @@
{
RPC_BINDING_HANDLE BindingHandle = NULL;
- FIXME("%p %lx\n", pbPresent, hMachine);
+ TRACE("%p %lx\n", pbPresent, hMachine);
if (pbPresent == NULL)
return CR_INVALID_POINTER;
@@ -1836,6 +1836,42 @@
/***********************************************************************
+ * CM_Request_Eject_PC [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Request_Eject_PC(VOID)
+{
+ TRACE("\n");
+ return CM_Request_Eject_PC_Ex(NULL);
+}
+
+
+/**********************************************************************
*
+ * CM_Request_Eject_PC_Ex [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Request_Eject_PC_Ex(
+ HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+
+ TRACE("%lx\n", hMachine);
+
+ if (hMachine != NULL)
+ {
+ BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
+ if (BindingHandle == NULL)
+ return CR_FAILURE;
+ }
+ else
+ {
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return CR_FAILURE;
+ }
+
+ return PNP_RequestEjectPC(BindingHandle);
+}
+
+
+/**********************************************************************
*
* CM_Set_DevNode_Problem [SETUPAPI.@]
*/
CONFIGRET WINAPI CM_Set_DevNode_Problem(
_____
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
--- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-10-02 09:42:12 UTC
(rev 18206)
+++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-10-02 10:07:25 UTC
(rev 18207)
@@ -794,6 +794,7 @@
}
+/* Function 38 */
CONFIGRET
PNP_IsDockStationPresent(handle_t BindingHandle,
unsigned long *Present)
@@ -844,6 +845,22 @@
}
+/* Function 39 */
+CONFIGRET
+PNP_RequestEjectPC(handle_t BindingHandle)
+{
+ CONFIGRET ret = CR_SUCCESS;
+
+ DPRINT1("PNP_RequestEjectPC() called\n");
+
+ ret = CR_FAILURE; /* FIXME */
+
+ DPRINT1("PNP_RequestEjectPC() done (returns %lx)\n", ret);
+
+ return ret;
+}
+
+
static DWORD WINAPI
PnpEventThread(LPVOID lpParameter)
{
_____
Modified: trunk/reactos/w32api/include/ddk/cfgmgr32.h
--- trunk/reactos/w32api/include/ddk/cfgmgr32.h 2005-10-02 09:42:12 UTC
(rev 18206)
+++ trunk/reactos/w32api/include/ddk/cfgmgr32.h 2005-10-02 10:07:25 UTC
(rev 18207)
@@ -1773,8 +1773,18 @@
#define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
#endif /* UNICODE */
-/* FIXME: Obsolete CM_Request_Eject_PC */
-/* FIXME: Obsolete CM_Request_Eject_PC_Ex */
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Eject_PC(
+ VOID);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Eject_PC_Ex(
+ IN HMACHINE hMachine);
+
/* FIXME: Obsolete CM_Run_Detection */
/* FIXME: Obsolete CM_Run_Detection_Ex */
/* FIXME: Obsolete CM_Set_Class_Registry_Property */