mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
Add PNP_AddID stub and implement CM_Add_ID_ExW.
svn path=/trunk/; revision=22218
This commit is contained in:
parent
39635013ab
commit
0c13f30550
4 changed files with 76 additions and 7 deletions
|
@ -1039,6 +1039,29 @@ PNP_UninstallDevInst(handle_t BindingHandle,
|
|||
}
|
||||
|
||||
|
||||
/* Function 34 */
|
||||
CONFIGRET
|
||||
PNP_AddID(handle_t BindingHandle,
|
||||
wchar_t *DeviceInstance, /* in, string, unique */
|
||||
wchar_t *DeviceId, /* in, string */
|
||||
DWORD Flags)
|
||||
{
|
||||
CONFIGRET ret = CR_SUCCESS;
|
||||
|
||||
DPRINT1("PNP_AddID() called\n");
|
||||
DPRINT1(" DeviceInstance: %S\n", DeviceInstance);
|
||||
DPRINT1(" DeviceId: %S\n", DeviceId);
|
||||
DPRINT1(" Flags: %lx\n", Flags);
|
||||
|
||||
/* FIXME */
|
||||
ret = CR_CALL_NOT_IMPLEMENTED;
|
||||
|
||||
DPRINT1("PNP_AddID() done (returns %lx)\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Function 38 */
|
||||
CONFIGRET
|
||||
PNP_IsDockStationPresent(handle_t BindingHandle,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;
|
||||
; ReactOS cfgmgr32.dll
|
||||
;
|
||||
; Copyright (C) 2005 Eric Kohl
|
||||
; Copyright (C) 2005, 2006 Eric Kohl
|
||||
;
|
||||
; This program is free software; you can redistribute it and/or modify
|
||||
; it under the terms of the GNU General Public License as published by
|
||||
|
@ -27,10 +27,10 @@ CMP_Report_LogOn@4=SETUPAPI.CMP_Report_LogOn
|
|||
;CMP_WaitServices
|
||||
;CM_Add_Empty_Log_Conf@16=SETUPAPI.CM_Add_Empty_Log_Conf
|
||||
;CM_Add_Empty_Log_Conf_Ex@20=SETUPAPI.CM_Add_Empty_Log_Conf_Ex
|
||||
;CM_Add_IDA
|
||||
;CM_Add_IDW
|
||||
;CM_Add_ID_ExA
|
||||
;CM_Add_ID_ExW
|
||||
CM_Add_IDA@12=SETUPAPI.CM_Add_IDA
|
||||
CM_Add_IDW@12=SETUPAPI.CM_Add_IDW
|
||||
CM_Add_ID_ExA@16=SETUPAPI.CM_Add_ID_ExA
|
||||
CM_Add_ID_ExW@16=SETUPAPI.CM_Add_ID_ExW
|
||||
;CM_Add_Range
|
||||
;CM_Add_Res_Des
|
||||
;CM_Add_Res_Des_Ex
|
||||
|
|
|
@ -171,8 +171,48 @@ CONFIGRET WINAPI CM_Add_ID_ExA(
|
|||
CONFIGRET WINAPI CM_Add_ID_ExW(
|
||||
DEVINST dnDevInst, PWSTR pszID, ULONG ulFlags, HMACHINE hMachine)
|
||||
{
|
||||
FIXME("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine);
|
||||
return CR_CALL_NOT_IMPLEMENTED;
|
||||
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||
HSTRING_TABLE StringTable = NULL;
|
||||
LPWSTR lpDevInst;
|
||||
|
||||
TRACE("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine);
|
||||
|
||||
if (!IsUserAdmin())
|
||||
return CR_ACCESS_DENIED;
|
||||
|
||||
if (dnDevInst == 0)
|
||||
return CR_INVALID_DEVINST;
|
||||
|
||||
if (pszID == NULL)
|
||||
return CR_INVALID_POINTER;
|
||||
|
||||
if (ulFlags & ~CM_ADD_ID_BITS)
|
||||
return CR_INVALID_FLAG;
|
||||
|
||||
if (hMachine != NULL)
|
||||
{
|
||||
BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
|
||||
if (BindingHandle == NULL)
|
||||
return CR_FAILURE;
|
||||
|
||||
StringTable = ((PMACHINE_INFO)hMachine)->StringTable;
|
||||
if (StringTable == 0)
|
||||
return CR_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PnpGetLocalHandles(&BindingHandle, &StringTable))
|
||||
return CR_FAILURE;
|
||||
}
|
||||
|
||||
lpDevInst = StringTableStringFromId(StringTable, dnDevInst);
|
||||
if (lpDevInst == NULL)
|
||||
return CR_INVALID_DEVNODE;
|
||||
|
||||
return PNP_AddID(BindingHandle,
|
||||
lpDevInst,
|
||||
pszID,
|
||||
ulFlags);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -174,6 +174,12 @@ interface pnp
|
|||
[in, string] wchar_t *DeviceInstance,
|
||||
[in] DWORD Flags);
|
||||
|
||||
/* Function 34 */
|
||||
CONFIGRET PNP_AddID(handle_t BindingHandle,
|
||||
[in, string, unique] wchar_t *DeviceInstance,
|
||||
[in, string] wchar_t *DeviceId,
|
||||
[in] DWORD Flags);
|
||||
|
||||
/* Function 38 */
|
||||
CONFIGRET PNP_IsDockStationPresent(handle_t BindingHandle,
|
||||
[out]PBOOL Present);
|
||||
|
|
Loading…
Reference in a new issue