| Registry with SHLWAPI | |||||||||||||||||
| Registry (53.804 bytes) | |||||||||||||||||
| New 01/02/2001 | |||||||||||||||||
| In the first place I must thank Romke Soldaat that pointed me out on this direction. I was reading is article on the OfficeVBA magazine concerning the SHWLAPI.DLL where he say that perhaps will address the registry function in a later article, well I was in the process of writing some registry stuff, and decide to take a look on what has in the SHLWAPI, I must confess that there aren't much difference between regular registry API function and the function provided by this DLL, I only found a few functions are worth the trouble of the distribution of the SHLWAPI. Until now I've found this better than regular SHLADV32.DLL registry functions. SHDeleteKey and SHDeleteEmptyKey this is due to the fact that W2K will behave with the RegDeleteKey, that is it behaves in a different way on 9x than it does on W2K.so SHDeleteKey will behave the same way, that is delete the key and all the subkeys in both systems. The SHGetValue / SHSetValue are benefic if you only need to get / set one value from the key, it doesn't need to Open / Close the key, but if you need to Get / Set more than one value per key than it is better to stick it normal registry functions. The SHCopyKey functions it's very handy to copy entire keys. But because I had to make those functions work in order to check them I'm posting them here, I've found that they are not very well documented, maybe because of what I stated previously. A bonus I think that you will like are the callback function for the listbox, I was after one of this for sometime now, the need to make a GUI to demonstrate the function, made me delve into those. Since I've made the Clock Around the World sample that I promised myself to make this. You can if you wish replace the SHEnumKeysEx and SHEnumValues by the RegEnumKeysEx and RegEnumValues, just remember the reserved arguments, they are not present at the SHLWAPI functions. DLL Version Numbers 4.00 W95/NT4 4.70 IE3.x 4.71 IE4.0 4.72 IE4.01 and W98 5.00 IE5 Every function that I'm using require the SHLWAPI version 4.71, if you want to use the SHCopyKey you need to have version 5.00. I didn't test any of the *US* functions (User Specific) they can or maybe not add some interesting stuff. I'm still working on the User Interface to show you the call back function, well you could use a treeview and mimic the RegEdit.Exe, I will leave that in your decision, meanwhile I'm posting this beta version until I find a more usefull way of showing keys dependence. A note on the way to go back on this UI. You can use the TextBox to type a Key directlly, or you can delete the last entered key and press the refresh button (Well not much of a user friendly UI, sorry) |
|||||||||||||||||
| Any comment and problem's please send a e-mail to pmpg98@hotmail.com | |||||||||||||||||
| Home | Code Examples | ||||||||||||||||