RegQueryValueEx retrieves an open registry handle, specifying the type of registry key and setting the value.

Source: Internet
Author: User

1VC statement
12345678 LONGRegQueryValueEx(    HKEYhKey,            // handle to key    LPCTSTRlpValueName,  // value name    LPDWORDlpReserved,   // reserved    LPDWORDlpType,       // type buffer    LPBYTE lpData,        // data buffer    LPDWORDlpcbData      // size of data buffer);
2 parameter description
Retrieves an open registry handle, specifying the type of registry key and setting the value. The return value long, 0 (ERROR_SUCCESS) indicates success. Any other value represents an error code parameter table parameter type and description HKey hkey,//a handle to an open item, or specify a standard item name LPCTSTR lpvaluename,//to get the name of the value, the name of the registry key Lpdword lpreserved,/ /unused, set to zero Lpdword lptype,//is used to mount a variable that retrieves the data type Lpbyte lpdata,//a buffer for loading the specified value Lpdword lpcbdata,//a variable to load the length of the lpdata buffer. Once returned, it is set to the number of bytes actually loaded into the buffer lpvaluename a string that points to the name of the value to be queried (ending with a null character). If lpvaluename is null or an empty string (""), this function retrieves the type and data of the unnamed or default value for this key. Windows 95 and Windows 98: Each key has a default value (originally does not contain data). In Windows 95, the default value type is always REG_SZ. In Windows 98, the default key type is initially REG_SZ, but you can specify a default value for a different type by RegSetValueEx. Windows NT: Keys cannot automatically have an unnamed or default value, and unnamed values can be of any type. Lpreserved reserved, must be null.

RegQueryValueEx retrieves an open registry handle, specifying the type of registry key and setting the value.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.