Skip to content

Reg_Set_Access_Rights

Obsolete

This command is obsolete. Use the cRegistry class for accessing the Windows Registry in DataFlex.

Purpose

Sets the access rights of the registry.

Syntax

Reg_Set_Access_Rights To dwAccessRights

What It Does

This command sets the access rights used when invoking all registry commands, such as Get_Profile_String and Set_Profile_String. The dwAccessRights value is a bitwise combination of any of the following values. IOR may be used to build the desired level of rights. The default rights for DataFlex and Web App Server are KEY_WRITE.

  • KEY_QUERY_VALUE: Allows the values of a registry key to be queried.
  • KEY_SET_VALUE: Allows the values of a registry key to be changed.
  • KEY_CREATE_SUB_KEY: Allows subkeys to be created within a registry key.
  • KEY_ENUMERATE_SUB_KEYS: Allows subkeys to be enumerated.
  • KEY_CREATE_LINK: Allows symbolic links to be created from points within the registry.
  • KEY_WRITE: Combination of KEY_SET_VALUE and KEY_CREATE_SUB_KEY.
  • KEY_READ: Combination of all read-only access options, including enumeration.
  • KEY_ALL_ACCESS: Allows for reading and writing registry options and also allows symbolic links to be created.

Example

dword dwKeyRead
Reg_Set_Access_Rights to dwKeyRead

Notes

Setting the registry rights to a value outside of the user's allowed rights will cause a security error (rights violation) under Windows NT or Windows 2000, and your application will generate an error.