Author: ekohl
Date: Sat Feb 19 18:28:13 2011
New Revision: 50820
URL:
http://svn.reactos.org/svn/reactos?rev=50820&view=rev
Log:
[SETUPAPI]
- Implement CM_Get_Device_Interface_AliasA, CM_Get_Device_Interface_AliasW and
CM_Get_Device_Interface_Alias_ExW.
- Add a stub for CM_Get_Device_Interface_Alias_ExA.
- Implement the obsolete functions CM_Query_Remove_SubTree[_Ex] and
CM_Remove_SubTree[_Ex].
Modified:
trunk/reactos/dll/win32/setupapi/cfgmgr.c
trunk/reactos/dll/win32/setupapi/setupapi.spec
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Sat Feb 19 18:28:13 2011
@@ -2285,6 +2285,109 @@
/***********************************************************************
+ * CM_Get_Device_Interface_AliasA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_Device_Interface_AliasA(
+ LPCSTR pszDeviceInterface, LPGUID AliasInterfaceGuid,
+ LPSTR pszAliasDeviceInterface, PULONG pulLength, ULONG ulFlags)
+{
+ TRACE("%p %p %p %p %lu\n", pszDeviceInterface, AliasInterfaceGuid,
+ pszAliasDeviceInterface, pulLength, ulFlags);
+
+ return CM_Get_Device_Interface_Alias_ExA(pszDeviceInterface,
+ AliasInterfaceGuid, pszAliasDeviceInterface, pulLength,
+ ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Get_Device_Interface_AliasW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_Device_Interface_AliasW(
+ LPCWSTR pszDeviceInterface, LPGUID AliasInterfaceGuid,
+ LPWSTR pszAliasDeviceInterface, PULONG pulLength, ULONG ulFlags)
+{
+ TRACE("%p %p %p %p %lu\n", pszDeviceInterface, AliasInterfaceGuid,
+ pszAliasDeviceInterface, pulLength, ulFlags);
+
+ return CM_Get_Device_Interface_Alias_ExW(pszDeviceInterface,
+ AliasInterfaceGuid, pszAliasDeviceInterface, pulLength,
+ ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Get_Device_Interface_Alias_ExA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_Device_Interface_Alias_ExA(
+ LPCSTR pszDeviceInterface, LPGUID AliasInterfaceGuid, LPSTR pszAliasDeviceInterface,
+ PULONG pulLength, ULONG ulFlags, HMACHINE hMachine)
+{
+ FIXME("%p %p %p %p %lu %lx\n", pszDeviceInterface, AliasInterfaceGuid,
+ pszAliasDeviceInterface, pulLength, ulFlags, hMachine);
+
+ return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/***********************************************************************
+ * CM_Get_Device_Interface_Alias_ExW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_Device_Interface_Alias_ExW(
+ LPCWSTR pszDeviceInterface, LPGUID AliasInterfaceGuid, LPWSTR
pszAliasDeviceInterface,
+ PULONG pulLength, ULONG ulFlags, HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+ ULONG ulTransferLength;
+ CONFIGRET ret = CR_SUCCESS;
+
+ TRACE("%p %p %p %p %lu %lx\n", pszDeviceInterface, AliasInterfaceGuid,
+ pszAliasDeviceInterface, pulLength, ulFlags, hMachine);
+
+ if (pszDeviceInterface == NULL ||
+ AliasInterfaceGuid == NULL ||
+ pszAliasDeviceInterface == NULL ||
+ pulLength == NULL)
+ return CR_INVALID_POINTER;
+
+ if (ulFlags != 0)
+ return CR_INVALID_FLAG;
+
+ if (hMachine != NULL)
+ {
+ BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
+ if (BindingHandle == NULL)
+ return CR_FAILURE;
+ }
+ else
+ {
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return CR_FAILURE;
+ }
+
+ ulTransferLength = *pulLength;
+
+ RpcTryExcept
+ {
+ ret = PNP_GetInterfaceDeviceAlias(BindingHandle,
+ (LPWSTR)pszDeviceInterface,
+ AliasInterfaceGuid,
+ pszAliasDeviceInterface,
+ pulLength,
+ &ulTransferLength,
+ 0);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ret = RpcStatusToCmStatus(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return ret;
+}
+
+
+/***********************************************************************
* CM_Get_First_Log_Conf [SETUPAPI.@]
*/
CONFIGRET WINAPI CM_Get_First_Log_Conf(
@@ -3535,6 +3638,32 @@
/***********************************************************************
+ * CM_Query_Remove_SubTree [SETUPAPI.@]
+ *
+ * This function is obsolete in Windows XP and above.
+ */
+CONFIGRET WINAPI CM_Query_Remove_SubTree(
+ DEVINST dnAncestor, ULONG ulFlags)
+{
+ TRACE("%lx %lx\n", dnAncestor, ulFlags);
+ return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/***********************************************************************
+ * CM_Query_Remove_SubTree_Ex [SETUPAPI.@]
+ *
+ * This function is obsolete in Windows XP and above.
+ */
+CONFIGRET WINAPI CM_Query_Remove_SubTree_Ex(
+ DEVINST dnAncestor, ULONG ulFlags, HMACHINE hMachine)
+{
+ TRACE("%lx %lx %lx\n", dnAncestor, ulFlags, hMachine);
+ return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/***********************************************************************
* CM_Reenumerate_DevNode [SETUPAPI.@]
*/
CONFIGRET WINAPI CM_Reenumerate_DevNode(
@@ -3600,6 +3729,32 @@
RpcEndExcept;
return ret;
+}
+
+
+/***********************************************************************
+ * CM_Remove_SubTree [SETUPAPI.@]
+ *
+ * This function is obsolete in Windows XP and above.
+ */
+CONFIGRET WINAPI CM_Remove_SubTree(
+ DEVINST dnAncestor, ULONG ulFlags)
+{
+ TRACE("%lx %lx\n", dnAncestor, ulFlags);
+ return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/***********************************************************************
+ * CM_Remove_SubTree_Ex [SETUPAPI.@]
+ *
+ * This function is obsolete in Windows XP and above.
+ */
+CONFIGRET WINAPI CM_Remove_SubTree_Ex(
+ DEVINST dnAncestor, ULONG ulFlags, HMACHINE hMachine)
+{
+ TRACE("%lx %lx %lx\n", dnAncestor, ulFlags, hMachine);
+ return CR_CALL_NOT_IMPLEMENTED;
}
Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] Sat Feb 19 18:28:13 2011
@@ -90,10 +90,10 @@
@ stdcall CM_Get_Device_ID_List_Size_ExW(ptr wstr long long)
@ stdcall CM_Get_Device_ID_Size(ptr long long)
@ stdcall CM_Get_Device_ID_Size_Ex(ptr long long long)
-@ stub CM_Get_Device_Interface_AliasA
-@ stub CM_Get_Device_Interface_AliasW
-@ stub CM_Get_Device_Interface_Alias_ExA
-@ stub CM_Get_Device_Interface_Alias_ExW
+@ stdcall CM_Get_Device_Interface_AliasA(str ptr str ptr long)
+@ stdcall CM_Get_Device_Interface_AliasW(wstr ptr wstr ptr long)
+@ stdcall CM_Get_Device_Interface_Alias_ExA(str ptr str ptr long long)
+@ stdcall CM_Get_Device_Interface_Alias_ExW(wstr ptr wstr ptr long long)
@ stub CM_Get_Device_Interface_ListA
@ stub CM_Get_Device_Interface_ListW
@ stub CM_Get_Device_Interface_List_ExA
@@ -163,8 +163,8 @@
@ stub CM_Query_Arbitrator_Free_Data_Ex
@ stub CM_Query_Arbitrator_Free_Size
@ stub CM_Query_Arbitrator_Free_Size_Ex
-@ stub CM_Query_Remove_SubTree
-@ stub CM_Query_Remove_SubTree_Ex
+@ stdcall CM_Query_Remove_SubTree(long long)
+@ stdcall CM_Query_Remove_SubTree_Ex(long long long)
@ stub CM_Query_Resource_Conflict_List
@ stdcall CM_Reenumerate_DevNode(long long)
@ stdcall CM_Reenumerate_DevNode_Ex(long long long)
@@ -174,8 +174,8 @@
@ stub CM_Register_Device_InterfaceW
@ stub CM_Register_Device_Interface_ExA
@ stub CM_Register_Device_Interface_ExW
-@ stub CM_Remove_SubTree
-@ stub CM_Remove_SubTree_Ex
+@ stdcall CM_Remove_SubTree(long long)
+@ stdcall CM_Remove_SubTree_Ex(long long long)
@ stub CM_Request_Device_EjectA
@ stub CM_Request_Device_EjectW
@ stub CM_Request_Device_Eject_ExA