RegWriteULong
int RegWriteULong (unsigned int rootKey, const char subkeyName[], const char valueName[], unsigned long dataValue, int dataFormat);
Purpose
This function writes an unsigned long (DWORD) value to the Windows Registry. You must specify a Root Key, a Subkey of that Root Key, and the actual Value of that Subkey to which you want to write the data.
Example:
unsigned int number = 10;
// Writes 10 in Little–Endian format in MyULongValue
RegWriteULong (REGKEY_HKLM, "Software\\MySubKey",
"MyULongValue", number, 0);
(Linux) This function is not supported.
Parameters
Input | ||
Name | Type | Description |
rootKey | unsigned int | The Root Key under which you wish to access a Subkey and its value. See the Windows Registry functions Class help for more information about Root Keys. |
subkeyName | const char[] | The name of the Subkey (relative to the Root Key), to which you want to write value data. See the Windows Registry functions Class help for more information about Subkeys. |
valueName | const char[] | The name of the value to which you want to write data. If the value name does not exist this function will create it. See the Windows Registry functions Class help for more information about Key Values. |
dataValue | unsigned long | The data you wish to write to the specified Value of the specified Subkey. |
dataFormat | int | Determines how to write the 32–bit integer to the Registry. Typically, you specify Little Endian (Intel) format. Specify a nonzero value or select Big Endian in the function panel to use Big Endian format. Specify 0 or select Little Endian in the function panel to use Little Endian format. |
Return Value
Name | Type | Description |
status | int | The status code that the function returns. 0 indicates success. A negative value indicates an error. This function may return a Programmer's Toolbox or UI Library error code. Call GetGeneralErrorString to obtain a text description of the error. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later