Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Zoury
Salut Samoth! :O)
<non testé> '*** ' Module1 Option Explicit
Private Declare Function GetSystemDirectoryA _ Lib "kernel32" _ ( _ ByVal lpBuffer As String, _ ByVal nSize As Long _ ) As Long
Private Const MAX_PATH As Long = 260
Private Sub Main() Debug.Print GetSystemDirectory End Sub
Private Function GetSystemDirectory() As String GetSystemDirectory = String$(MAX_PATH, Chr$(0)) GetSystemDirectory = Left$(GetSystemDirectory, GetSystemDirectoryA(GetSystemDirectory, MAX_PATH)) End Function '***
Merci de poster les réponses au groupe afin d'en faire profiter à tous
Salut Samoth! :O)
<non testé>
'***
' Module1
Option Explicit
Private Declare Function GetSystemDirectoryA _
Lib "kernel32" _
( _
ByVal lpBuffer As String, _
ByVal nSize As Long _
) As Long
Private Const MAX_PATH As Long = 260
Private Sub Main()
Debug.Print GetSystemDirectory
End Sub
Private Function GetSystemDirectory() As String
GetSystemDirectory = String$(MAX_PATH, Chr$(0))
GetSystemDirectory = Left$(GetSystemDirectory,
GetSystemDirectoryA(GetSystemDirectory, MAX_PATH))
End Function
'***
Private Declare Function GetSystemDirectoryA _ Lib "kernel32" _ ( _ ByVal lpBuffer As String, _ ByVal nSize As Long _ ) As Long
Private Const MAX_PATH As Long = 260
Private Sub Main() Debug.Print GetSystemDirectory End Sub
Private Function GetSystemDirectory() As String GetSystemDirectory = String$(MAX_PATH, Chr$(0)) GetSystemDirectory = Left$(GetSystemDirectory, GetSystemDirectoryA(GetSystemDirectory, MAX_PATH)) End Function '***
Merci de poster les réponses au groupe afin d'en faire profiter à tous
Samoht
Merci beaucoup ça marche au poil !
-----Message d'origine----- Salut Samoth! :O)
<non testé> '*** ' Module1 Option Explicit
Private Declare Function GetSystemDirectoryA _ Lib "kernel32" _ ( _ ByVal lpBuffer As String, _ ByVal nSize As Long _ ) As Long
Private Const MAX_PATH As Long = 260
Private Sub Main() Debug.Print GetSystemDirectory End Sub
Private Function GetSystemDirectory() As String GetSystemDirectory = String$(MAX_PATH, Chr$(0)) GetSystemDirectory = Left$(GetSystemDirectory, GetSystemDirectoryA(GetSystemDirectory, MAX_PATH)) End Function '***
Merci de poster les réponses au groupe afin d'en faire
profiter à tous
.
Merci beaucoup ça marche au poil !
-----Message d'origine-----
Salut Samoth! :O)
<non testé>
'***
' Module1
Option Explicit
Private Declare Function GetSystemDirectoryA _
Lib "kernel32" _
( _
ByVal lpBuffer As String, _
ByVal nSize As Long _
) As Long
Private Const MAX_PATH As Long = 260
Private Sub Main()
Debug.Print GetSystemDirectory
End Sub
Private Function GetSystemDirectory() As String
GetSystemDirectory = String$(MAX_PATH, Chr$(0))
GetSystemDirectory = Left$(GetSystemDirectory,
GetSystemDirectoryA(GetSystemDirectory, MAX_PATH))
End Function
'***
Private Declare Function GetSystemDirectoryA _ Lib "kernel32" _ ( _ ByVal lpBuffer As String, _ ByVal nSize As Long _ ) As Long
Private Const MAX_PATH As Long = 260
Private Sub Main() Debug.Print GetSystemDirectory End Sub
Private Function GetSystemDirectory() As String GetSystemDirectory = String$(MAX_PATH, Chr$(0)) GetSystemDirectory = Left$(GetSystemDirectory, GetSystemDirectoryA(GetSystemDirectory, MAX_PATH)) End Function '***