Windows Mobile Registry operations

Source: Internet
Author: User
Windows Mobile Registry operations
Font size: [large, medium, and small] Release Date: Publisher: peaok Views: 458 Windows Mobile Registry is the same as Windows Registry. Registry operations mainly use several major APIs: 1) regopenkeyex function: Open the specified registry key, returns error_success long winapi regopenkeyex (_ in hkey, // key handle (that is, the key to be opened) _ in lpctstr lpsubkey, // the subkey name DWORD uloptions, // reserved field _ in regsam samdesired, // Key Permission _ out phkey phkresult // return key handle); 2) regqueryinfokey function: collect information about the specified registry key. Long winapi regqueryinfokey (_ in hkey, // key handle (that is, the key to be opened) _ out lptstr lpclass, // storage key-Type Space _ in_out lpdword lpcclass, // space size lpdword lpreserved, // reserved _ out lpdword lpcsubkeys, // Number of subkeys _ out lpdword lpcmaxsubkeylen, // length of the longest key in the subkey _ out lpdword lpcmaxclasslen, // Maximum length of the subkey class _ out lpdword lpcvalues, // The number of this key value _ out lpdword lpcmaxvaluenamelen, // The length of the name of the longest value _ out lpdword lpcmaxvaluelen, // The Data Length of the longest value _ out lpdword lpcbsecuritydescriptor, // The length of the key's security description _ out pfiletime lpftlastwritetime // The latest update time); 3) regenumkeyex function: enumerate the child key of the specified key long winapi regenumkeyex (_ in hkey, // The Key _ in DWORD dwindex to be enumerated, // the serial number of the Child key _ out lptstr lpname, // The Space _ in_out lpdword lpcname of the sub-key name, // The length address of the sub-key name lpdword lpreserved, // reserved _ in_out lptstr lpclass, // enumerate the space address of the subkey _ in_out lpdword lpcclass, // space length _ out pfiletime lpftlastwritetime // Update time); 4) regenumvalue function: enumeration key value of the specified key long winapi regenumvalue (_ in hkey, // key _ in DWORD dwindex to be enumerated, // the serial number of the subkey _ out lptstr lpvaluename, // key value _ in_out lpdword lpcchvaluename, // key value length lpdword lpreserved, // reserved _ out lpdword lptype, // data type _ out lpbylpte data, // data space _ in_out lpdword lpcbdata // space length ); Implementation process: 1. first, call regopenkeyex () to open the Root Key of the registry you want to view, and then return a key handle 2. call regqueryinfokey () to collect information about the specified registry key. Use the key handle returned in the previous step as parameter 3. you can call regenumkeyex () to obtain all the subkeys under the key, or you can use regenumvalue () to view the key 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.