Added magic comments to all Wine-specific registry accesses to make

them easier to grep.
oldstable
Alexandre Julliard 2005-06-13 18:56:00 +00:00
parent 6e92d382a3
commit 2e4bca9db5
44 changed files with 79 additions and 11 deletions

View File

@ -82,6 +82,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
}
/* @@ Wine registry key: HKLM\Software\Wine\Direct3D */
if ( !RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Direct3D", &hkey) )
{
if ( !RegQueryValueExA( hkey, "VertexShaderMode", 0, NULL, buffer, &size) )

View File

@ -275,12 +275,14 @@ static HRESULT setup_dinput_options(JoystickImpl * device)
buffer[MAX_PATH]='\0';
/* @@ Wine registry key: HKLM\Software\Wine\dinput */
if (RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\dinput", &hkey)) hkey = 0;
len = GetModuleFileNameA( 0, buffer, MAX_PATH );
if (len && len < MAX_PATH) {
HKEY tmpkey;
/* @@ Wine registry key: HKLM\Software\Wine\AppDefaults\app.exe\dinput */
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\AppDefaults", &tmpkey )) {
char appname[MAX_PATH+16];
char *p = strrchr( buffer, '\\' );

View File

@ -132,6 +132,7 @@ void setup_dsound_options(void)
buffer[MAX_PATH]='\0';
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\dsound */
if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\dsound", 0, NULL,
REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL ))
{
@ -144,6 +145,7 @@ void setup_dsound_options(void)
{
HKEY tmpkey;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\AppDefaults\app.exe\dsound */
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\AppDefaults", &tmpkey ))
{
char appname[MAX_PATH+16];

View File

@ -222,6 +222,7 @@ static struct graphics_driver *load_display_driver(void)
}
strcpy( buffer, "x11,tty" ); /* default value */
/* @@ Wine registry key: HKLM\Software\Wine\Drivers */
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Drivers", &hkey ))
{
DWORD type, count = sizeof(buffer);

View File

@ -756,6 +756,7 @@ static void LoadReplaceList(void)
struct list *family_elem_ptr, *face_elem_ptr;
WCHAR old_nameW[200];
/* @@ Wine registry key: HKLM\Software\Wine\Wine\FontReplacements */
if(RegOpenKeyA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\FontReplacements",
&hkey) == ERROR_SUCCESS) {
@ -955,6 +956,7 @@ static void update_reg_entries(void)
ERR("Can't create Windows font reg key\n");
goto end;
}
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Fonts\ExternalFonts */
if(RegCreateKeyExW(HKEY_LOCAL_MACHINE, external_fonts_reg_key,
0, NULL, 0, KEY_ALL_ACCESS, NULL, &externalkey, NULL) != ERROR_SUCCESS) {
ERR("Can't create external font reg key\n");
@ -1220,6 +1222,7 @@ BOOL WineEngInit(void)
load_fontconfig_fonts();
/* then look in any directories that we've specified in the config file */
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\FontDirs */
if(RegOpenKeyA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\Config\\FontDirs",
&hkey) == ERROR_SUCCESS) {

View File

@ -625,6 +625,7 @@ BOOL GDI_Init(void)
const struct DefaultFontInfo* deffonts;
int i;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Tweak.Fonts */
if (RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Tweak.Fonts", &hkey))
hkey = 0;

View File

@ -463,6 +463,7 @@ static int CreateSpoolFile(LPCSTR pszOutput)
psCmd[0] = 0;
if (!strncmp("LPR:",pszOutput,4))
{
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\spooler */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\spooler", &hkey))
{
DWORD type, count = sizeof(psCmd);
@ -474,6 +475,7 @@ static int CreateSpoolFile(LPCSTR pszOutput)
}
else
{
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\spooler */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\spooler", &hkey))
{
DWORD type, count = sizeof(psCmd);

View File

@ -619,6 +619,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
IP_ADDRESS_STRING primaryWINS, secondaryWINS;
memset(pAdapterInfo, 0, size);
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\Config\\Network", 0, KEY_READ,
&hKey) == ERROR_SUCCESS) {

View File

@ -212,6 +212,7 @@ static BOOL get_use_dns_option(void)
_init_attr( &attr, &nameW );
RtlInitUnicodeString( &nameW, NetworkW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
RtlInitUnicodeString( &nameW, UseDNSW );

View File

@ -88,6 +88,7 @@ static int create_drives( int devices_only )
{
RtlInitUnicodeString( &nameW, driveW );
nameW.Buffer[(nameW.Length / sizeof(WCHAR)) - 1] = 'A' + i;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Drive A */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS) continue;
RtlInitUnicodeString( &nameW, PathW );
@ -134,6 +135,7 @@ static int create_drives( int devices_only )
{
RtlInitUnicodeString( &nameW, driveW );
nameW.Buffer[(nameW.Length / sizeof(WCHAR)) - 1] = 'A' + i;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Drive A */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS) continue;
RtlInitUnicodeString( &nameW, DeviceW );
@ -202,6 +204,7 @@ static void create_dos_devices(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, serialportsW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\SerialPorts */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
RtlInitUnicodeString( &nameW, com );
@ -226,6 +229,7 @@ static void create_dos_devices(void)
NtClose( hkey );
}
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\ParallelPorts */
RtlInitUnicodeString( &nameW, parallelportsW );
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
@ -313,6 +317,7 @@ static void convert_drive_types(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, drive_types_keyW );
/* @@ Wine registry key: HKLM\Software\Wine\Drives */
if (NtCreateKey( &hkey_new, KEY_ALL_ACCESS, &attr, 0, NULL, 0, &disp )) return;
if (disp != REG_CREATED_NEW_KEY)
{
@ -324,6 +329,7 @@ static void convert_drive_types(void)
{
RtlInitUnicodeString( &nameW, driveW );
nameW.Buffer[(nameW.Length / sizeof(WCHAR)) - 1] = 'A' + i;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Drive A */
if (NtOpenKey( &hkey_old, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS) continue;
RtlInitUnicodeString( &nameW, TypeW );
if (!NtQueryValueKey( hkey_old, &nameW, KeyValuePartialInformation, tmp, sizeof(tmp), &dummy ))
@ -378,6 +384,7 @@ static void convert_environment( HKEY hkey_current_user )
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, wineW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Wine */
if (NtOpenKey( &hkey_old, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS) return;
attr.RootDirectory = hkey_current_user;

View File

@ -131,6 +131,7 @@ void RELAY16_InitDebugLists(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &name, configW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Debug */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) return;
str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)buffer)->Data;

View File

@ -120,6 +120,7 @@ WORD get_dos_version(void)
TRACE( "getting version from %s\n", debugstr_w(appversion) );
RtlInitUnicodeString( &nameW, appversion );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\AppDefaults\app.exe\Version */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
ret = parse_dos_version( hkey );
@ -131,6 +132,7 @@ WORD get_dos_version(void)
{
TRACE( "getting default version\n" );
RtlInitUnicodeString( &nameW, versionW + 1 );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Version */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
ret = parse_dos_version( hkey );

View File

@ -185,6 +185,7 @@ static UINT get_registry_drive_type( const WCHAR *root )
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, drive_types_keyW );
/* @@ Wine registry key: HKLM\Software\Wine\Drives */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS) return DRIVE_UNKNOWN;
if (root) driveW[0] = root[0];

View File

@ -99,6 +99,7 @@ DWORD WINAPI WNetCachePassword(
pbPassword, debugstr_a(pbPassword), cbPassword,
nType, x );
/* @@ Wine registry key: HKCU\Software\Wine\Wine\Mpr */
r = RegCreateKeyA( HKEY_CURRENT_USER, mpr_key, &hkey );
if( r )
return WN_ACCESS_DENIED;
@ -137,6 +138,7 @@ UINT WINAPI WNetRemoveCachedPassword(
WARN( "(%p(%s), %d, %d): totally insecure\n",
pbResource, debugstr_a(pbResource), cbResource, nType );
/* @@ Wine registry key: HKCU\Software\Wine\Wine\Mpr */
r = RegCreateKeyA( HKEY_CURRENT_USER, mpr_key, &hkey );
if( r )
return WN_ACCESS_DENIED;
@ -191,6 +193,7 @@ DWORD WINAPI WNetGetCachedPassword(
memset( pbPassword, 0, *pcbPassword);
/* @@ Wine registry key: HKCU\Software\Wine\Wine\Mpr */
r = RegCreateKeyA( HKEY_CURRENT_USER, mpr_key, &hkey );
if( r )
return WN_ACCESS_DENIED;
@ -249,6 +252,7 @@ UINT WINAPI WNetEnumCachedPasswords(
debugstr_an(pbPrefix,cbPrefix), cbPrefix,
nType, enumPasswordProc, param );
/* @@ Wine registry key: HKCU\Software\Wine\Wine\Mpr */
r = RegCreateKeyA( HKEY_CURRENT_USER, mpr_key, &hkey );
if( r )
return WN_ACCESS_DENIED;

View File

@ -1517,6 +1517,7 @@ void NetBTInit(void)
* different than MS', we can't do per-adapter WINS configuration in the
* same place. Just do a global WINS configuration instead.
*/
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, Config_NetworkW, 0, KEY_READ, &hKey)
== ERROR_SUCCESS)
{

View File

@ -518,6 +518,7 @@ static void init_options(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, WineW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Wine */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
RtlInitUnicodeString( &nameW, ShowDotFilesW );

View File

@ -414,6 +414,7 @@ static HKEY open_app_key( const WCHAR *app_name, const WCHAR *module )
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, str );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\AppDefaults\app.exe\DllOverrides */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) hkey = 0;
RtlFreeHeap( GetProcessHeap(), 0, str );
return hkey;
@ -549,6 +550,7 @@ void MODULE_GetLoadOrderW( enum loadorder_type loadorder[], const WCHAR *app_nam
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, DllOverridesW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\DllOverrides */
if (NtOpenKey( &std_key, KEY_ALL_ACCESS, &attr )) std_key = 0;
}

View File

@ -139,6 +139,7 @@ void RELAY_InitDebugLists(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &name, configW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Debug */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) return;
str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)buffer)->Data;

View File

@ -283,6 +283,7 @@ void VERSION_Init( const WCHAR *appname )
TRACE( "getting version from %s\n", debugstr_w(appversion) );
RtlInitUnicodeString( &nameW, appversion );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\AppDefaults\app.exe\Version */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
got_win_ver = parse_win_version( hkey );
@ -293,6 +294,7 @@ void VERSION_Init( const WCHAR *appname )
TRACE( "getting default version\n" );
RtlInitUnicodeString( &nameW, versionW + 1 );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Version */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
parse_win_version( hkey );

View File

@ -884,6 +884,8 @@ static void destroy_key_container(OBJECTHDR *pObjectHdr)
hRootKey = HKEY_CURRENT_USER;
}
/* @@ Wine registry key: HKLM\Software\Wine\Crypto\RSA */
/* @@ Wine registry key: HKCU\Software\Wine\Crypto\RSA */
if (RegCreateKeyExA(hRootKey, szRSABase, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS)
{
@ -1013,6 +1015,8 @@ static HCRYPTPROV new_key_container(PCHAR pszContainerName, DWORD dwFlags, PVTab
hRootKey = HKEY_CURRENT_USER;
}
/* @@ Wine registry key: HKLM\Software\Wine\Crypto\RSA */
/* @@ Wine registry key: HKCU\Software\Wine\Crypto\RSA */
RegCreateKeyA(hRootKey, szRSABase, &hKey);
RegCloseKey(hKey);
}
@ -1053,6 +1057,8 @@ static HCRYPTPROV read_key_container(PCHAR pszContainerName, DWORD dwFlags, PVTa
hRootKey = HKEY_CURRENT_USER;
}
/* @@ Wine registry key: HKLM\Software\Wine\Crypto\RSA */
/* @@ Wine registry key: HKCU\Software\Wine\Crypto\RSA */
if (RegOpenKeyExA(hRootKey, szRSABase, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
{
SetLastError(NTE_BAD_KEYSET);

View File

@ -318,6 +318,7 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
/* find the name of the thing to download */
szUrl[0] = 0;
/* @@ Wine registry key: HKLM\Software\Wine\shdocw */
r = RegOpenKeyW( HKEY_LOCAL_MACHINE, szMozDlPath, &hkey );
if( r == ERROR_SUCCESS )
{

View File

@ -2584,6 +2584,7 @@ int SPY_Init(void)
if (!TRACE_ON(message)) return TRUE;
indent_tls_index = TlsAlloc();
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Debug */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Debug", &hkey))
{
DWORD type, count = sizeof(buffer);

View File

@ -476,6 +476,7 @@ static HKEY get_volatile_regkey(void)
if (!volatile_key)
{
/* @@ Wine registry key: HKCU\Wine */
if (RegCreateKeyExW( HKEY_CURRENT_USER, WINE_CURRENT_USER_REGKEY,
0, 0, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, 0,
&volatile_key, 0 ) != ERROR_SUCCESS)

View File

@ -67,6 +67,7 @@ static BOOL load_driver(void)
HKEY hkey;
strcpy( buffer, "x11,tty" ); /* default value */
/* @@ Wine registry key: HKLM\Software\Wine\Drivers */
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Drivers", &hkey ))
{
DWORD type, count = sizeof(buffer);

View File

@ -64,6 +64,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" );
}
/* @@ Wine registry key: HKLM\Software\Wine\Direct3D */
if ( !RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Direct3D", &hkey) )
{
if ( !RegQueryValueExA( hkey, "VertexShaderMode", 0, NULL, buffer, &size) )

View File

@ -465,6 +465,7 @@ DOSCONF *DOSCONF_GetConfig(void)
/* default value */
filename[0] = '*'; filename[1] = '\0';
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\wine */
if (!RegOpenKeyA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\Config\\wine",
&hkey))

View File

@ -280,6 +280,7 @@ static void IO_port_init(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, portsW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Ports */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
RtlInitUnicodeString( &nameW, readW );

View File

@ -100,6 +100,7 @@ char IO_pp_init(void)
attr.SecurityQualityOfService = NULL;
RtlInitUnicodeString( &nameW, configW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\ppdev */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) return 1;
for (;;)

View File

@ -597,6 +597,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
/* Look for a ppd file for this printer in the config file.
* First look under that printer's name, and then under 'generic'
*/
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\ppd */
if((res != ERROR_SUCCESS) && !RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\ppd", &hkey))
{
const char* value_name;

View File

@ -590,6 +590,7 @@ BOOL PSDRV_GetTrueTypeMetrics(void)
HKEY hkey;
DWORD type, name_len, value_len;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\TrueType Font Directories */
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\Config\\TrueType Font Directories",
0, KEY_READ, &hkey) != ERROR_SUCCESS)

View File

@ -1177,6 +1177,7 @@ BOOL PSDRV_GetType1Metrics(void)
HKEY hkey;
DWORD type, name_len, value_len;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\afmdirs */
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\Config\\afmdirs",
0, KEY_READ, &hkey) != ERROR_SUCCESS)

View File

@ -733,6 +733,7 @@ BOOL MMDRV_Init(void)
strcpy(mapper_buffer, WINE_DEFAULT_WINMM_MAPPER);
strcpy(midi_buffer, WINE_DEFAULT_WINMM_MIDI);
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\WinMM */
if (! RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\WinMM", &hKey)) {
size = sizeof(driver_buffer);
if (RegQueryValueExA(hKey, "Drivers", 0, &type, (LPVOID)driver_buffer, &size))

View File

@ -725,6 +725,7 @@ static char *ALSA_GetDeviceFromReg(const char *value)
char *result = NULL;
DWORD resultSize;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\alsa */
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\ALSA", 0, KEY_QUERY_VALUE, &key);
if (res != ERROR_SUCCESS) goto end;

View File

@ -508,6 +508,7 @@ void WINSPOOL_LoadSystemPrinters(void)
if(!done) { /* If we have any CUPS based printers, skip looking for printcap printers */
/* Check for [ppd] section in config file before parsing /etc/printcap */
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\ppd */
if (RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\ppd",
&hkey) == ERROR_SUCCESS) {
RegCloseKey(hkey);

View File

@ -549,6 +549,7 @@ static int perfect_graphics(void)
char buffer[20];
/* default value */
perfect = 0;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\x11drv */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\x11drv", &hkey))
{
DWORD type, count = sizeof(buffer);

View File

@ -65,6 +65,7 @@ static DWORD get_dpi( void )
DWORD dpi = 96;
HKEY hkey;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(RegOpenKeyW(HKEY_LOCAL_MACHINE, INIFontSection, &hkey) == ERROR_SUCCESS)
{
char buffer[20];

View File

@ -137,6 +137,7 @@ int X11DRV_PALETTE_Init(void)
{
HKEY hkey;
BOOL private_color_map = FALSE;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\x11drv */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\x11drv", &hkey))
{
char buffer[20];
@ -396,6 +397,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template
defaultCM_max_copy = 128;
COLOR_max = 256;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\x11drv */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\x11drv", &hkey))
{
char buffer[20];

View File

@ -222,6 +222,7 @@ static void setup_options(void)
HKEY hkey, appkey = 0;
DWORD len;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\x11drv */
if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\x11drv", 0, NULL,
REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL ))
{
@ -239,6 +240,7 @@ static void setup_options(void)
if ((p = strrchr( appname, '/' ))) appname = p + 1;
if ((p = strrchr( appname, '\\' ))) appname = p + 1;
strcat( appname, "\\x11drv" );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\AppDefaults\app.exe\x11drv */
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\AppDefaults", &tmpkey ))
{
if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;

View File

@ -1451,6 +1451,7 @@ static void XFONT_LoadDefault(LPCSTR ini, LPCSTR fonttype)
HKEY hkey;
buffer[0] = 0;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
{
DWORD type, count = sizeof(buffer);
@ -1657,6 +1658,7 @@ static void XFONT_LoadAliases(void)
/* built-ins first */
strcpy(buffer, "-bitstream-charter-");
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
{
DWORD type, count = sizeof(buffer);
@ -1675,6 +1677,7 @@ static void XFONT_LoadAliases(void)
}
strcpy(buffer, "-adobe-helvetica-");
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
{
DWORD type, count = sizeof(buffer);
@ -1701,6 +1704,7 @@ static void XFONT_LoadAliases(void)
snprintf( subsection, sizeof(subsection), "%s%i", INIAliasSection, i++ );
buffer[0] = 0;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
{
DWORD type, count = sizeof(buffer);
@ -1830,6 +1834,7 @@ static void XFONT_LoadIgnores(void)
sprintf( subsection, "%s%i", INIIgnoreSection, i++ );
buffer[0] = 0;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
{
DWORD type, count = sizeof(buffer);
@ -2920,6 +2925,7 @@ void X11DRV_FONT_InitX11Metrics( void )
/* deal with systemwide font metrics cache */
buffer[0] = 0;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\fonts */
if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, INIFontSection, &hkey))
{
DWORD type, count = buf_size;

View File

@ -668,7 +668,7 @@ void OnSize( UINT nType, int cx, int cy )
void LoadSettings(void)
{
HKEY hKey;
TCHAR szSubKey[] = _T("Software\\ReactWare\\TaskManager");
TCHAR szSubKey[] = _T("Software\\Wine\\TaskManager");
int i;
DWORD dwSize;
@ -761,6 +761,7 @@ void LoadSettings(void)
TaskManagerSettings.ShowKernelTimes = FALSE;
/* Open the key */
/* @@ Wine registry key: HKCU\Software\Wine\TaskManager */
if (RegOpenKeyEx(HKEY_CURRENT_USER, szSubKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
return;
/* Read the settings */
@ -774,18 +775,11 @@ void LoadSettings(void)
void SaveSettings(void)
{
HKEY hKey;
TCHAR szSubKey1[] = _T("Software");
TCHAR szSubKey2[] = _T("Software\\ReactWare");
TCHAR szSubKey3[] = _T("Software\\ReactWare\\TaskManager");
TCHAR szSubKey3[] = _T("Software\\Wine\\TaskManager");
/* Open (or create) the key */
hKey = NULL;
RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey1, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
RegCloseKey(hKey);
hKey = NULL;
RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey2, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
RegCloseKey(hKey);
hKey = NULL;
/* @@ Wine registry key: HKCU\Software\Wine\TaskManager */
if (RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey3, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
return;
/* Save the settings */

View File

@ -75,6 +75,7 @@ int main (int argc, char *argv[])
maxLength = sizeof(szBrowsers);
/* @@ Wine registry key: HKCU\Software\Wine\WineBrowser */
if(RegCreateKeyEx( HKEY_CURRENT_USER,
"Software\\Wine\\WineBrowser", 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL,

View File

@ -169,6 +169,7 @@ static unsigned dbg_load_internal_vars(void)
#include "intvar.h"
#undef INTERNAL_VAR
/* @@ Wine registry key: HKCU\Software\Wine\WineDbg */
if (RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\WineDbg", &hkey))
{
WINE_ERR("Cannot create WineDbg key in registry\n");
@ -196,6 +197,7 @@ static unsigned dbg_save_internal_vars(void)
HKEY hkey;
int i;
/* @@ Wine registry key: HKCU\Software\Wine\WineDbg */
if (RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\WineDbg", &hkey))
{
WINE_ERR("Cannot create WineDbg key in registry\n");

View File

@ -445,6 +445,7 @@ static char *extract_icon( LPCWSTR path, int index)
/* Where should we save the icon? */
WINE_TRACE("path=[%s] index=%d\n", wine_dbgstr_w(path), index);
iconsdir=NULL; /* Default is no icon */
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Wine */
if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Wine", &hkey ))
{
static const WCHAR IconsDirW[] = {'I','c','o','n','s','D','i','r',0};

View File

@ -276,6 +276,7 @@ void LoadBoard( BOARD *p_board )
char key_name[8];
unsigned i;
/* @@ Wine registry key: HKCU\Software\Wine\WineMine */
RegOpenKeyEx( HKEY_CURRENT_USER, registry_key,
0, KEY_QUERY_VALUE, &hkey );
@ -360,6 +361,7 @@ void SaveBoard( BOARD *p_board )
char data[16];
char key_name[8];
/* @@ Wine registry key: HKCU\Software\Wine\WineMine */
if( RegCreateKeyEx( HKEY_CURRENT_USER, registry_key,
0, NULL,
REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL,