WinXRegistry_WriteBin


WinXRegistry_WriteBin (hKey, subKey$, value$, SECURITY_ATTRIBUTES sa, int)

Writes an integer to the registry

Parameter Description
hKey The handle to the key to read from. See remarks for more on this parameter
subKey The subkey to read from, remember to double up the backslashes
value$ The value to read from
SECURITY_ATTRIBUTES sa The security attributes for the key if it needs to be created. You can create this with the WinXNewACL function and $$ACL_REG_STANDARD as the parameter
buffer$ The binary data to write into the registry

Returns

$$TRUE on succcess or $$FALSE on fail

Remarks

The hKey parameter can the the handle of an open key, or, more likely, one of these open keys: $$HKEY_CLASSES_ROOT, $$HKEY_CURRENT_USER, $$HKEY_LOCAL_MACHINE, $$HKEY_USERS.

If the subkey or value does not exist, it will be created using the specified security attributes.

Examples

' Write some binary data into the registry
WinXRegistry_WriteBin ($$HKEY_LOCAL_MACHINE, "SOFTWARE\\myapp", "binaryData", WinXNewACL($$ACL_REG_STANDARD, $$TRUE), buffer$)

Related Links

WinXNewACL
WinXRegistry_WriteInt
WinXRegistry_WriteString
WinXRegistry_ReadBin