** JUST UNE PETITE EXLICATION **

cs_Heny Messages postés 125 Date d'inscription samedi 25 octobre 2003 Statut Membre Dernière intervention 19 avril 2007 - 29 juin 2004 à 15:33
Scalpweb Messages postés 1467 Date d'inscription samedi 13 mars 2004 Statut Membre Dernière intervention 5 mai 2010 - 29 juin 2004 à 16:13
Salut a tous
Ma question est simple a koi serv ce code
'=============================
' Options de sécurité des clés de base de registres...
Const READ_CONTROL = &H20000
Const KEY_QUERY_VALUE = &H1
Const KEY_SET_VALUE = &H2
Const KEY_CREATE_SUB_KEY = &H4
Const KEY_ENUMERATE_SUB_KEYS = &H8
Const KEY_NOTIFY = &H10
Const KEY_CREATE_LINK = &H20
Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + _
KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + _
KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL

' Types racines des clés de base de registres...
Const HKEY_LOCAL_MACHINE = &H80000002
Const ERROR_SUCCESS = 0
Const REG_SZ = 1 ' Chaîne terminée par un caractère nul Unicode.
Const REG_DWORD = 4 ' Nombre 32 bits.

Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location"
Const gREGVALSYSINFOLOC = "MSINFO"
Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO"
Const gREGVALSYSINFO = "PATH"

Public SwitchVal As Boolean

Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
'====================================
Merci de me repondre

1 réponse

Scalpweb Messages postés 1467 Date d'inscription samedi 13 mars 2004 Statut Membre Dernière intervention 5 mai 2010 4
29 juin 2004 à 16:13
C'est simplement des déclarations de constantes et d'APIs pour utliser la base de registre !
Ce code ne sert à rien tel qu'il est.

Pice-WCorp bientôt sur le net.
0
Rejoignez-nous