Archive: SetShellVarContext bug


SetShellVarContext bug
The SetShellVarContext function works properly in the NT-based OSes, but fails if used with the 'all' parameter on 9x-based systems.

A solution is to change the line:
myRegGetStr(g_all_user_var_flag?HKEY_LOCAL_MACHINE:HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", name+(f?0:7),out);

to:

myRegGetStr(f?HKEY_LOCAL_MACHINE:HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", name+(f?0:7),out);

(simply replace g_all_user_var_flag with f).

I'd just like to see this bug fixed in the next version. Any comments/ideas? I am right, amn't I? :)


I did want to change this line in one of my previous versions but I didn't eventually. I don't remember why though... I will tell you when it pops back to me.


I have just looked over my Windows 98 machine again, and it should be f. Thanks for the heads up, I will update this in my next (unofficial) version.