Sign in to follow this  
Followers 0
wraithdu

Proposed Change to _WinAPI_HiWord()

8 posts in this topic

#1 ·  Posted (edited)

Considering the discussion a few weeks ago about BitShift being a *signed* shift in AutoIt, shouldn't the _WinAPI_HiWord function, and indeed all UDF functions where a DWORD needs to be split into hi and lo words by any means (the _WinAPI_HiWord function or manually via BitShift), be changed accordingly:

Func _WinAPI_HiWord($iLong)
    Return BitAND(BitShift($iLong, 16), 0xFFFF)
EndFunc   ;==>_WinAPI_HiWord

While an error likely won't occur very often, this is the only way to assure we are getting the correct hi word result, unless AutoIt changes the way it does BitShift to be unsigned.

Edited by wraithdu

Share this post


Link to post
Share on other sites



There is a dirty workaround here


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

I wanted to get some opinions first... seems no one really cares. I'll create a ticket and leave it up to the devs.

Share this post


Link to post
Share on other sites

I wanted to get some opinions first... seems no one really cares. I'll create a ticket and leave it up to the devs.

There is a ticket already open for that and similar 32-64 bit issues. Valik has already discussed that. A recent beta/release has brought integral Mod() -- instead of approximate floating point operation. So things are already underway. As I understand it, a complete rewamp of all these aspects involves significant work and may need more time. I just wanted to fill a little gap in the interim.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Well, but this is an interim change to the winapi UDF... not sure if they will want to make that change until the AutoIt internal changes are finished or not. I think they should, but it's up to them.

Share this post


Link to post
Share on other sites

I am not a fan of temporary changes. If we know something isn't a final change going into it, what's the point deviating from the current behavior when it's all going to change again?

Share this post


Link to post
Share on other sites

Ack. You can delete my feature request ticket then. Wish I'd seen your reply 10 minutes ago...

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