Use the As AliasName clause when declaring the method in the dll. Then you won't need to deal with case.
>From the VFP help: AS AliasName Specifies an alias name for a shared library function name that has the same name as a Visual FoxPro function or is not a legal Visual FoxPro name. AliasName should not be a Visual FoxPro reserved word or the name of a shared library function already registered with Visual FoxPro. If you assign alias to the function, use the alias when calling the shared library function. AliasName is not case-sensitive. HTH, Tracy -----Original Message----- From: ProfoxTech [mailto:[email protected]] On Behalf Of Fernando D. Bozzo Sent: Thursday, June 28, 2018 1:51 PM To: [email protected] Subject: Re: VFP9 and Blat Hi, I see 2 things: 1) Macrosubstitution is not needed: (not an error, but error prone sometimes) DECLARE INTEGER Send in &dll_name STRING blatstring could be: DECLARE INTEGER Send in (dll_name) STRING blatstring 2) Bad capitalization of the function: lnresult = send(lcstring) should be: lnresult = Send(lcstring) The capitalization of "Send" (and any DLL function) should be keept in all the code. At least this is a problem with many Win32 API functions, and I apply it for any DLL function. Other than this: - Could be a permissions problem in the server - ¿Some dependant C++ runtime? Regards, Fernando D. Bozzo.- 2018-06-28 19:31 GMT+02:00 Desmond Lloyd <[email protected]>: > Good Morning all, > > Have been using Blat here at work for years. Essentially modifying the > code as the need arose. now have a client that I would like to use it on, > but for some reason it always returns a code 1 in the new environment but > works fine here at work... > > Would someone please look at the sample below to see what I might be > missing? > > LPARAMETERS lcsubject, lcbody, lcrecipient, lcfrom, lccopyto > > lcFrom = '[email protected]' > > *lcfrom = '[email protected]' > > lcSubject = 'Email Test' > > set Safety off > > lcBody = 'This is a Test of an automated email system. Third Test. Would > you Please reply if received'+ CHR(13) + CHR(10) + CHR(13) + CHR(10) > > lcRecipient = '[email protected]' > > STRTOFILE(lcbody, "Body.txt") > > lcstring = 'C:\Body.txt -s "' + lcsubject + '" -to ' + lcrecipient + ' -f ' > + lcfrom + ' -u '+'dlloyd'+' -pw '+'password'+ ' -server > '+'192.168.999..62' > > dll_name = "blat.dll" > > DECLARE INTEGER Send in &dll_name STRING blatstring > > lnresult = send(lcstring) > > IF lnresult > 0 > > wait window 'Result: '+alltrim(str(lnREsult)) > > ENDIF > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

