source: Include/api_reg.sbp@ 170

Last change on this file since 170 was 170, checked in by イグトランス (egtra), 18 years ago

winnt.ab, windef.ab, guiddef.abを導入

File size: 5.2 KB
Line 
1' api_reg.sbp
2' Registry Operation
3
4
5#ifndef _INC_REG
6#define _INC_REG
7
8#ifdef UNICODE
9Const _FuncName_RegConnectRegistry = "RegConnectRegistryW"
10Const _FuncName_RegCreateKeyEx = "RegCreateKeyExW"
11Const _FuncName_RegDeleteKey = "RegDeleteKeyW"
12Const _FuncName_RegDeleteValue = "RegDeleteValueW"
13Const _FuncName_RegEnumKeyEx = "RegEnumKeyExW"
14Const _FuncName_RegEnumValue = "RegEnumValueW"
15Const _FuncName_RegLoadKey = "RegLoadKeyW"
16Const _FuncName_RegOpenKeyEx = "RegOpenKeyExW"
17Const _FuncName_RegQueryInfoKey = "RegQueryInfoKeyW"
18Const _FuncName_RegQueryMultipleValues = "RegQueryMultipleValuesW"
19Const _FuncName_RegQueryValueEx = "RegQueryValueExW"
20Const _FuncName_RegSaveKey = "RegSaveKeyW"
21Const _FuncName_RegSetValueEx = "RegSetValueExW"
22Const _FuncName_RegUnLoadKey = "RegUnLoadKeyW"
23#else
24Const _FuncName_RegConnectRegistry = "RegConnectRegistryA"
25Const _FuncName_RegCreateKeyEx = "RegCreateKeyExA"
26Const _FuncName_RegDeleteKey = "RegDeleteKeyA"
27Const _FuncName_RegDeleteValue = "RegDeleteValueA"
28Const _FuncName_RegEnumKeyEx = "RegEnumKeyExA"
29Const _FuncName_RegEnumValue = "RegEnumValueA"
30Const _FuncName_RegLoadKey = "RegLoadKeyA"
31Const _FuncName_RegOpenKeyEx = "RegOpenKeyExA"
32Const _FuncName_RegQueryInfoKey = "RegQueryInfoKeyA"
33Const _FuncName_RegQueryMultipleValues = "RegQueryMultipleValuesA"
34Const _FuncName_RegQueryValueEx = "RegQueryValueExA"
35Const _FuncName_RegSaveKey = "RegSaveKeyA"
36Const _FuncName_RegSetValueEx = "RegSetValueExA"
37Const _FuncName_RegUnLoadKey = "RegUnLoadKeyA"
38#endif
39
40' Options
41Const REG_OPTION_NON_VOLATILE = &H00000000
42'Const REG_OPTION_VOLATILE = &H00000001
43'Const REG_OPTION_BACKUP_RESTORE = &H00000004
44
45
46' Reserved Key Handles
47Const HKEY_CLASSES_ROOT = &H80000000
48Const HKEY_CURRENT_USER = &H80000001
49Const HKEY_LOCAL_MACHINE = &H80000002
50Const HKEY_USERS = &H80000003
51Const HKEY_PERFORMANCE_DATA = &H80000004
52Const HKEY_CURRENT_CONFIG = &H80000005
53Const HKEY_DYN_DATA = &H80000006
54
55Type VALENTW
56 ve_valuename As PWSTR
57 ve_valuelen As DWord
58 ve_valueptr As ULONG_PTR
59 ve_type As DWord
60End Type
61Type VALENTA
62 ve_valuename As PSTR
63 ve_valuelen As DWord
64 ve_valueptr As ULONG_PTR
65 ve_type As DWord
66End Type
67
68#ifdef UNICODE
69TypeDef VALENT = VALENTW
70#else
71TypeDef VALENT = VALENTA
72#endif
73
74'------------------------
75' Registry API Functions
76
77Declare Function RegCloseKey Lib "advapi32" (hKey As HKEY) As Long
78Declare Function RegConnectRegistry Lib "advapi32" Alias _FuncName_RegConnectRegistry (pMachineName As PCTSTR, hKey As HKEY, ByRef hkResult As HKEY) As Long
79Declare Function RegCreateKeyEx Lib "advapi32" Alias _FuncName_RegCreateKeyEx (hKey As HKEY, lpSubKey As PCTSTR, Reserved As DWord, lpClass As PTSTR, dwOptions As DWord, samDesired As Long, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, ByRef phkResult As HKEY, lpdwDisposition As *DWord) As Long
80Declare Function RegDeleteKey Lib "advapi32" Alias _FuncName_RegDeleteKey (hKey As HKEY, lpSubKey As PCTSTR) As Long
81Declare Function RegDeleteValue Lib "advapi32" Alias _FuncName_RegDeleteValue (hKey As HKEY, lpValueName As PCTSTR) As Long
82Declare Function RegEnumKeyEx Lib "advapi32" Alias _FuncName_RegEnumKeyEx (hKey As HKEY, dwIndex As DWord, pName As PTSTR, ByRef cName As DWord, pReserved As *DWord, pClass As PTSTR, ByRef cClass As DWord, pftLastWriteTime As *FILETIME) As Long
83Declare Function RegEnumValue Lib "advapi32" Alias _FuncName_RegEnumValue (hKey As HKEY, dwIndex As DWord, pValueName As PTSTR, ByRef cValueName As DWord, pReserved As *DWord, pType As *DWord, pData As *Byte, pcbData As *DWord) As Long
84Declare Function RegFlushKey Lib "advapi32"(hKey As HKEY) As Long
85/*
86Declare Function RegLoadKey Lib "advapi32" Alias _FuncName_RegLoadKey (hKey As HKEY, pSubKey As PCTSTR, pFile As PCTSTR) As Long
87Declare Function RegOpenKeyEx Lib "advapi32" Alias _FuncName_RegOpenKeyEx (hKey As HKEY, lpSubKey As PCTSTR, ulOptions As DWord, samDesired As Long, ByRef phkResult As HKEY) As Long
88Declare Function RegQueryInfoKey Lib "advapi32" Alias _FuncName_RegQueryInfoKey (hKey As HKEY, pClass As PTSTR, pcClass As *DWord, pReserved As *DWord, pcSubKeys As *DWord, pcMaxSubKeyLen As *DWord, pcMaxClassLen As *DWord, pcValues As *DWord, pcMaxValueNameLen As *DWord, pcMaxValueLen As *DWord, pcbSecurityDescriptor As *DWord, pftLastWriteTime As *FILETIME) As Long
89Declare Function RegQueryMultipleValues Lib "advapi32" Alias _FuncName_RegQueryMultipleValues (hKey As HKEY, val_list As *VALENT, num_vals As DWord, pValueBuf As PTSTR, ByRef dwTotsize As DWord) As Long
90Declare Function RegQueryValueEx Lib "advapi32" Alias _FuncName_RegQueryValueEx (hKey As HKEY, lpValueName As PCTSTR, lpReserved As DWord, lpType As *DWord, lpData As VoidPtr, lpcbData As *DWord) As Long
91Declare Function RegSaveKey Lib "advapi32" Alias _FuncName_RegSaveKey (hKey As HKEY, pFile As PCTSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As Long
92Declare Function RegSetValueEx Lib "advapi32" Alias _FuncName_RegSetValueEx (hKey As HKEY, lpValueName As PCTSTR, Reserved As DWord, dwType As DWord, lpData As VoidPtr, cbData As DWord) As Long
93Declare Function RegUnLoadKey Lib "advapi32" Alias _FuncName_RegUnLoadKey (hKey As HKEY, pSubKey As PCTSTR) As Long
94*/
95'_INC_REG
Note: See TracBrowser for help on using the repository browser.