Hi,
I have a DLL written by a friend that I am having difficulty getting to work in AMS 7.5. (I have gotten it to work in another program with similar function calling features and requirements, so it does work).
It's a Win 32 unmanaged code DLL written in C++ that can send SMTP mail.
Its only function is "SendEmailMessage" and all parameters are strings:
sHost, sUserName, sPassword, sPort, sFrom, sTo, sSubject, sFile, sBody. Items that are not specified can be represneted by "". If successful an empty string is returned, if unsuccessful, an error string is returned (the developer has said that it should work OK without a return/result specified).
I have tried several variations like the following, without success:
I've tried this with no "result" just by calling the function. I've tried this with all types of returns (string, long, etc.), both calling conventions, with and without quotes on the variables, plugging the actual variable values in, etc.Code:sHost = "xxxxserver.net" sUserName = "admin@xxxx.com" sPassword = "yyyyy" sPort = "25" sFrom = "admin@gggg.com" sTo = "info@gggg.com" sSubject = "xxRegistration" sFile = "" sBody = "" result = DLL.CallFunction("C:\\Users\\xxxx\\Documents\\AutoPlay Media Studio 7.0\\Projects\\AMS081409\\sendemail.dll", "SendEmailMessage", sHost, sUserName, sPassword, sPort, sFrom, sTo, sSubject, sFile, sBody, DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL); Dialog.Message("Notice", "Your message here.", result);
Nothing has worked, yet in the other program,it works, sending SMTP mail every time. So, my LUA syntax must be wrong somewhere.
Any suggestions, help would be appreciated.
Kind Regards,
SGW

Reply With Quote

