Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question[b]Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long Declare Function FreeLibrary Lib "kernel32" Alias "FreeLibrary" (ByVal hLibModule As Long) As Long/b
Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer) Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long Declare Function FreeLibrary Lib "kernel32" Alias "FreeLibrary" (ByVal hLibModule As Long) As Long Sub Main() Dim Adresse_port As Integer Dim No_Charge As Long 'Adresse du port parallèle Adresse_port = &H378 'Chargement de la librairie No_Charge = LoadLibrary("C:\Documents and Settings\SBarthelemy\Desktop\PP\inpout32.dll") 'On test l'accès à la librairie x = Inp(Adresse_port) 'On libère la librairie Resultat = FreeLibrary (No_Charge) 'Affiche l'état du port parallèle msgbox Inp(Adresse_port) End Sub