Sign in to follow this  
Followers 0
rudi

DLLCall(): How to use it correctly for BLAT.DLL?

5 posts in this topic

Hi.

This is my first try to use DLLCall() :), so pls be patient >_<

The latest version of blat can be found here.

I've found a web page describing the use of BLAT.DLL for VB and V-Foxpro6 here.

So I tried this one, which doesn't work. The LOG file isn't created at all, so I suspect, that the DLL call itself doesn't work?

$teststring='-server 10.27.1.5 -f sender@foo.com -to admin@bar.com -bodyF c:\somebody.txt -subject "just a long subject with spaces" -priority 1 -attach C:\WINDOWS\system32\cmd.exe'

$debug = " -debug -log c:\blatdebug.log"

; this doesn't seem to work at all.
BlatCall($teststring & $debug)

; this one works.
BlatExe($teststring & $debug)


Func BlatExe($CMDstring)
    $result=RunWait("C:\temp\blat\blat262\full\blat.exe " & $CMDstring)
    MsgBox(0,"Exit Code",$result)
    Run ("notepad c:\blatdebug.log")
EndFunc



Func BlatCall($CMDstring)
    $BlatDLL="C:\temp\blat\blat262\full\blat.dll"
    $result=DllCall($BlatDLL,"int","send","str",$CMDstring)
    MsgBox(0,"Exit Code",$result)
    Run ("notepad c:\blatdebug.log")
EndFunc

What do I miss?

Regards, Rudi.


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

Share this post


Link to post
Share on other sites



Hi.

This is my first try to use DLLCall() :), so pls be patient >_<

The latest version of blat can be found here.

I've found a web page describing the use of BLAT.DLL for VB and V-Foxpro6 here.

So I tried this one, which doesn't work. The LOG file isn't created at all, so I suspect, that the DLL call itself doesn't work?

$teststring='-server 10.27.1.5 -f sender@foo.com -to admin@bar.com -bodyF c:\somebody.txt -subject "just a long subject with spaces" -priority 1 -attach C:\WINDOWS\system32\cmd.exe'

$debug = " -debug -log c:\blatdebug.log"

; this doesn't seem to work at all.
BlatCall($teststring & $debug)

; this one works.
BlatExe($teststring & $debug)


Func BlatExe($CMDstring)
    $result=RunWait("C:\temp\blat\blat262\full\blat.exe " & $CMDstring)
    MsgBox(0,"Exit Code",$result)
    Run ("notepad c:\blatdebug.log")
EndFunc



Func BlatCall($CMDstring)
    $BlatDLL="C:\temp\blat\blat262\full\blat.dll"
    $result=DllCall($BlatDLL,"int","send","str",$CMDstring)
    MsgBox(0,"Exit Code",$result)
    Run ("notepad c:\blatdebug.log")
EndFunc

I see fascists...

Share this post


Link to post
Share on other sites

two things

DllCall returns an array

DllCall function names are case sensitive

Thanks, it's working now.

I'm 100% sure that I've replied to your post before. Mentioning the question, that the case sensitivity of DLLCall() could be described in the description box on top of the help file for DLLCall() :)

Well, anyhow: >_< Thanks for pointing me to the right direction :idiot:

Regards, Rudi.


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

Share this post


Link to post
Share on other sites

Thanks, it's working now.

Well, anyhow: :idiot: Thanks for pointing me to the right direction :P

Regards, Rudi.

glad to help

I'm 100% sure that I've replied to your post before. Mentioning the question, that the case sensitivity of DLLCall() could be described in the description

box on top of the help file for DLLCall() :)

maybe you did, and they changed something in the Matrix >_<

I see fascists...

Share this post


Link to post
Share on other sites

maybe you did, and they changed something in the Matrix :)

Hooo, I'm shivering >_<

Regards, 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