Page 1 of 1

WinRegistryKey bug ???

Posted: 06 Jul 2007, 20:10
by tnarol
Hi,

I'm using version 1.2.9 of Poco under Windows XP and Visual Studio 2005.
After experiencing strange behaviours using WinRegistryKey I decided to perform a very simple test using the provided WinRegistryTest.cpp unit test file.

I've added the following code at the very top of the testRegistry method :

WinRegistryKey myKey("HKEY_CURRENT_USER\Software\Applied Informatics\Test");

bool existence = myKey.exists();

if (existence)
{

MessageBox(NULL, "yes","",0);

}
else
{

MessageBox(NULL, "no","",0);

}

Then I created a "Applied Informatics" key under ""HKEY_CURRENT_USER\Software\" and a "Test" key under "Applied Informatics".

First strange thing if I run the Registry test it ouputs "no" ???

Second strange thing if I manually create a new string value named "Test" with value "1" under "HKEY_CURRENT_USER\Software\Applied Informatics\Test" then run the registry test in debug_shared mode the output is "yes" but the newly created key is deleted from registry.

Third strange thing if I manually create a new string value named "Test" with value "1" under "HKEY_CURRENT_USER\Software\Applied Informatics\Test" then run the registry test in release_shared mode the output is "no" and the newly created key is also deleted from registry.