Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Reading and Writing Registry Keys with Visual Basic
Subject:   Missing constants?
Date:   2004-12-02 13:31:08
From:   LukeM
Response to: Missing constants?

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/

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • 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