Voila un fonction vb que je n'arrive pas a passer w langage:
en gros il faut convertir un long en une chaine binaire
Function LongToBytes(ByVal Value As Long) As String
' Convert long value to string of bytes.
' IN: Value, long value
' OUT: LongToBytes, string with long value converted to bytes
' Known bugs:
' Version Date Who Comment
' 00.00.000 010715 CFO Created
'**********************************************************************
***
Dim lsHex As String, i As Integer
Dim cHexa As String
lsHex = Right("00000000" & Hex(Value),
For i = 1 To 7 Step 2
cHexa = "&H" & Mid(lsHex, i, 2)
LongToBytes = ChrB(CInt(cHexa)) & LongToBytes
Next
End Function