| Sign In/My Account | View Cart |
| Article: |
Reading and Writing Registry Keys with Visual Basic | |
| Subject: | Missing constants? | |
| Date: | 2004-12-02 12:51:41 | |
| From: | LukeM | |
|
Response to: Missing constants?
|
||
|
You're right about the missing constants, it appears that a few of the constants used to define the security access masks are not declared. For example, STANDARD_RIGHTS_READ, _WRITE, and _ALL.
|
||
Showing messages 1 through 3 of 3.
Change these constants to the following values:
Public Const KEY_READ = &H20019
Public Const KEY_WRITE = &H20006
Public Const KEY_ALL_ACCESS = &HF003F
The FileTime type was also not discussed. This is used in the RegQueryInfoKey and RegEnumKeyEx functions. It can be declared with:
Public Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Finally, the RegCloseKey function is mentioned, but not defined. It is:
Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
This and much more can be found on this API Guide site, http://www.mangovision.com/vbapi/