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 I need:
int Decrunch(const BYTE *src, BYTE *dest, DWORD src_length)
*src is a sequence of bytes which will be decrypted by the function
*dest is a buffer which will recieve the decrypted data. I can call the function with dest=NULL and it will return the size of the decrypted data, so I can use it to create the buffer with the correct size.
I tried to declare it with both src and dest as Strings (like I do in Ruby) but it won't work. I've also tried to declare them as Byte and pass the first element of a byte array as I was pointed by some tutorials, but I think I didn't do it correctly.
Can someone help me with this?
Thank you!
Air code
Useful links
You can use a CDECL calling thunk like this