Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/desktop.c:
- if (NtQueryInformationToken( GetCurrentThreadEffectiveToken(), TokenUser, sid_data, len, &len ))
return 0;
- sid = ((TOKEN_USER *)sid_data)->User.Sid;
- len = sprintf( buffer, "\Registry\User\S-%u-%u", sid->Revision,
(unsigned)MAKELONG( MAKEWORD( sid->IdentifierAuthority.Value[5], sid->IdentifierAuthority.Value[4] ),
MAKEWORD( sid->IdentifierAuthority.Value[3], sid->IdentifierAuthority.Value[2] )));
- for (i = 0; i < sid->SubAuthorityCount; i++)
len += sprintf( buffer + len, "-%u", (unsigned)sid->SubAuthority[i] );
- ascii_to_unicode( bufferW, buffer, len + 1 );
- return reg_open_key( NULL, bufferW, len * sizeof(WCHAR) );
+}
+static HKEY reg_open_hkcu_key( const WCHAR *name, ULONG name_len )
There is already an open_hkcu_key() in x11drv_main.c