MFC操作登錄檔
阿新 • • 發佈:2018-12-27
1 LONG RegCreateKeyEx( 2 HKEY hKey, // handle to open key。開啟的登錄檔指標 3 LPCTSTR lpSubKey, // subkey name。子鍵名稱 4 DWORD Reserved, // reserved。必須為0 5 LPTSTR lpClass, // class string。已經存在時用,一般為NULL6 DWORD dwOptions, // special options 7 //預設值REG_OPTION_VOLATILE,儲存在登錄檔,下次開機仍然存在 8 //REG_OPTION_VOLATILE,儲存在記憶體 9 //REG_OPTION_BACKUP_RESTORE 10 REGSAM samDesired, // desired security access。操作許可權。一般KEY_ALL_ACCESS,除非有特殊需要,請查閱MSDN11 LPSECURITY_ATTRIBUTES lpSecurityAttributes, // inheritance。繼承性。一般為NULL 12 PHKEY phkResult, // key handle 。返回該鍵值鎮。 13 LPDWORD lpdwDisposition // disposition value buffer 14 //REG_CREATED_NEW_KEY The key did not exist and was created. 15 //REG_OPENED_EXISTING_KEY The key existed and was simply opened without being changed. 16 17 );