mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Merge commit 'f81b84d64d895cc87ecb7e3b4d9b9b2ce73bef4b' into feature/update-dependencies
This commit is contained in:
@@ -288,15 +288,16 @@ namespace openvpn {
|
||||
continue;
|
||||
|
||||
wchar_t wbuf[256] = L"";
|
||||
DWORD cbwbuf = sizeof(wbuf);
|
||||
status = ::RegQueryValueExW(connection_key(),
|
||||
L"Name",
|
||||
nullptr,
|
||||
&data_type,
|
||||
(LPBYTE)wbuf,
|
||||
&len);
|
||||
&cbwbuf);
|
||||
if (status != ERROR_SUCCESS || data_type != REG_SZ)
|
||||
continue;
|
||||
wbuf[(sizeof(wbuf) / sizeof(wchar_t)) - 1] = L'\0';
|
||||
wbuf[(cbwbuf / sizeof(wchar_t)) - 1] = L'\0';
|
||||
|
||||
// iterate through self and try to patch the name
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user