Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/native/corehost/comhost/comhost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,14 @@ namespace

RegKey regKey{ regKeyRaw };

// Set the default value for all COM host servers
const WCHAR defServerName[] = _X("CoreCLR COMHost Server");
// Set the default value, type name - this matches RegAsm behavior.
res = ::RegSetValueExW(
regKey.get(),
nullptr,
0,
REG_SZ,
reinterpret_cast<const BYTE*>(defServerName),
static_cast<DWORD>(sizeof(defServerName)));
reinterpret_cast<const BYTE*>(entry.type.c_str()),
static_cast<DWORD>(entry.type.size() + 1) * sizeof(entry.type[0]));
if (res != ERROR_SUCCESS)
return __HRESULT_FROM_WIN32(res);

Expand Down