Sign in to follow this  
Followers 0
rudi

DLL newbie: failing to use blat.dll

10 posts in this topic

Hi.

If I did read the documentation for _inetsmtpmail() correctly, there is no possibility to set the priority to high, nor to attach files, right?

So I was wondering to use BLAT instead, as I did before, but this time I wanted to use BLAT.DLL instead of BLAT.EXE :x

Working with DLLs is quite new to me...

BLAT.EXE is working fine, but requires a fileinstall(). Therefore I was doing some testing to use BLAT.DLL instead, as it can be called from memory by using

I derived my dllcall() from this posting at the autohotkey forum.

$DLL = "C:\temp\blat.dll"
$EXE = "C:\temp\blat.exe"

$teststring = '-subject "see logfile attached" -to admin@10.27.1.5 -attach c:\ds4700-error.log -body "Check attached log file for new errors!" -server 10.27.1.5 -f blat@10.27.4.6 -priority 1'

$result = RunWait($EXE & " " & $teststring) ; this works fine.
ConsoleWrite($result & @CRLF) ; returns 0

$result = DllCall($DLL, "str", "send", "str", $teststring)  ; this doesn't work
ConsoleWrite($result & @CRLF) ; returns 0 as well??

What do I miss? (propably something extremly basic, I guess....)

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi.

Are you sure that you have the right return type in the DllCall?

Although a DllCall would be easier, have you looked at this UDF?

I'll read up that one, too. Thanks!

EDIT: I believe the return type should be "int".

Exacty!

; [snip]
$result = DllCall($DLL, "int", "send", "str", $teststring)  ; this DOES work
ConsoleWrite($result & @CRLF)

How to investigate the return type, a DLL will give back?

And another Q: BLAT.DLL opens a CMD line box for 1-2 seconds: How to suppress that one? DLLCall() doesn't offer an option to specify @SW_HIDE...

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

If I did read the documentation for _inetsmtpmail() correctly, there is no possibility to set the priority to high, nor to attach files, right?

So I was wondering to use BLAT instead, as I did before, but this time I wanted to use BLAT.DLL instead of BLAT.EXE :x

You are wrong!

_inetsmtpmail() supports attachments and also Importance of mail.

Priority can be easily added too, see my today's post in UDF's topic.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You are wrong!

_inetsmtpmail() supports attachments and also Importance of mail.

Priority can be easily added too, see my today's post in UDF's topic.

Hm: Reading up the Autoit 3.3.6.1 documentation once more, for _INetSmtpMail() I honestly cannot see anything covering attachments or importance (priority)....

Your UDF is already downloaded, on my way to use it :x

I do not get the meaning of the URLs you address within your UDF:

$objEmail.Configuration.Fields.Item ("<URL>") = ...
<URLs:>
http://schemas.microsoft.com/cdo/configuration/smtpserver
http://schemas.microsoft.com/cdo/configuration/smtpserverport
...

What do they do?

I found this one at MSDN, but don't really understand it...

Is that something like the "about: ..." URLs for firefox?

Is a certain IE version required?

Thanks for sharing that UDF, regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

You don't need to understand inner workings, just use it. It works well.

:x need != want :P

Never mind, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

OK.

Thanks Zedna JOS, for sharing that UDF :x

Regards, Rudi.

PS: still curious, what these URL type thing is basically for...


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

this one may be a little more helpful

http://msdn.microsoft.com/en-us/library/ms870485%28v=EXCHG.65%29.aspx


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

this one may be a little more helpful

http://msdn.microsoft.com/en-us/library/ms870485%28v=EXCHG.65%29.aspx

Thanks! Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0