Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Blitz => Topic started by: Devils Child on June 14, 2008

Title: Need help wrapping a DLL to Blitz
Post by: Devils Child on June 14, 2008
hi!

recently i wanted to wrap a dll (see below). since i don't know much about wrapping i wasn't able to do it. the dll creates hashes (eg. MD5 SHA-256 etc...) out of files.

thread: http://xprofan.com/xprofan/h/hashdll-5930-0.html
download the dll: http://xprofan.com/download.php?id=2883

here is what i've tried and what didn't work: http://www.dev-ch.de/upload/files/Devils%20Child/HashTest.zip

i would be very glad if someone could look at this and help me out :) !
thanks :)
Title: Re: Need help wrapping a DLL to Blitz
Post by: rain_storm on June 14, 2008
There is only one function in that DLL and its called testit not CreateHash, This makes me wonder if MultiHash.decls should be rewritten from this
Code: [Select]
.lib "MultiHash.dll"
CreateHash$(file$, algorithm$):"testit"
to this
Code: [Select]
.lib "MultiHash.dll"
CreateHash$(file$, algorithm$):"CreateHash"
Title: Re: Need help wrapping a DLL to Blitz
Post by: Devils Child on June 14, 2008
well maybe it's because the function's name is "testit"... write an email to the author of the dll if you want him to change the name. i personally just want to wrap it...
Title: Re: Need help wrapping a DLL to Blitz
Post by: Rbz on June 16, 2008
I've tried to use that dll with VC++2005 and got same problem, it crashes after displaying result.
I think that best way is to contact the author and asking what could be wrong...  :-\
Title: Re: Need help wrapping a DLL to Blitz
Post by: Devils Child on June 16, 2008
thanks for any help!
the problem has been solved by adding a string parameter in the decls.
Title: Re: Need help wrapping a DLL to Blitz
Post by: rain_storm on June 16, 2008
Im glad you got to the bottom of it mate,  :)