At least in some Windows the previous invokation to WritePrivateProfileStringA("section6", NULL, NULL, "winetest.ini") creates the entry HKEY_CURRENT_USER/winetest_name1. It seems that the IniFileMapping is cached somewhere, even if it has been removed from the registry.
Signed-off-by: Carlos Rivera carlos@superkaos.org --- dlls/kernel32/tests/profile.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index c077f8b35b..5f1f4f0fe7 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -1567,6 +1567,8 @@ static void test_registry_mapping(void)
ret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\winetest_name2"); ok(!ret, "got error %u\n", ret); + ret = RegDeleteKeyA(HKEY_CURRENT_USER, "winetest_name1"); + ok(!ret, "got error %u\n", ret); ret = RegDeleteKeyA(mapped_key, ""); ok(!ret, "got error %u\n", ret); RegCloseKey(mapped_key);