Hi Rajat,
Thanks

, but I'm more of a "Basic" programmer (usually). I'd be glad to help if I can though... I haven't looked through the source code much yet (It does seem to load into Dev-C++ 4.9.9.2 ok though) but here's a guess at how to call the .dll (after a bit of trial and lots of errors) that
seems to work ok. Maybe a starting point?...
Code:
VarSetCapacity(StrOut, 2048)
; Load the .dll for speed (optional, but might be improve speed if this
; is used in a function to encode a file one line at a time)
hModule := DllCall("LoadLibrary", "str", "blowfish.dll","UInt")
if !hModule
{
MsgBox Error: Can't load DLL.
Exit
}
; -- Here's a guess at the .dll's usage --
; The first string before space is the key to be used.
; The string after the first space is the string to be encrypted/decrypted
; The function will return the encrypted string to the same variable
; The first string in the variable will be the result of the call ( +OK if it worked ok )
; Return Value - seems to always return 3
; Use of return value = unknown (returns crap ?)
; Preserve spacing
AutoTrim, Off
; Key to use for Encryption/Decryption (no spaces)
b_Key = MyTestKey
; String to encode
b_String := " This is a test. Here is my test string. Interesting..."
MsgBox, Key to use: %b_Key%`nString to Encrypt: %b_String%
; String to use in the call (string enclosed in quotes in attempt to preserve spaces if any)
; key + space + string to encode
StrOut = %b_Key%%A_Space%"%b_String%"
; Call the function to encode & display output
Ret1 := DllCall("blowfish.dll\Encrypt", "str", "aircdll.dll", "str", "Encrypt", "str", StrOut, "Cdecl")
MsgBox, ErrorLevel: %ErrorLevel%`nReturnValue: %Ret1%`nStrOut variable: %StrOut%
; Remove +OK from the output
StringTrimLeft, StrOut, StrOut, 4
; String to use to decode (key + space + encoded string)
StrOut = %b_Key%%A_Space%%StrOut%
; Call the function to decode & display output
Ret1 := DllCall("blowfish.dll\Decrypt", "str", "aircdll.dll", "str", "Decrypt", "str", StrOut, "Cdecl")
; Remove +OK and left "
StringTrimLeft, StrOut, StrOut, 5
; Remove right "
StringTrimRight, StrOut, StrOut, 1
MsgBox, ErrorLevel: %ErrorLevel%`nReturnValue: %Ret1%`nStrOut variable: %StrOut%
; Free the library if LoadLibrary option was used
DllCall("FreeLibrary", "UInt", hModule)
; Don't preserve spacing
AutoTrim, On