| Article: |
Reading and Writing Registry Keys with Visual Basic | |
| Subject: | Missing constants? | |
| Date: | 2004-11-23 09:20:00 | |
| From: | tekhead009 | |
|
I may be missing something, but it looks like there are a few missing constants within the constants. Particularly in the security access mask section. I've read the article through, but cannot find any help.
|
||
Showing messages 1 through 4 of 4.
-
Missing constants?
2004-12-02 12:51:41 LukeM [View]
-
Missing constants?
2004-12-02 13:31:08 LukeM [View]
This appears to work.
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/ -
Missing constants?
2005-01-25 15:07:38 mdyoung [View]
Here's the constant declaration that was inteded to be used:
Const STANDARD_RIGHTS_ALL = &H1F0000
Const STANDARD_RIGHTS_READ = &H20000
Const STANDARD_RIGHTS_WRITE = &H20000
If you would like a complete list of security descriptor constants, see Microsoft's article.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/security_descriptors_on_files_and_registry_keys.asp
Hope this helps,
MDY -
Missing constants?
2005-01-25 15:10:15 mdyoung [View]
OOPS! Forgot a constant.
Const SYNCHRONIZE = &H100000
Later,
MDY



If you've used alternatives that seem to work, could you post them?
Or hopefully the author will post them soon.