mirror of
https://github.com/reactos/reactos.git
synced 2025-06-07 18:30:37 +00:00
Implement CM_Add_Empty_Log_Conf[_Ex] and add PNP_AddEmptyLogConf stub.
svn path=/trunk/; revision=22949
This commit is contained in:
parent
b9ed9b1450
commit
42c3759b94
7 changed files with 164 additions and 4 deletions
|
@ -1245,6 +1245,26 @@ PNP_HwProfFlags(handle_t BindingHandle,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Function 42 */
|
||||||
|
CONFIGRET
|
||||||
|
PNP_AddEmptyLogConf(handle_t BindingHandle,
|
||||||
|
wchar_t *DeviceInstance,
|
||||||
|
ULONG ulPriority,
|
||||||
|
ULONG *ulLogConfTag,
|
||||||
|
ULONG ulFlags)
|
||||||
|
{
|
||||||
|
CONFIGRET ret = CR_SUCCESS;
|
||||||
|
|
||||||
|
DPRINT1("PNP_AddEmptyLogConf() called\n");
|
||||||
|
|
||||||
|
*ulLogConfTag = 0; /* FIXME */
|
||||||
|
|
||||||
|
DPRINT1("PNP_AddEmptyLogConf() done (returns %lx)\n", ret);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Function 58 */
|
/* Function 58 */
|
||||||
CONFIGRET
|
CONFIGRET
|
||||||
PNP_RunDetection(handle_t BindingHandle,
|
PNP_RunDetection(handle_t BindingHandle,
|
||||||
|
|
|
@ -25,8 +25,8 @@ CMP_Report_LogOn@4=SETUPAPI.CMP_Report_LogOn
|
||||||
;CMP_UnregisterNotification
|
;CMP_UnregisterNotification
|
||||||
;CMP_WaitNoPendingInstallEvents
|
;CMP_WaitNoPendingInstallEvents
|
||||||
;CMP_WaitServices
|
;CMP_WaitServices
|
||||||
;CM_Add_Empty_Log_Conf@16=SETUPAPI.CM_Add_Empty_Log_Conf
|
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_Empty_Log_Conf_Ex@20=SETUPAPI.CM_Add_Empty_Log_Conf_Ex
|
||||||
CM_Add_IDA@12=SETUPAPI.CM_Add_IDA
|
CM_Add_IDA@12=SETUPAPI.CM_Add_IDA
|
||||||
CM_Add_IDW@12=SETUPAPI.CM_Add_IDW
|
CM_Add_IDW@12=SETUPAPI.CM_Add_IDW
|
||||||
CM_Add_ID_ExA@16=SETUPAPI.CM_Add_ID_ExA
|
CM_Add_ID_ExA@16=SETUPAPI.CM_Add_ID_ExA
|
||||||
|
|
|
@ -46,6 +46,17 @@ typedef struct _MACHINE_INFO
|
||||||
} MACHINE_INFO, *PMACHINE_INFO;
|
} MACHINE_INFO, *PMACHINE_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _LOG_CONF_INFO
|
||||||
|
{
|
||||||
|
ULONG ulMagic;
|
||||||
|
DEVINST dnDevInst;
|
||||||
|
ULONG ulFlags;
|
||||||
|
ULONG ulTag;
|
||||||
|
} LOG_CONF_INFO, *PLOG_CONF_INFO;
|
||||||
|
|
||||||
|
#define LOG_CONF_MAGIC 0x464E434C /* "LCNF" */
|
||||||
|
|
||||||
|
|
||||||
static BOOL GuidToString(LPGUID Guid, LPWSTR String)
|
static BOOL GuidToString(LPGUID Guid, LPWSTR String)
|
||||||
{
|
{
|
||||||
LPWSTR lpString;
|
LPWSTR lpString;
|
||||||
|
@ -122,6 +133,96 @@ CONFIGRET WINAPI CMP_Report_LogOn(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CM_Add_Empty_Log_Conf [SETUPAPI.@]
|
||||||
|
*/
|
||||||
|
CONFIGRET WINAPI CM_Add_Empty_Log_Conf(
|
||||||
|
PLOG_CONF plcLogConf, DEVINST dnDevInst, PRIORITY Priority,
|
||||||
|
ULONG ulFlags)
|
||||||
|
{
|
||||||
|
TRACE("%p %p %lu %lx\n", plcLogConf, dnDevInst, Priority, ulFlags);
|
||||||
|
return CM_Add_Empty_Log_Conf_Ex(plcLogConf, dnDevInst, Priority,
|
||||||
|
ulFlags, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CM_Add_Empty_Log_Conf_Ex [SETUPAPI.@]
|
||||||
|
*/
|
||||||
|
CONFIGRET WINAPI CM_Add_Empty_Log_Conf_Ex(
|
||||||
|
PLOG_CONF plcLogConf, DEVINST dnDevInst, PRIORITY Priority,
|
||||||
|
ULONG ulFlags, HMACHINE hMachine)
|
||||||
|
{
|
||||||
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
HSTRING_TABLE StringTable = NULL;
|
||||||
|
ULONG ulLogConfTag = 0;
|
||||||
|
LPWSTR lpDevInst;
|
||||||
|
PLOG_CONF_INFO pLogConfInfo;
|
||||||
|
CONFIGRET ret = CR_SUCCESS;
|
||||||
|
|
||||||
|
FIXME("%p %p %lu %lx %p\n",
|
||||||
|
plcLogConf, dnDevInst, Priority, ulFlags, hMachine);
|
||||||
|
|
||||||
|
if (!IsUserAdmin())
|
||||||
|
return CR_ACCESS_DENIED;
|
||||||
|
|
||||||
|
if (plcLogConf == NULL)
|
||||||
|
return CR_INVALID_POINTER;
|
||||||
|
|
||||||
|
if (dnDevInst == 0)
|
||||||
|
return CR_INVALID_DEVINST;
|
||||||
|
|
||||||
|
if (Priority > 0xFFFF)
|
||||||
|
return CR_INVALID_PRIORITY;
|
||||||
|
|
||||||
|
if (ulFlags & ~(LOG_CONF_BITS | PRIORITY_BIT))
|
||||||
|
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;
|
||||||
|
|
||||||
|
ret = PNP_AddEmptyLogConf(BindingHandle, lpDevInst, Priority, &ulLogConfTag, ulFlags);
|
||||||
|
if (ret == CR_SUCCESS)
|
||||||
|
{
|
||||||
|
pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO));
|
||||||
|
if (pLogConfInfo == NULL)
|
||||||
|
{
|
||||||
|
ret = CR_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pLogConfInfo->ulMagic = LOG_CONF_MAGIC;
|
||||||
|
pLogConfInfo->dnDevInst = dnDevInst;
|
||||||
|
pLogConfInfo->ulFlags = ulFlags;
|
||||||
|
pLogConfInfo->ulTag = ulLogConfTag;
|
||||||
|
|
||||||
|
*plcLogConf = (LOG_CONF)pLogConfInfo;
|
||||||
|
|
||||||
|
ret = CR_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CM_Add_IDA [SETUPAPI.@]
|
* CM_Add_IDA [SETUPAPI.@]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
@ stub CMP_UnregisterNotification
|
@ stub CMP_UnregisterNotification
|
||||||
@ stub CMP_WaitNoPendingInstallEvents
|
@ stub CMP_WaitNoPendingInstallEvents
|
||||||
@ stub CMP_WaitServicesAvailable
|
@ stub CMP_WaitServicesAvailable
|
||||||
@ stub CM_Add_Empty_Log_Conf
|
@ stdcall CM_Add_Empty_Log_Conf(ptr ptr long long)
|
||||||
@ stub CM_Add_Empty_Log_Conf_Ex
|
@ stdcall CM_Add_Empty_Log_Conf_Ex(ptr ptr long long ptr)
|
||||||
@ stdcall CM_Add_IDA(ptr str long)
|
@ stdcall CM_Add_IDA(ptr str long)
|
||||||
@ stdcall CM_Add_IDW(ptr wstr long)
|
@ stdcall CM_Add_IDW(ptr wstr long)
|
||||||
@ stdcall CM_Add_ID_ExA(ptr str long ptr)
|
@ stdcall CM_Add_ID_ExA(ptr str long ptr)
|
||||||
|
|
|
@ -619,6 +619,15 @@ CMP_Report_LogOn(
|
||||||
/* FIXME: Missing CMP_WaitServicesAvailable */
|
/* FIXME: Missing CMP_WaitServicesAvailable */
|
||||||
|
|
||||||
/* CM_Add_Empty_Log_Conf.ulFlags constants */
|
/* CM_Add_Empty_Log_Conf.ulFlags constants */
|
||||||
|
#define BASIC_LOG_CONF 0x00000000
|
||||||
|
#define FILTERED_LOG_CONF 0x00000001
|
||||||
|
#define ALLOC_LOG_CONF 0x00000002
|
||||||
|
#define BOOT_LOG_CONF 0x00000003
|
||||||
|
#define FORCED_LOG_CONF 0x00000004
|
||||||
|
#define OVERRIDE_LOG_CONF 0x00000005
|
||||||
|
#define NUM_LOG_CONF 0x00000006
|
||||||
|
#define LOG_CONF_BITS 0x00000007
|
||||||
|
|
||||||
#define PRIORITY_EQUAL_FIRST 0x00000008
|
#define PRIORITY_EQUAL_FIRST 0x00000008
|
||||||
#define PRIORITY_EQUAL_LAST 0x00000000
|
#define PRIORITY_EQUAL_LAST 0x00000000
|
||||||
#define PRIORITY_BIT 0x00000008
|
#define PRIORITY_BIT 0x00000008
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#define WORD unsigned short
|
#define WORD unsigned short
|
||||||
#define DWORD unsigned long
|
#define DWORD unsigned long
|
||||||
|
#define ULONG unsigned long
|
||||||
#define CONFIGRET unsigned long
|
#define CONFIGRET unsigned long
|
||||||
#define BOOL unsigned long
|
#define BOOL unsigned long
|
||||||
#define PBOOL unsigned long *
|
#define PBOOL unsigned long *
|
||||||
|
@ -197,6 +198,13 @@ interface pnp
|
||||||
[in, out] unsigned long *Value,
|
[in, out] unsigned long *Value,
|
||||||
[in] DWORD Flags);
|
[in] DWORD Flags);
|
||||||
|
|
||||||
|
/* Function 42 */
|
||||||
|
CONFIGRET PNP_AddEmptyLogConf(handle_t BindingHandle,
|
||||||
|
[in, string] wchar_t *DeviceInstance,
|
||||||
|
[in] ULONG ulPriority,
|
||||||
|
[out] ULONG *ulLogConfTag,
|
||||||
|
[in] ULONG ulFlags);
|
||||||
|
|
||||||
/* Function 58 */
|
/* Function 58 */
|
||||||
CONFIGRET PNP_RunDetection(handle_t BindingHandle,
|
CONFIGRET PNP_RunDetection(handle_t BindingHandle,
|
||||||
[in] unsigned long Flags);
|
[in] unsigned long Flags);
|
||||||
|
|
|
@ -34,6 +34,11 @@ typedef DEVINST *PDEVINST;
|
||||||
typedef DWORD DEVNODE;
|
typedef DWORD DEVNODE;
|
||||||
typedef DEVNODE *PDEVNODE;
|
typedef DEVNODE *PDEVNODE;
|
||||||
typedef ULONG REGDISPOSITION;
|
typedef ULONG REGDISPOSITION;
|
||||||
|
typedef DWORD_PTR LOG_CONF;
|
||||||
|
typedef LOG_CONF *PLOG_CONF;
|
||||||
|
typedef ULONG PRIORITY;
|
||||||
|
typedef PRIORITY *PPRIORITY;
|
||||||
|
|
||||||
|
|
||||||
typedef CHAR *DEVINSTID_A;
|
typedef CHAR *DEVINSTID_A;
|
||||||
typedef WCHAR *DEVINSTID_W;
|
typedef WCHAR *DEVINSTID_W;
|
||||||
|
@ -53,6 +58,7 @@ DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
|
||||||
#define CR_INVALID_DEVICE_ID 0x0000001E
|
#define CR_INVALID_DEVICE_ID 0x0000001E
|
||||||
#define CR_INVALID_DATA 0x0000001F
|
#define CR_INVALID_DATA 0x0000001F
|
||||||
#define CR_NO_SUCH_VALUE 0x00000025
|
#define CR_NO_SUCH_VALUE 0x00000025
|
||||||
|
#define CR_INVALID_PRIORITY 0x00000027
|
||||||
#define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
|
#define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
|
||||||
#define CR_INVALID_MACHINENAME 0x0000002F
|
#define CR_INVALID_MACHINENAME 0x0000002F
|
||||||
#define CR_ACCESS_DENIED 0x00000033
|
#define CR_ACCESS_DENIED 0x00000033
|
||||||
|
@ -189,12 +195,28 @@ DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID)
|
||||||
#define CM_SET_HW_PROF_FLAGS_UI_NOT_OK 0x00000001
|
#define CM_SET_HW_PROF_FLAGS_UI_NOT_OK 0x00000001
|
||||||
#define CM_SET_HW_PROF_FLAGS_BITS 0x00000001
|
#define CM_SET_HW_PROF_FLAGS_BITS 0x00000001
|
||||||
|
|
||||||
|
/* ulFlags for Log_Conf functions */
|
||||||
|
#define BASIC_LOG_CONF 0x00000000
|
||||||
|
#define FILTERED_LOG_CONF 0x00000001
|
||||||
|
#define ALLOC_LOG_CONF 0x00000002
|
||||||
|
#define BOOT_LOG_CONF 0x00000003
|
||||||
|
#define FORCED_LOG_CONF 0x00000004
|
||||||
|
#define OVERRIDE_LOG_CONF 0x00000005
|
||||||
|
#define NUM_LOG_CONF 0x00000006
|
||||||
|
#define LOG_CONF_BITS 0x00000007
|
||||||
|
|
||||||
|
#define PRIORITY_EQUAL_FIRST 0x00000008
|
||||||
|
#define PRIORITY_EQUAL_LAST 0x00000000
|
||||||
|
#define PRIORITY_BIT 0x00000008
|
||||||
|
|
||||||
#define CMP_MAGIC 0x01234567
|
#define CMP_MAGIC 0x01234567
|
||||||
|
|
||||||
|
|
||||||
CONFIGRET WINAPI CMP_Init_Detection( DWORD );
|
CONFIGRET WINAPI CMP_Init_Detection( DWORD );
|
||||||
CONFIGRET WINAPI CMP_Report_LogOn( DWORD, DWORD );
|
CONFIGRET WINAPI CMP_Report_LogOn( DWORD, DWORD );
|
||||||
|
|
||||||
|
CONFIGRET WINAPI CM_Add_Empty_Log_Conf( PLOG_CONF, DEVINST, PRIORITY, ULONG );
|
||||||
|
CONFIGRET WINAPI CM_Add_Empty_Log_Conf_Ex( PLOG_CONF, DEVINST, PRIORITY, ULONG, HMACHINE );
|
||||||
CONFIGRET WINAPI CM_Add_IDA( DEVINST, PSTR, ULONG );
|
CONFIGRET WINAPI CM_Add_IDA( DEVINST, PSTR, ULONG );
|
||||||
CONFIGRET WINAPI CM_Add_IDW( DEVINST, PWSTR, ULONG );
|
CONFIGRET WINAPI CM_Add_IDW( DEVINST, PWSTR, ULONG );
|
||||||
#define CM_Add_ID WINELIB_NAME_AW(CM_Add_ID)
|
#define CM_Add_ID WINELIB_NAME_AW(CM_Add_ID)
|
||||||
|
|
Loading…
Reference in a new issue