API function for registry operations (regqueryvalueex: This function is used to find a registry key of a given type and value)

Source: Internet
Author: User

Regqueryvalueex
This function is used to find a registry key for a given type and value. To ensure that any string is returned with a null Terminator, use the reggetvalue function.

Long regqueryvalueex (
Hkey,
Lpctstr lpvaluename,
Lpdword lpreserved,
Lpdword lptype,
Lpbyte lpdata,
Lpdword lpcbdata
);

Parameters
Hkey
The input parameter points to a handle that opens the key. This key must be enabled at the security level of key_query_value. This parameter can be the return value of regcreatekeyex or regopenkeyex. It can also be the following predefined values

Hkey_classes_root
Hkey_current_config
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
Hkey_performance_data
Hkey_performance_nlstext
Hkey_cece_text
HKEY_USERS

 

Lpvaluename

The input parameter points to a string ending with null, which stores the key name to be queried. If this parameter is null or points to an empty string, the function obtains the type and value of the Untitled key or default key.

Lpreserved
Save, must be null
Lptype
The output parameter indicates the type of the queried key. If the search fails, the return value is null.
Lpdata
Output parameter, which indicates the key value found. If the search fails, null is returned.

Lpcbdata
The output parameter is an input parameter. The length of the key value in bytes, including the Terminator.

Return values
If the function is successful, error_success is returned;

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.