118 WCHAR szKeyBuffer[128];
126 DPRINT(
"CreateInstanceKey()\n");
128 *pInstanceKey =
NULL;
130 wcscpy(szKeyBuffer,
L"SYSTEM\\CurrentControlSet\\Control\\Network\\");
131 wcscat(szKeyBuffer, pComponentInfo->pszClassGuid);
138 DPRINT1(
"UuidCreate() failed with RPC status 0x%lx\n", RpcStatus);
145 DPRINT1(
"UuidToStringW() failed with RPC status 0x%lx\n", RpcStatus);
149 wcscat(szKeyBuffer, UuidString);
154 DPRINT(
"szKeyBuffer %S\n", szKeyBuffer);
167 DPRINT1(
"RegCreateKeyExW() failed with error 0x%lx\n", rc);
175 (
LPBYTE)&pComponentInfo->dwCharacteristics,
179 DPRINT1(
"RegSetValueExW() failed with error 0x%lx\n", rc);
187 (
LPBYTE)pComponentInfo->pszComponentId,
188 (
wcslen(pComponentInfo->pszComponentId) + 1) *
sizeof(
WCHAR));
191 DPRINT1(
"RegSetValueExW() failed with error 0x%lx\n", rc);
199 (
LPBYTE)pComponentInfo->pszDescription,
200 (
wcslen(pComponentInfo->pszDescription) + 1) *
sizeof(
WCHAR));
203 DPRINT1(
"RegSetValueExW() failed with error 0x%lx\n", rc);
211 (
LPBYTE)pComponentInfo->pszInfPath,
212 (
wcslen(pComponentInfo->pszInfPath) + 1) *
sizeof(
WCHAR));
215 DPRINT1(
"RegSetValueExW() failed with error 0x%lx\n", rc);
223 (
LPBYTE)pComponentInfo->pszInfSection,
224 (
wcslen(pComponentInfo->pszInfSection) + 1) *
sizeof(
WCHAR));
227 DPRINT1(
"RegSetValueExW() failed with error 0x%lx\n", rc);
231 *pInstanceKey = hInstanceKey;
238 DPRINT(
"CreateInstanceKey() done %u\n",
ret);
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
#define REG_OPTION_NON_VOLATILE
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, RPC_WSTR *StringUuid)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
RPC_STATUS WINAPI UuidCreate(UUID *Uuid)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define KEY_CREATE_SUB_KEY
#define RPC_S_UUID_LOCAL_ONLY
#define RegCloseKey(hKey)
#define HKEY_LOCAL_MACHINE