Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update COM host to match RegAsm registration behavior #63292

Merged
merged 2 commits into from
Jan 3, 2022
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