2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Configuration of network devices
4 * FILE: dll/win32/netcfgx/netcfgx.c
5 * PURPOSE: Network devices installer
7 * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
14 #define NTOS_MODE_USER
15 #include <ndk/iofuncs.h>
16 #include <ndk/rtlfuncs.h>
21 HINSTANCE netcfgx_hInstance
;
22 const GUID CLSID_TcpipConfigNotifyObject
= {0xA907657F, 0x6FDF, 0x11D0, {0x8E, 0xFB, 0x00, 0xC0, 0x4F, 0xD9, 0x12, 0xB2}};
24 static INTERFACE_TABLE InterfaceTable
[] =
31 &CLSID_TcpipConfigNotifyObject
,
32 TcpipConfigNotify_Constructor
42 DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID fImpLoad
)
46 case DLL_PROCESS_ATTACH
:
47 netcfgx_hInstance
= hinstDLL
;
48 DisableThreadLibraryCalls(netcfgx_hInstance
);
66 DllRegisterServer(void)
70 WCHAR szName
[MAX_PATH
] = L
"CLSID\\";
72 if (FAILED(StringFromCLSID(&CLSID_CNetCfg
, &pStr
)))
73 return SELFREG_E_CLASS
;
75 wcscpy(&szName
[6], pStr
);
78 if (RegCreateKeyExW(HKEY_CLASSES_ROOT
, szName
, 0, NULL
, 0, KEY_WRITE
, NULL
, &hKey
, NULL
) != ERROR_SUCCESS
)
79 return SELFREG_E_CLASS
;
81 if (RegCreateKeyExW(hKey
, L
"InProcServer32", 0, NULL
, 0, KEY_WRITE
, NULL
, &hSubKey
, NULL
) == ERROR_SUCCESS
)
83 if (!GetModuleFileNameW(netcfgx_hInstance
, szName
, sizeof(szName
)/sizeof(WCHAR
)))
87 return SELFREG_E_CLASS
;
89 szName
[(sizeof(szName
)/sizeof(WCHAR
))-1] = L
'\0';
90 RegSetValueW(hSubKey
, NULL
, REG_SZ
, szName
, (wcslen(szName
)+1) * sizeof(WCHAR
));
91 RegSetValueExW(hSubKey
, L
"ThreadingModel", 0, REG_SZ
, (LPBYTE
)L
"Both", 10);
100 DllUnregisterServer(void)
103 // implement unregistering services
115 HRESULT hres
= E_OUTOFMEMORY
;
116 IClassFactory
* pcf
= NULL
;
123 for (i
= 0; InterfaceTable
[i
].riid
; i
++)
125 if (IsEqualIID(InterfaceTable
[i
].riid
, rclsid
))
127 pcf
= IClassFactory_fnConstructor(InterfaceTable
[i
].lpfnCI
, NULL
, NULL
);
134 return CLASS_E_CLASSNOTAVAILABLE
;
137 hres
= IClassFactory_QueryInterface(pcf
, riid
, ppv
);
138 IClassFactory_Release(pcf
);
144 /* Append a REG_SZ to an existing REG_MULTI_SZ string in the registry.
145 * If the value doesn't exist, create it.
146 * Returns ERROR_SUCCESS if success. Otherwise, returns an error code
150 AppendStringToMultiSZ(
153 IN PCWSTR ValueToAppend
)
157 DWORD dwRequired
, dwLength
;
161 rc
= RegQueryValueExW(hKey
,
167 if (rc
!= ERROR_FILE_NOT_FOUND
)
169 if (rc
!= ERROR_SUCCESS
)
171 if (dwRegType
!= REG_MULTI_SZ
)
173 rc
= ERROR_GEN_FAILURE
;
177 dwTmp
= dwLength
= dwRequired
+ wcslen(ValueToAppend
) * sizeof(WCHAR
) + sizeof(UNICODE_NULL
);
178 Buffer
= HeapAlloc(GetProcessHeap(), 0, dwLength
);
181 rc
= ERROR_NOT_ENOUGH_MEMORY
;
185 rc
= RegQueryValueExW(hKey
,
191 if (rc
!= ERROR_SUCCESS
)
196 dwRequired
= sizeof(WCHAR
);
197 dwLength
= wcslen(ValueToAppend
) * sizeof(WCHAR
) + 2 * sizeof(UNICODE_NULL
);
198 Buffer
= HeapAlloc(GetProcessHeap(), 0, dwLength
);
201 rc
= ERROR_NOT_ENOUGH_MEMORY
;
206 /* Append the value */
207 wcscpy(&Buffer
[dwRequired
/ sizeof(WCHAR
) - 1], ValueToAppend
);
208 /* Terminate the REG_MULTI_SZ string */
209 Buffer
[dwLength
/ sizeof(WCHAR
) - 1] = UNICODE_NULL
;
211 rc
= RegSetValueExW(hKey
,
219 HeapFree(GetProcessHeap(), 0, Buffer
);
227 IN HDEVINFO DeviceInfoSet
,
228 IN PSP_DEVINFO_DATA DeviceInfoData
,
230 DWORD Characteristics
,
233 LPWSTR InstanceId
= NULL
;
234 LPWSTR DeviceName
= NULL
;
235 LPWSTR ExportName
= NULL
;
238 HKEY hNetworkKey
= NULL
;
239 HKEY hLinkageKey
= NULL
;
240 HKEY hConnectionKey
= NULL
;
241 DWORD dwShowIcon
, dwLength
, dwValue
;
244 /* Get Instance ID */
245 if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet
, DeviceInfoData
, NULL
, 0, &dwLength
))
247 DPRINT("SetupDiGetDeviceInstanceIdW() returned TRUE. FALSE expected\n");
248 rc
= ERROR_GEN_FAILURE
;
252 InstanceId
= HeapAlloc(GetProcessHeap(), 0, dwLength
* sizeof(WCHAR
));
255 DPRINT("HeapAlloc() failed\n");
256 rc
= ERROR_NOT_ENOUGH_MEMORY
;
260 if (!SetupDiGetDeviceInstanceIdW(DeviceInfoSet
, DeviceInfoData
, InstanceId
, dwLength
, NULL
))
263 DPRINT("SetupDiGetDeviceInstanceIdW() failed with error 0x%lx\n", rc
);
267 /* Create device name */
268 DeviceName
= HeapAlloc(GetProcessHeap(), 0, (wcslen(L
"\\Device\\") + wcslen(UuidString
)) * sizeof(WCHAR
) + sizeof(UNICODE_NULL
));
271 DPRINT("HeapAlloc() failed\n");
272 rc
= ERROR_NOT_ENOUGH_MEMORY
;
275 wcscpy(DeviceName
, L
"\\Device\\");
276 wcscat(DeviceName
, UuidString
);
278 /* Create export name */
279 ExportName
= HeapAlloc(GetProcessHeap(), 0, (wcslen(L
"\\Device\\Tcpip_") + wcslen(UuidString
)) * sizeof(WCHAR
) + sizeof(UNICODE_NULL
));
282 DPRINT("HeapAlloc() failed\n");
283 rc
= ERROR_NOT_ENOUGH_MEMORY
;
286 wcscpy(ExportName
, L
"\\Device\\Tcpip_");
287 wcscat(ExportName
, UuidString
);
289 /* Write Tcpip parameters in new service Key */
290 rc
= RegCreateKeyExW(HKEY_LOCAL_MACHINE
, L
"SYSTEM\\CurrentControlSet\\Services", 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_CREATE_SUB_KEY
, NULL
, &hKey
, NULL
);
291 if (rc
!= ERROR_SUCCESS
)
293 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
297 rc
= RegCreateKeyExW(hKey
, UuidString
, 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_CREATE_SUB_KEY
, NULL
, &hNetworkKey
, NULL
);
298 if (rc
!= ERROR_SUCCESS
)
300 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
306 rc
= RegCreateKeyExW(hNetworkKey
, L
"Parameters\\Tcpip", 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_SET_VALUE
, NULL
, &hKey
, NULL
);
307 if (rc
!= ERROR_SUCCESS
)
309 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
312 RegCloseKey(hNetworkKey
);
315 rc
= RegSetValueExW(hKey
, L
"DefaultGateway", 0, REG_SZ
, (const BYTE
*)L
"0.0.0.0", (wcslen(L
"0.0.0.0") + 1) * sizeof(WCHAR
));
316 if (rc
!= ERROR_SUCCESS
)
318 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
322 rc
= RegSetValueExW(hKey
, L
"IPAddress", 0, REG_SZ
, (const BYTE
*)L
"0.0.0.0", (wcslen(L
"0.0.0.0") + 1) * sizeof(WCHAR
));
323 if (rc
!= ERROR_SUCCESS
)
325 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
329 rc
= RegSetValueExW(hKey
, L
"SubnetMask", 0, REG_SZ
, (const BYTE
*)L
"0.0.0.0", (wcslen(L
"0.0.0.0") + 1) * sizeof(WCHAR
));
330 if (rc
!= ERROR_SUCCESS
)
332 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
337 rc
= RegSetValueExW(hKey
, L
"EnableDHCP", 0, REG_DWORD
, (const BYTE
*)&dwValue
, sizeof(DWORD
));
338 if (rc
!= ERROR_SUCCESS
)
340 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
346 /* Write 'Linkage' key in hardware key */
347 #if _WIN32_WINNT >= 0x502
348 hKey
= SetupDiOpenDevRegKey(DeviceInfoSet
, DeviceInfoData
, DICS_FLAG_GLOBAL
, 0, DIREG_DRV
, KEY_READ
| KEY_WRITE
);
350 hKey
= SetupDiOpenDevRegKey(DeviceInfoSet
, DeviceInfoData
, DICS_FLAG_GLOBAL
, 0, DIREG_DRV
, KEY_ALL_ACCESS
);
352 if (hKey
== INVALID_HANDLE_VALUE
&& GetLastError() == ERROR_FILE_NOT_FOUND
)
353 hKey
= SetupDiCreateDevRegKeyW(DeviceInfoSet
, DeviceInfoData
, DICS_FLAG_GLOBAL
, 0, DIREG_DRV
, NULL
, NULL
);
354 if (hKey
== INVALID_HANDLE_VALUE
)
358 DPRINT1("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc
);
362 rc
= RegSetValueExW(hKey
, L
"NetCfgInstanceId", 0, REG_SZ
, (const BYTE
*)UuidString
, (wcslen(UuidString
) + 1) * sizeof(WCHAR
));
363 if (rc
!= ERROR_SUCCESS
)
365 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
369 rc
= RegSetValueExW(hKey
, L
"Characteristics", 0, REG_DWORD
, (const BYTE
*)&Characteristics
, sizeof(DWORD
));
370 if (rc
!= ERROR_SUCCESS
)
372 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
378 rc
= RegSetValueExW(hKey
, L
"BusType", 0, REG_SZ
, (const BYTE
*)BusType
, (wcslen(BusType
) + 1) * sizeof(WCHAR
));
379 if (rc
!= ERROR_SUCCESS
)
381 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
386 rc
= RegCreateKeyExW(hKey
, L
"Linkage", 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_SET_VALUE
, NULL
, &hLinkageKey
, NULL
);
387 if (rc
!= ERROR_SUCCESS
)
389 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
393 rc
= RegSetValueExW(hLinkageKey
, L
"Export", 0, REG_SZ
, (const BYTE
*)DeviceName
, (wcslen(DeviceName
) + 1) * sizeof(WCHAR
));
394 if (rc
!= ERROR_SUCCESS
)
396 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
400 rc
= RegSetValueExW(hLinkageKey
, L
"RootDevice", 0, REG_SZ
, (const BYTE
*)UuidString
, (wcslen(UuidString
) + 1) * sizeof(WCHAR
));
401 if (rc
!= ERROR_SUCCESS
)
403 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
407 rc
= RegSetValueExW(hLinkageKey
, L
"UpperBind", 0, REG_SZ
, (const BYTE
*)L
"Tcpip", (wcslen(L
"Tcpip") + 1) * sizeof(WCHAR
));
408 if (rc
!= ERROR_SUCCESS
)
410 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
416 /* Write connection information in network subkey */
417 rc
= RegCreateKeyExW(HKEY_LOCAL_MACHINE
, L
"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_CREATE_SUB_KEY
, NULL
, &hNetworkKey
, NULL
);
418 if (rc
!= ERROR_SUCCESS
)
420 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
424 rc
= RegCreateKeyExW(hNetworkKey
, UuidString
, 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_CREATE_SUB_KEY
, NULL
, &hKey
, NULL
);
425 if (rc
!= ERROR_SUCCESS
)
427 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
431 rc
= RegCreateKeyExW(hKey
, L
"Connection", 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_SET_VALUE
, NULL
, &hConnectionKey
, NULL
);
434 if (rc
!= ERROR_SUCCESS
)
436 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
440 if (!LoadStringW(netcfgx_hInstance
, IDS_NET_CONNECT
, szBuffer
, sizeof(szBuffer
)/sizeof(WCHAR
)))
442 wcscpy(szBuffer
, L
"Network Connection");
445 rc
= RegSetValueExW(hConnectionKey
, L
"Name", 0, REG_SZ
, (const BYTE
*)szBuffer
, (wcslen(szBuffer
) + 1) * sizeof(WCHAR
));
446 if (rc
!= ERROR_SUCCESS
)
448 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
452 rc
= RegSetValueExW(hConnectionKey
, L
"PnpInstanceId", 0, REG_SZ
, (const BYTE
*)InstanceId
, (wcslen(InstanceId
) + 1) * sizeof(WCHAR
));
453 if (rc
!= ERROR_SUCCESS
)
455 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
460 rc
= RegSetValueExW(hConnectionKey
, L
"ShowIcon", 0, REG_DWORD
, (const BYTE
*)&dwShowIcon
, sizeof(dwShowIcon
));
461 if (rc
!= ERROR_SUCCESS
)
463 DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc
);
467 /* Write linkage information in Tcpip service */
468 rc
= RegCreateKeyExW(HKEY_LOCAL_MACHINE
, L
"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage", 0, NULL
, REG_OPTION_NON_VOLATILE
, KEY_QUERY_VALUE
| KEY_SET_VALUE
, NULL
, &hKey
, NULL
);
469 if (rc
!= ERROR_SUCCESS
)
471 DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc
);
474 rc
= AppendStringToMultiSZ(hKey
, L
"Bind", DeviceName
);
475 if (rc
!= ERROR_SUCCESS
)
477 DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc
);
480 rc
= AppendStringToMultiSZ(hKey
, L
"Export", ExportName
);
481 if (rc
!= ERROR_SUCCESS
)
483 DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc
);
486 rc
= AppendStringToMultiSZ(hKey
, L
"Route", UuidString
);
487 if (rc
!= ERROR_SUCCESS
)
489 DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc
);
496 HeapFree(GetProcessHeap(), 0, InstanceId
);
497 HeapFree(GetProcessHeap(), 0, DeviceName
);
498 HeapFree(GetProcessHeap(), 0, ExportName
);
501 if (hNetworkKey
!= NULL
)
502 RegCloseKey(hNetworkKey
);
503 if (hLinkageKey
!= NULL
)
504 RegCloseKey(hLinkageKey
);
505 if (hConnectionKey
!= NULL
)
506 RegCloseKey(hConnectionKey
);
512 InstallNetClient(VOID
)
514 DPRINT1("Installation of network clients is not yet supported\n");
515 return ERROR_GEN_FAILURE
;
520 InstallNetService(VOID
)
522 DPRINT1("Installation of network services is not yet supported\n");
523 return ERROR_GEN_FAILURE
;
528 InstallNetTransport(VOID
)
530 DPRINT1("Installation of network protocols is not yet supported\n");
531 return ERROR_GEN_FAILURE
;
537 IN DI_FUNCTION InstallFunction
,
538 IN HDEVINFO DeviceInfoSet
,
539 IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
)
541 SP_DRVINFO_DATA_W DriverInfoData
;
542 SP_DRVINFO_DETAIL_DATA_W DriverInfoDetail
;
543 WCHAR SectionName
[LINE_LEN
];
544 HINF hInf
= INVALID_HANDLE_VALUE
;
545 INFCONTEXT InfContext
;
547 INT CharacteristicsInt
;
548 DWORD Characteristics
;
549 LPWSTR BusType
= NULL
;
550 RPC_STATUS RpcStatus
;
552 LPWSTR UuidRpcString
= NULL
;
553 LPWSTR UuidString
= NULL
;
557 if (InstallFunction
!= DIF_INSTALLDEVICE
)
558 return ERROR_DI_DO_DEFAULT
;
560 DPRINT("%lu %p %p\n", InstallFunction
, DeviceInfoSet
, DeviceInfoData
);
562 /* Get driver info details */
563 DriverInfoData
.cbSize
= sizeof(SP_DRVINFO_DATA_W
);
564 if (!SetupDiGetSelectedDriverW(DeviceInfoSet
, DeviceInfoData
, &DriverInfoData
))
567 DPRINT("SetupDiGetSelectedDriverW() failed with error 0x%lx\n", rc
);
571 DriverInfoDetail
.cbSize
= sizeof(SP_DRVINFO_DETAIL_DATA_W
);
572 if (!SetupDiGetDriverInfoDetailW(DeviceInfoSet
, DeviceInfoData
, &DriverInfoData
, &DriverInfoDetail
, sizeof(DriverInfoDetail
), NULL
)
573 && GetLastError() != ERROR_INSUFFICIENT_BUFFER
)
576 DPRINT("SetupDiGetDriverInfoDetailW() failed with error 0x%lx\n", rc
);
580 hInf
= SetupOpenInfFileW(DriverInfoDetail
.InfFileName
, NULL
, INF_STYLE_WIN4
, &ErrorLine
);
581 if (hInf
== INVALID_HANDLE_VALUE
)
584 DPRINT("SetupOpenInfFileW() failed with error 0x%lx\n", rc
);
588 if (!SetupDiGetActualSectionToInstallW(hInf
, DriverInfoDetail
.SectionName
, SectionName
, LINE_LEN
, NULL
, NULL
))
591 DPRINT("SetupDiGetActualSectionToInstallW() failed with error 0x%lx\n", rc
);
595 /* Get Characteristics and BusType (optional) from .inf file */
596 if (!SetupFindFirstLineW(hInf
, SectionName
, L
"Characteristics", &InfContext
))
599 DPRINT("Unable to find key %S in section %S of file %S (error 0x%lx)\n",
600 L
"Characteristics", SectionName
, DriverInfoDetail
.InfFileName
, rc
);
604 if (!SetupGetIntField(&InfContext
, 1, &CharacteristicsInt
))
607 DPRINT("SetupGetIntField() failed with error 0x%lx\n", rc
);
611 Characteristics
= (DWORD
)CharacteristicsInt
;
612 if (IsEqualIID(&DeviceInfoData
->ClassGuid
, &GUID_DEVCLASS_NET
))
614 if (SetupFindFirstLineW(hInf
, SectionName
, L
"BusType", &InfContext
))
616 if (!SetupGetStringFieldW(&InfContext
, 1, NULL
, 0, &dwLength
))
619 DPRINT("SetupGetStringFieldW() failed with error 0x%lx\n", rc
);
623 BusType
= HeapAlloc(GetProcessHeap(), 0, dwLength
* sizeof(WCHAR
));
626 DPRINT("HeapAlloc() failed\n");
627 rc
= ERROR_NOT_ENOUGH_MEMORY
;
631 if (!SetupGetStringFieldW(&InfContext
, 1, BusType
, dwLength
, NULL
))
634 DPRINT("SetupGetStringFieldW() failed with error 0x%lx\n", rc
);
640 /* Create a new UUID */
641 RpcStatus
= UuidCreate(&Uuid
);
642 if (RpcStatus
!= RPC_S_OK
&& RpcStatus
!= RPC_S_UUID_LOCAL_ONLY
)
644 DPRINT("UuidCreate() failed with RPC status 0x%lx\n", RpcStatus
);
645 rc
= ERROR_GEN_FAILURE
;
649 RpcStatus
= UuidToStringW(&Uuid
, &UuidRpcString
);
650 if (RpcStatus
!= RPC_S_OK
)
652 DPRINT("UuidToStringW() failed with RPC status 0x%lx\n", RpcStatus
);
653 rc
= ERROR_GEN_FAILURE
;
657 /* Add curly braces around Uuid */
658 UuidString
= HeapAlloc(GetProcessHeap(), 0, (2 + wcslen(UuidRpcString
)) * sizeof(WCHAR
) + sizeof(UNICODE_NULL
));
661 DPRINT("HeapAlloc() failed\n");
662 rc
= ERROR_NOT_ENOUGH_MEMORY
;
666 wcscpy(UuidString
, L
"{");
667 wcscat(UuidString
, UuidRpcString
);
668 wcscat(UuidString
, L
"}");
670 if (IsEqualIID(&DeviceInfoData
->ClassGuid
, &GUID_DEVCLASS_NET
))
671 rc
= InstallNetDevice(DeviceInfoSet
, DeviceInfoData
, UuidString
, Characteristics
, BusType
);
672 else if (IsEqualIID(&DeviceInfoData
->ClassGuid
, &GUID_DEVCLASS_NETCLIENT
))
673 rc
= InstallNetClient();
674 else if (IsEqualIID(&DeviceInfoData
->ClassGuid
, &GUID_DEVCLASS_NETSERVICE
))
675 rc
= InstallNetService();
676 else if (IsEqualIID(&DeviceInfoData
->ClassGuid
, &GUID_DEVCLASS_NETTRANS
))
677 rc
= InstallNetTransport();
680 DPRINT("Invalid class guid\n");
681 rc
= ERROR_GEN_FAILURE
;
685 if (hInf
!= INVALID_HANDLE_VALUE
)
686 SetupCloseInfFile(hInf
);
687 if (UuidRpcString
!= NULL
)
688 RpcStringFreeW(&UuidRpcString
);
689 HeapFree(GetProcessHeap(), 0, BusType
);
690 HeapFree(GetProcessHeap(), 0, UuidString
);
692 if (rc
== ERROR_SUCCESS
)
693 rc
= ERROR_DI_DO_DEFAULT
;
694 DPRINT("Returning 0x%lx\n", rc
);