Common functions☆ function to open a key: RegOpenKeyEx function Definition:
LONG RegOpenKeyEx (HKEY HKEY,/ /Handle of the key already opened, or directly above a few root keys lpctstr Lpsubkey,// To open the address of the subkey name DWORD uloptions,// reserved value must be 0 regsam samdesired,// open mode, Read or write phkey phkresult// return the handle of the Open subkey );
☆ Query A key value: RegQueryValueEx function Definition:
LONG RegQueryValueEx (HKEY HKEY,// handle of key to query LPCTSTR lpvaluename,// name of key value to query Lpdword lpreserved,// reserved Values Lpdword Lptype,// type of data to query lpbyte lpdata,// data to be returned for the query lpdword Lpcbdata// Preset length of the data );
☆ Set a key value RegSetValueEx function definition:
LONG RegSetValueEx (HKEY HKEY,// handle of the key to be set lpctstr lpvaluename,// name of the key value to access Lpdword lpreserved,// reserved Values DWORD dwtype,// type of data to set const BYTE *lpdata,// Health value to set DWORD cbdata// length of data );