I have an old C DLL I use to call from Ruby, but now I need to call it from VB6 and I can\'t figure out the correct way to do so.
Here is the header for the function
Air code
Private Declare DecrunchGetLength Alias "Decrunch" Lib "somedll.DLL" (ByRef src As Byte, ByVal nullptr As Long, ByVal SrcLength As Long) As Long
Private Declare Decrunch Alias "Decrunch" Lib "somedll.DLL" (ByRef src As Byte, ByRef dest As Byte, ByVal SrcLength As Long) As Long
Dim destLen As Long
Dim src(0 To 9) As Byte
Dim dest() As Byte
' get bytes into src somehow
' get dest length
destLen = DecrunchGetLen( src(0), 0, 10)
ReDim dest(0 To destLen - 1)
destLen = Decrunch( src(0), dest(0), 10)
Useful links