Cygwin: cygtls: rename sig to current_sig
[newlib-cygwin.git] / winsup / cygwin / local_includes / registry.h
blobeed640401f185cba55fdaa5e311c68298100666d
1 /* registry.h: shared info for cygwin
3 This file is part of Cygwin.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
7 details. */
9 class reg_key
11 private:
13 HANDLE key;
14 NTSTATUS key_is_invalid;
15 DWORD _disposition;
17 public:
19 reg_key (HKEY toplev, REGSAM access, ...);
20 reg_key (bool isHKLM, REGSAM access, ...);
22 void *operator new (size_t, void *p) {return p;}
23 void build_reg (HKEY key, REGSAM access, va_list av);
25 bool error () {return key == NULL;}
27 DWORD get_dword (PCWSTR, DWORD);
28 NTSTATUS get_string (PCWSTR, PWCHAR, size_t, PCWSTR);
30 NTSTATUS set_dword (PCWSTR, DWORD);
31 NTSTATUS set_string (PCWSTR, PCWSTR);
33 bool created () const {return _disposition & REG_CREATED_NEW_KEY;}
35 ~reg_key ();