1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
#require constant(System.RegGetValue) 
#pike 8.1 
 
/*!   Get a single value from the register (COMPAT). 
 *! 
 *!   Pike 7.6 compatibility implementation of @[System.RegGetValue()]. 
 *!   The difference being that this function throws errors when 
 *!   keys are missing. 
 *! 
 *! @note 
 *!   This function is only available on Win32 systems. 
 *! 
 *! @seealso 
 *!   @[RegGetKeyNames_76()], @[RegGetValues_76()], @[System.RegGetValue()] 
 */ 
string|int|array(string) RegGetValue_76(int hkey, string key, 
                                        string index) 
{ 
  string|int|array(string) ret = System.RegGetValue(hkey, key, index); 
  if(undefinedp(ret)) error("RegQueryValueEx: File not found.\n"); 
  return ret; 
} 
 
/*!   Get a list of value key names from the register (COMPAT). 
 *! 
 *!   Pike 7.6 compatibility implementation of @[System.RegGetKeyNames()]. 
 *!   The difference being that this function throws errors when 
 *!   keys are missing. 
 *! 
 *! @note 
 *!   This function is only available on Win32 systems. 
 *! 
 *! @seealso 
 *!   @[System.RegGetValue()], @[RegGetValues_76()], @[System.RegGetKeyNames()] 
 */ 
array(string) RegGetKeyNames_76(int hkey, string key) 
{ 
  array(string) ret = System.RegGetKeyNames(hkey, key); 
  if(undefinedp(ret)) error("RegGetKeyNames[RegOpenKeyEx]: File not found.\n"); 
  return ret; 
} 
 
/*!   Get multiple values from the register (COMPAT). 
 *! 
 *!   Pike 7.6 compatibility implementation of @[System.RegGetValues()]. 
 *!   The difference being that this function throws errors when 
 *!   keys are missing. 
 *! 
 *! @note 
 *!   This function is only available on Win32 systems. 
 *! 
 *! @seealso 
 *!   @[RegGetValue_76()], @[RegGetKeyNames_76()], @[System.RegGetValues()] 
 */ 
mapping(string:string|int|array(string)) RegGetValues_76(int hkey, string key) 
{ 
  mapping(string:string|int|array(string)) ret = System.RegGetValues(hkey, key); 
  if(undefinedp(ret)) error("RegOpenKeyEx: File not found.\n"); 
  return ret; 
}