Hans Leidekker wrote:
As suggested by Alexandre, I factored out some common code in winebrowser and extended it to handle mailto: urls as well.
This version looks much better. Just one small question:
- length = sizeof(mailers);
- /* @@ Wine registry key: HKCU\Software\Wine\WineMailer */
- if (RegCreateKeyEx( HKEY_CURRENT_USER, "Software\Wine\WineMailer", 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, NULL ))
- {
fprintf( stderr, "winebrowser: cannot create config key\n" );
return 1;
- }
- r = RegQueryValueExA( key, "Mailers", 0, &type, (LPBYTE)mailers, &length );
- if (r != ERROR_SUCCESS)
- {
/* set value to the default */
RegSetValueExA( key, "Mailers", 0, REG_SZ, (LPBYTE)defaultmailers,
lstrlen( defaultmailers ) + 1 );
strcpy( mailers, defaultmailers );
- }
- RegCloseKey( key );
Why create another key in the registry? Wouldn't HKCU\Software\Wine\WineBrowser , Mailers make it easier for a user to find the value in the registry?
-- DLL