Registry Editing

Blitz3D Forums/Blitz3D Programming/Registry Editing

blade007(Posted 2010) [#1]
Hello,
Does anyone happen to have the Userlibrary for registry editing?

http://www.blitzbasic.com/toolbox/toolbox.php?tool=99

The original link is broken.
If someone could upload it somewhere I would be grateful.


_PJ_(Posted 2010) [#2]
You can use the default windows "AdvAPI32.dll" (whih means you wont need to add a dll, since it should be present within windows)

You then only need a decls file for the commands, something like:
.lib "Advapi32.dll"

RegOpenKey%(hKeyParent%,SubKey$,phkResult*):"RegOpenKeyA"
RegCloseKey%(hKey%):"RegCloseKey"
RegFlushKey%(hKey%):"RegFlushKey"
RegCreateKey%(hKeyParent%,SubKey$,phkResult*):"RegCreateKeyA"
RegDeleteKey%(hKeyParent%,SubKey$):"RegDeleteKeyA"
RegSetValueEx%(hKey%,ValueName$,Reserved%,nType%,Bytes*,size%):"RegSetValueExA"
RegDeleteValue%(hKey%,ValueName$):"RegDeleteValueA"
RegEnumKey%(hKey%,idx%,Key*,size%):"RegEnumKeyA"
RegEnumValue%(hKey%,idx%,ValueName*,NameSize*,Reserved%,nType*,ValueBytes*,ValueSize*):"RegEnumValueA"
RegQueryValueEx%(hKey%,ValueName$,Reserved%,nType*,ValueBytes*,ValueSize*):"RegQueryValueExA"



There's code in the archives for actually using these for reading/writing registry keys and values :)