Implement CM_Request_Eject_PC[_Ex].

svn path=/trunk/; revision=18207
This commit is contained in:
Eric Kohl 2005-10-02 10:07:25 +00:00
parent 3a68545201
commit 886778d0b2
5 changed files with 72 additions and 3 deletions

View file

@ -134,4 +134,7 @@ interface pnp
/* Function 38 */
CONFIGRET PNP_IsDockStationPresent(handle_t BindingHandle,
[out]PBOOL Present);
/* Function 39 */
CONFIGRET PNP_RequestEjectPC(handle_t BindingHandle);
}

View file

@ -223,6 +223,9 @@ CONFIGRET WINAPI CM_Open_Class_Key_ExA(LPGUID, LPCSTR, REGSAM, REGDISPOSITION, P
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 );

View file

@ -1539,7 +1539,7 @@ CONFIGRET WINAPI CM_Is_Dock_Station_Present_Ex(
{
RPC_BINDING_HANDLE BindingHandle = NULL;
FIXME("%p %lx\n", pbPresent, hMachine);
TRACE("%p %lx\n", pbPresent, hMachine);
if (pbPresent == NULL)
return CR_INVALID_POINTER;
@ -1835,6 +1835,42 @@ CONFIGRET WINAPI CM_Open_Class_Key_ExW(
}
/***********************************************************************
* 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.@]
*/

View file

@ -794,6 +794,7 @@ PNP_SetDeviceProblem(handle_t BindingHandle,
}
/* Function 38 */
CONFIGRET
PNP_IsDockStationPresent(handle_t BindingHandle,
unsigned long *Present)
@ -844,6 +845,22 @@ PNP_IsDockStationPresent(handle_t BindingHandle,
}
/* 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)
{

View file

@ -1773,8 +1773,18 @@ CM_Request_Device_EjectW(
#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 */