<html>
<head>
<style>
<!--
body { background-color:#ffffff }
.file { border:1px solid #eeeeee; margin-top:1em; margin-bottom:1em }
.pathname { font-family:monospace; float:right }
.fileheader { margin-bottom:.5em }
.diff { margin:0 }
.tasklist { padding:4px; border:1px dashed #000000; margin-top:1em }
.tasklist ul { margin-top:0; margin-bottom:0 }
tr.alt { background-color:#eeeeee }
#added { background-color:#ddffdd }
#addedchars { background-color:#99ff99; font-weight:bolder }
tr.alt #added { background-color:#ccf7cc }
#removed { background-color:#ffdddd }
#removedchars { background-color:#ff9999; font-weight:bolder }
tr.alt #removed { background-color:#f7cccc }
#info { color:#888888 }
#context { background-color:#eeeeee }
td {padding-left:.3em; padding-right:.3em }
tr.head { border-bottom-width:1px; border-bottom-style:solid }
tr.head td { padding:0; padding-top:.2em }
.task { background-color:#ffff00 }
.comment { padding:4px; border:1px dashed #000000; background-color:#ffffdd }
.error { color:red }
hr { border-width:0px; height:2px; background:black }
-->
</style>
</head>
<body>
<pre class="comment">Implement SetupDiGetDeviceInstanceIdW
Fix debug message</pre><pre class="diff" id="context">Modified: trunk/reactos/lib/devmgr/hwpage.c
Modified: trunk/reactos/lib/setupapi/devinst.c
Modified: trunk/reactos/lib/setupapi/stubs.c
</pre><hr /><div class="file">
<div class="fileheader"><big><b>Modified: trunk/reactos/lib/devmgr/hwpage.c</b></big></div>
<pre class="diff"><small id="info">--- trunk/reactos/lib/devmgr/hwpage.c        2005-11-26 04:29:40 UTC (rev 19612)
+++ trunk/reactos/lib/devmgr/hwpage.c        2005-11-26 08:13:04 UTC (rev 19613)
@@ -143,7 +143,7 @@
</small></pre><pre class="diff" id="context"> 0,
&DeviceInstanceIdLen))
{
</pre><pre class="diff" id="removed">- DPRINT1("SetupDiGetDeviceIn<span id="removedchars">terfaceDetail</span> unexpectedly returned TRUE!\n");
</pre><pre class="diff" id="added">+ DPRINT1("SetupDiGetDeviceIn<span id="addedchars">stanceId</span> unexpectedly returned TRUE!\n");
</pre><pre class="diff" id="context"> goto Cleanup;
}
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: trunk/reactos/lib/setupapi/devinst.c</b></big></div>
<pre class="diff"><small id="info">--- trunk/reactos/lib/setupapi/devinst.c        2005-11-26 04:29:40 UTC (rev 19612)
+++ trunk/reactos/lib/setupapi/devinst.c        2005-11-26 08:13:04 UTC (rev 19613)
@@ -3004,7 +3004,7 @@
</small></pre><pre class="diff" id="context"> {
BOOL ret = FALSE;
</pre><pre class="diff" id="removed">- TRACE("%<span id="removedchars">ld</span> %p %p\n", InstallFunction, DeviceInfoSet, DeviceInfoData);
</pre><pre class="diff" id="added">+ TRACE("%<span id="addedchars">u</span> %p %p\n", InstallFunction, DeviceInfoSet, DeviceInfoData);
</pre><pre class="diff" id="context">
if (!DeviceInfoSet)
SetLastError(ERROR_INVALID_PARAMETER);
@@ -3063,7 +3063,7 @@
</pre><pre class="diff" id="context"> DefaultHandler = SetupDiSelectBestCompatDrv;
break;
default:
</pre><pre class="diff" id="removed">- ERR("Install function %<span id="removedchars">l</span>u not supported\n", InstallFunction);
</pre><pre class="diff" id="added">+ ERR("Install function %u not supported\n", InstallFunction);
</pre><pre class="diff" id="context"> SetLastError(ERROR_NOT_SUPPORTED);
}
@@ -3463,6 +3463,71 @@
</pre><pre class="diff" id="context"> }
/***********************************************************************
</pre><pre class="diff" id="added">+ *                SetupDiGetDeviceInstanceIdA(SETUPAPI.@)
+ */
+BOOL WINAPI SetupDiGetDeviceInstanceIdA(
+ IN HDEVINFO DeviceInfoSet,
+ IN PSP_DEVINFO_DATA DeviceInfoData,
+ OUT PSTR DeviceInstanceId,
+ IN DWORD DeviceInstanceIdSize,
+ OUT PDWORD RequiredSize)
+{
+ FIXME ("Stub %p %p %p %d %p\n",
+ DeviceInfoSet, DeviceInfoData, DeviceInstanceId, DeviceInstanceIdSize, RequiredSize);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+/***********************************************************************
+ *                SetupDiGetDeviceInstanceIdW(SETUPAPI.@)
+ */
+BOOL WINAPI SetupDiGetDeviceInstanceIdW(
+ IN HDEVINFO DeviceInfoSet,
+ IN PSP_DEVINFO_DATA DeviceInfoData,
+ OUT PWSTR DeviceInstanceId,
+ IN DWORD DeviceInstanceIdSize,
+ OUT PDWORD RequiredSize)
+{
+ BOOL ret = FALSE;
+
+ TRACE("%p %p %p %lu %p\n", DeviceInfoSet, DeviceInfoData,
+ DeviceInstanceId, DeviceInstanceIdSize, RequiredSize);
+
+ if (!DeviceInfoSet)
+ SetLastError(ERROR_INVALID_HANDLE);
+ else if (((struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEV_INFO_SET_MAGIC)
+ SetLastError(ERROR_INVALID_HANDLE);
+ else if (!DeviceInfoData)
+ SetLastError(ERROR_INVALID_PARAMETER);
+ else if (DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA))
+ SetLastError(ERROR_INVALID_USER_BUFFER);
+ else if (!DeviceInstanceId && DeviceInstanceIdSize > 0)
+ SetLastError(ERROR_INVALID_PARAMETER);
+ else if (DeviceInstanceId && DeviceInstanceIdSize == 0)
+ SetLastError(ERROR_INVALID_PARAMETER);
+ else
+ {
+ struct DeviceInfoElement *DevInfo = (struct DeviceInfoElement *)DeviceInfoData->Reserved;
+ DWORD required;
+
+ required = (wcslen(DevInfo->DeviceName) + 1) * sizeof(WCHAR);
+ if (RequiredSize)
+ *RequiredSize = required;
+
+ if (required <= DeviceInstanceIdSize)
+ {
+ wcscpy(DeviceInstanceId, DevInfo->DeviceName);
+ ret = TRUE;
+ }
+ else
+ SetLastError(ERROR_INSUFFICIENT_BUFFER);
+ }
+
+ TRACE("Returning 0x%p\n", ret);
+ return ret;
+}
+
+/***********************************************************************
</pre><pre class="diff" id="context"> *                SetupDiCreateDevRegKeyA (SETUPAPI.@)
*/
HKEY WINAPI SetupDiCreateDevRegKeyA(
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: trunk/reactos/lib/setupapi/stubs.c</b></big></div>
<pre class="diff"><small id="info">--- trunk/reactos/lib/setupapi/stubs.c        2005-11-26 04:29:40 UTC (rev 19612)
+++ trunk/reactos/lib/setupapi/stubs.c        2005-11-26 08:13:04 UTC (rev 19613)
@@ -225,33 +225,8 @@
</small></pre><pre class="diff" id="context"> return TRUE;
}
</pre><pre class="diff" id="removed">-/***********************************************************************
- *                SetupDiGetDeviceInstanceIdA(SETUPAPI.@)
- */
-BOOL WINAPI SetupDiGetDeviceInstanceIdA(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
- PSTR DeviceInstanceId, DWORD DeviceInstanceIdSize,
- PDWORD RequiredSize)
-{
- FIXME ("Stub %p %p %p %d %p\n",
- DeviceInfoSet, DeviceInfoData, DeviceInstanceId, DeviceInstanceIdSize, RequiredSize);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
</pre><pre class="diff" id="context">
/***********************************************************************
</pre><pre class="diff" id="removed">- *                SetupDiGetDeviceInstanceIdW(SETUPAPI.@)
- */
-BOOL WINAPI SetupDiGetDeviceInstanceIdW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
- PWSTR DeviceInstanceId, DWORD DeviceInstanceIdSize,
- PDWORD RequiredSize)
-{
- FIXME ("Stub %p %p %p %d %p\n",
- DeviceInfoSet, DeviceInfoData, DeviceInstanceId, DeviceInstanceIdSize, RequiredSize);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-/***********************************************************************
</pre><pre class="diff" id="context"> *                SetupDiGetClassDevPropertySheetsA(SETUPAPI.@)
*/
BOOL WINAPI SetupDiGetClassDevPropertySheetsA(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
</pre>
</div>
</body>
</html>