Bonjour à tous,

J'utilise l'API

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
Private Declare PtrSafe Function StrFormatByteSizeW Lib "shlwapi" 
                                                     (ByVal qdwLow As Long,_
                                                      ByVal qdwHigh As Long,_
                                                      pwszBuf As Any,_
                                                      ByVal cchBuf As Long) As Long
 
Private Declare PtrSafe Function StrFormatByteSize Lib "shlwapi" Alias _
                        "StrFormatByteSizeA" (ByVal dw As Long, _
                                              ByVal pszBuf As String, _
                                              ByVal cchBuf As Long) As Long
Mais mon code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
  sSize = Space$(30)
           ....
           If MatchSpec(WFD.cFileName, fp.sFileNameExt) Then
                     lSize = WFD.nFileSizeLow + WFD.nFileSizeHigh
                     Call StrFormatByteSizeW(lSize, ByVal StrPtr(sSize), 30)
                     Call StrFormatByteSize(lSize, ByVal StrPtr(sSize), 30)...
ne renvoie pas rien

Merci pour votre aide