Sign in to follow this  
Followers 0
Shy

DllCall stopped working on v3.2.8.1

5 posts in this topic

I have a dll created for me that preforms some features I can't do with autoit.

Ever since moving to the latest version the dll returns a weird value.

I've checked the dll and it functions correctly, the older version returns the correct value but the newer version returns gibrsih.

This is one of the functions that I use to call the dll:

; ---------------------------------------------------------------------------------------------------------------------------------------------

; This functions calls a dll to check if the drive is formatted as NTFS and returns if it have permissions = everyone

; ---------------------------------------------------------------------------------------------------------------------------------------------

Func GetNTFSStatus ($DriveRoot)

DllCall ($DLLName, "long", "GetNTFSStatus", "string", $DriveRoot, "ptr", DllStructGetPtr($stOutput), "dword", DllStructGetSize($stOutput))

checkDLLError (@error, "GetNTFSStatus")

return ParseOutput()

EndFunc

; ---------------------------------------------------------------------------------------------------------------------------------------------

; Takes the response from the dllcall and returns something I can use.

; ---------------------------------------------------------------------------------------------------------------------------------------------

Func ParseOutput ()

$st = DllStructGetData($stOutput, 1)

$pos = stringinstr($st,chr(0))

if $pos>0 then

return StringLeft ( $st, $pos-1)

Else

return $st

EndIf

EndFunc

another thing that stopped working is the ftp.au3 file I've been using (available from http://www.autoitscript.com/forum/index.ph...&hl=ftp.au3 )

Has anyone encountered or knows how to solve this issue?

Thanks

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

I have a dll created for me that preforms some features I can't do with autoit.

Ever since moving to the latest version the dll returns a weird value.

I've checked the dll and it functions correctly, the older version returns the correct value but the newer version returns gibrsih.

This is one of the functions that I use to call the dll:

There have been a lot of changes to DLL calls in recent AutoIt Beta versions -- they are, after all, Beta versions. If it works fine in Prod (3.2.8.1), stick with that.

Edit: If you need to work with the Betas, look carefully at the change logs. You'll probably find a minor change to one of your parameter types used in DllOpen() or DllCall().

another thing that stopped working is the ftp.au3 file I've been using (available from http://www.autoitscript.com/forum/index.ph...&hl=ftp.au3 )

Has anyone encountered or knows how to solve this issue?

Thanks

Did you open the DLL before making the call to _FTP* functions as in this post?

$dllhandle = DllOpen('wininet.dll')

:P

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Hi, Thanks for the response, however I was still unable to make it work.

There have been a lot of changes to DLL calls in recent AutoIt Beta versions -- they are, after all, Beta versions. If it works fine in Prod (3.2.8.1), stick with that.

Edit: If you need to work with the Betas, look carefully at the change logs. You'll probably find a minor change to one of your parameter types used in DllOpen() or DllCall().

I am using the the 3.2.8.1 version, and they are not acting the same.

Comparing an older version to the newer version I could see that autoit just returns a different value on the newer version.

Did you open the DLL before making the call to _FTP* functions as in this post?

$dllhandle = DllOpen('wininet.dll')

:P

I am accessing the file without an handle, so it is unnecessary, however, I tested it with the handle as well and the result is the same.

Share this post


Link to post
Share on other sites

Hi, Thanks for the response, however I was still unable to make it work.

I am using the the 3.2.8.1 version, and they are not acting the same.

Comparing an older version to the newer version I could see that autoit just returns a different value on the newer version.

I am accessing the file without an handle, so it is unnecessary, however, I tested it with the handle as well and the result is the same.

Wouldn't DriveGetFileSystem function do the work you require for the NTFS check?


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

I am accessing the file without an handle, so it is unnecessary, however, I tested it with the handle as well and the result is the same.

Actually the ftp stuff is somewhat unique in that regardless of whether you are using handles or not, you must DllOpen the file. Something about keeping the dll loaded.. can't quite recall.

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