Download KLExtensions source from www.o-townnet.tk. Then get PowerBASIC Windows compiler 7 from eMule. There is a file called hash.inc in the sources. Add to the biginning of the file:
The replace the line:
#compile dll "hash.dll"
Function GetHash(ByVal sFileName As String, ByVal pbHash As Byte Ptr) As Long
Then compile. It will generate a dll file called hash.dll.
Function GetHash(ByVal sFileName As String, ByVal pbHash As Byte Ptr) Export As Long
The Visual Basic Declare should look as :
Declare Function GetHash LIB "Hash.dll" (sFileName As String, ByRef pbHash As Byte) As Integer
To encode to Base64 there is a function called Encode_BASE64 that do the job.
Dim sFile as String
Dim bHash(1 To 20) as Byte
sFile = "MyFile.dat"