Paul Vriens wrote:
Hi,
RegDeleteTreeW is only available on Vista. (Were these tests run on Windows to verify?).
Yes most of it was tested on XP, except this final registry cleanup thing, sorry my mistake. Also it ran without errors with previous version of your patch on XP here.
This version simply replaces the RegDeleteTree by a RegDeleteKey (which is sufficient as there is only one value underneath the key).
This is not necessarily the case, Filtermapper's Register... methods add values and create subkeys in that key. I think it will have at least "Pins" subkey in the end. It was causing problms, until I found what I thought is a good safe and easy solution (RegDeleteTree). To ensure everything is removed, and especially if some Unregister.. calls fail for whatever reason, it really is preferable to do a recursive delete. If it takes copypasting a function then so be it. I think your previous patch was better, but maybe somebody noticed a problem with it, I don't know.
Alexander Dorofeyev wrote:
Paul Vriens wrote:
Hi,
RegDeleteTreeW is only available on Vista. (Were these tests run on Windows to verify?).
Yes most of it was tested on XP, except this final registry cleanup thing, sorry my mistake. Also it ran without errors with previous version of your patch on XP here.
This version simply replaces the RegDeleteTree by a RegDeleteKey (which is sufficient as there is only one value underneath the key).
This is not necessarily the case, Filtermapper's Register... methods add values and create subkeys in that key. I think it will have at least "Pins" subkey in the end. It was causing problms, until I found what I thought is a good safe and easy solution (RegDeleteTree). To ensure everything is removed, and especially if some Unregister.. calls fail for whatever reason, it really is preferable to do a recursive delete. If it takes copypasting a function then so be it. I think your previous patch was better, but maybe somebody noticed a problem with it, I don't know.
I've checked this on W2K3 and WinXP-SP3 and it only creates that one registry key with one value (Default) underneath. There is another key created which isn't deleted:
HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\devenum{guid}
This key has 4 values.
This key is overwritten when a new registration occurs.
Paul Vriens wrote:
I've checked this on W2K3 and WinXP-SP3 and it only creates that one registry key with one value (Default) underneath. There is another key created which isn't deleted:
HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\devenum{guid}
This key has 4 values.
This key is overwritten when a new registration occurs
Hmm, during the course of the test there should definitely be keys created in HKCR\CLSID{guid} by filtermapper and they were during my tests. I guess they are removed by Unregister... calls (can be checked by commenting them). On a second thought, I guess the UnregisterFilter also should remove Pins subkey, probably that's why there's nothing left there. Can't recheck myself right now, unfortunately. Then deletekey vs deletetree only matters when something in unregistration unexpectedly fails, but still.
I'll look into other keys, I guess it's some leftovers from filtermapper2 stuff and more cleanup must be added.