mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 01:15:00 -06:00
4.44 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
804edc5756
commit
d9666cf046
77
CPP/Windows/Registry.h
Executable file
77
CPP/Windows/Registry.h
Executable file
@@ -0,0 +1,77 @@
|
||||
// Windows/Registry.h
|
||||
|
||||
#ifndef __WINDOWS_REGISTRY_H
|
||||
#define __WINDOWS_REGISTRY_H
|
||||
|
||||
#include "Common/Buffer.h"
|
||||
#include "Common/String.h"
|
||||
#include "Common/Types.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NRegistry {
|
||||
|
||||
const TCHAR kKeyNameDelimiter = TEXT('\\');
|
||||
|
||||
LONG SetValue(HKEY parentKey, LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value);
|
||||
|
||||
class CKey
|
||||
{
|
||||
HKEY _object;
|
||||
public:
|
||||
CKey(): _object(NULL) {}
|
||||
~CKey();
|
||||
|
||||
operator HKEY() const { return _object; }
|
||||
|
||||
HKEY Detach();
|
||||
void Attach(HKEY key);
|
||||
LONG Create(HKEY parentKey, LPCTSTR keyName,
|
||||
LPTSTR keyClass = REG_NONE, DWORD options = REG_OPTION_NON_VOLATILE,
|
||||
REGSAM accessMask = KEY_ALL_ACCESS,
|
||||
LPSECURITY_ATTRIBUTES securityAttributes = NULL,
|
||||
LPDWORD disposition = NULL);
|
||||
LONG Open(HKEY parentKey, LPCTSTR keyName,
|
||||
REGSAM accessMask = KEY_ALL_ACCESS);
|
||||
|
||||
LONG Close();
|
||||
|
||||
LONG DeleteSubKey(LPCTSTR subKeyName);
|
||||
LONG RecurseDeleteKey(LPCTSTR subKeyName);
|
||||
|
||||
LONG DeleteValue(LPCTSTR name);
|
||||
#ifndef _UNICODE
|
||||
LONG DeleteValue(LPCWSTR name);
|
||||
#endif
|
||||
|
||||
LONG SetValue(LPCTSTR valueName, UInt32 value);
|
||||
LONG SetValue(LPCTSTR valueName, bool value);
|
||||
LONG SetValue(LPCTSTR valueName, LPCTSTR value);
|
||||
// LONG SetValue(LPCTSTR valueName, const CSysString &value);
|
||||
#ifndef _UNICODE
|
||||
LONG SetValue(LPCWSTR name, LPCWSTR value);
|
||||
// LONG SetValue(LPCWSTR name, const UString &value);
|
||||
#endif
|
||||
|
||||
LONG SetValue(LPCTSTR name, const void *value, UInt32 size);
|
||||
|
||||
LONG SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value);
|
||||
|
||||
LONG QueryValue(LPCTSTR name, UInt32 &value);
|
||||
LONG QueryValue(LPCTSTR name, bool &value);
|
||||
LONG QueryValue(LPCTSTR name, LPTSTR value, UInt32 &dataSize);
|
||||
LONG QueryValue(LPCTSTR name, CSysString &value);
|
||||
|
||||
#ifndef _UNICODE
|
||||
LONG QueryValue(LPCWSTR name, LPWSTR value, UInt32 &dataSize);
|
||||
LONG QueryValue(LPCWSTR name, UString &value);
|
||||
#endif
|
||||
|
||||
LONG QueryValue(LPCTSTR name, void *value, UInt32 &dataSize);
|
||||
LONG QueryValue(LPCTSTR name, CByteBuffer &value, UInt32 &dataSize);
|
||||
|
||||
LONG EnumKeys(CSysStringVector &keyNames);
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user