source: Include/api_reg.sbp@ 124

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

OLE Automation関数などの追加
KERNEL関数などの追加

File size: 4.7 KB
Line 
1' api_reg.sbp
2' Registry Operation
3
4
5#ifndef _INC_REG
6#define _INC_REG
7
8
9Const READ_CONTROL = &H00020000
10Const STANDARD_RIGHTS_ALL = &H001F0000
11
12
13' Security Mask
14Const KEY_QUERY_VALUE = &H0001
15Const KEY_SET_VALUE = &H0002
16Const KEY_CREATE_SUB_KEY = &H0004
17Const KEY_ENUMERATE_SUB_KEYS = &H0008
18Const KEY_NOTIFY = &H0010
19Const KEY_CREATE_LINK = &H0020
20Const KEY_READ = (READ_CONTROL Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE)
21Const KEY_WRITE = (READ_CONTROL Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE)
22Const KEY_EXECUTE = KEY_READ
23Const KEY_ALL_ACCESS = (STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE)
24
25
26' Options
27Const REG_OPTION_NON_VOLATILE = &H00000000
28Const REG_OPTION_VOLATILE = &H00000001
29Const REG_OPTION_BACKUP_RESTORE = &H00000004
30
31
32' Reserved Key Handles
33Const HKEY_CLASSES_ROOT = &H80000000
34Const HKEY_CURRENT_USER = &H80000001
35Const HKEY_LOCAL_MACHINE = &H80000002
36Const HKEY_USERS = &H80000003
37Const HKEY_PERFORMANCE_DATA = &H80000004
38Const HKEY_CURRENT_CONFIG = &H80000005
39Const HKEY_DYN_DATA = &H80000006
40
41
42' Key Create/Open Disposition
43Const REG_CREATED_NEW_KEY = &H00000001
44Const REG_OPENED_EXISTING_KEY = &H00000002
45
46
47' Data Type
48Const REG_NONE = 0
49Const REG_SZ = 1
50Const REG_EXPAND_SZ = 2
51Const REG_BINARY = 3
52Const REG_DWORD = 4
53Const REG_DWORD_LITTLE_ENDIAN = 4
54Const REG_DWORD_BIG_ENDIAN = 5
55Const REG_LINK = 6
56Const REG_MULTI_SZ = 7
57Const REG_RESOURCE_LIST = 8
58
59
60'------------------------
61' Registry API Functions
62
63Declare Function RegCloseKey Lib "advapi32" (hKey As HKEY) As Long
64Declare Function RegConnectRegistry Lib "advapi32" Alias "RegConnectRegistryA" (pMachineName As PCSTR, hKey As HKEY, ByRef hkResult As HKEY) As Long
65Declare Function RegCreateKeyEx Lib "advapi32" Alias "RegCreateKeyExA" (hKey As HKEY, lpSubKey As PCSTR, Reserved As DWord, lpClass As PSTR, dwOptions As DWord, samDesired As Long, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, ByRef phkResult As HKEY, lpdwDisposition As *DWord) As Long
66Declare Function RegDeleteKey Lib "advapi32" Alias "RegDeleteKeyA" (hKey As HKEY, lpSubKey As PCSTR) As Long
67Declare Function RegDeleteValue Lib "advapi32" Alias "RegDeleteValueA" (hKey As HKEY, lpValueName As PCSTR) As Long
68Declare Function RegEnumKeyEx Lib "advapi32" Alias "RegEnumKeyExA" (hKey As HKEY, dwIndex As DWord, pName As PSTR, ByRef cName As DWord, pReserved As *DWord, pClass As PSTR, ByRef cClass As DWord, pftLastWriteTime As *FILETIME) As Long
69Declare Function RegEnumValue Lib "advapi32" Alias "RegEnumValueA" (hKey As HKEY, dwIndex As DWord, pValueName As PSTR, ByRef cValueName As DWord, pReserved As *DWord, pType As *DWord, pData As *Byte, pcbData As *DWord) As Long
70Declare Function RegFlushKey Lib "advapi32"(hKey As HKEY) As Long
71Declare Function RegLoadKey Lib "advapi32" Alias "RegLoadKeyA" (hKey As HKEY, pSubKey As PCSTR, pFile As PCSTR) As Long
72Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (hKey As HKEY, lpSubKey As PCSTR, ulOptions As DWord, samDesired As Long, ByRef phkResult As HKEY) As Long
73Declare Function RegQueryInfoKey Lib "advapi32" Alias "RegQueryInfoKeyA" (hKey As HKEY, pClass As PSTR, 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
74Declare Function RegQueryMultipleValues Lib "advapi32" Alias "RegQueryMultipleValuesA" (hKey As HKEY, val_list As *VALENT, num_vals As DWord, pValueBuf As PSTR, ByRef dwTotsize As DWord) As Long
75Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (hKey As HKEY, lpValueName As PCSTR, lpReserved As DWord, lpType As *DWord, lpData As VoidPtr, lpcbData As *DWord) As Long
76Declare Function RegSaveKey Lib "advapi32" Alias "RegSaveKeyA" (hKey As HKEY, pFile As PCSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As Long
77Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (hKey As HKEY, lpValueName As PCSTR, Reserved As DWord, dwType As DWord, lpData As VoidPtr, cbData As DWord) As Long
78Declare Function RegUnLoadKey Lib "advapi32" Alias "RegUnLoadKeyA" (hKey As HKEY, pSubKey As PCSTR) As Long
79
80Type VALENT
81 ve_valuename As PSTR
82 ve_valuelen As DWord
83 ve_valueptr As ULONG_PTR
84 ve_type As DWord
85End Type
86#endif '_INC_REG
Note: See TracBrowser for help on using the repository browser.