[TC9.0b7] WM_USER+50 with wparam 1011/1012 and no files

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, sheep, Hacker, Stefan2

Post Reply
User avatar
LonerD
Senior Member
Senior Member
Posts: 292
Joined: 2010-06-19, 20:18 UTC
Location: Donetsk

[TC9.0b7] WM_USER+50 with wparam 1011/1012 and no files

Post by *LonerD » 2016-07-27, 21:49 UTC

08.06.16 Added: Send WM_USER+50 with wparam set to 1011/1012 to get index of first file in list (-1 if there are no files) (32/64)

I get 4294967275 if there are no files in panel.
Windows 10 Home Edition SL
TC 9.0 beta 7 both 32 and 64 bits.
Last edited by LonerD on 2016-07-28, 17:38 UTC, edited 1 time in total.
Total Commander DreamLair - dream always, think totally, be the commander of you own life.

User avatar
LonerD
Senior Member
Senior Member
Posts: 292
Joined: 2010-06-19, 20:18 UTC
Location: Donetsk

Post by *LonerD » 2016-07-28, 17:33 UTC

Now I get 4294967275.

I use simple AHK script.
AutoHotKey v1.1.24.00 x32 + Total Commander 9.0 beta 7 both x32 and x64.

Code: Select all

#NoEnv
#NoTrayIcon
  SendMessage, 1074, 1011, 0, , ahk_class TTOTAL_CMD
  MsgBox, % ErrorLevel
ExitApp
All another new WM_USER+50 messages work good except 1011/1012.
Total Commander DreamLair - dream always, think totally, be the commander of you own life.

User avatar
chandragor
Junior Member
Junior Member
Posts: 77
Joined: 2005-06-01, 10:10 UTC
Location: Italy

Post by *chandragor » 2016-07-29, 08:09 UTC

Now I get 4294967275.
Maybe because 4294967275 == 0xFFFFFFFF == -1 in 32 bit sized integer math.
Or, put in another way:

0xFFFFFFFF == 4294967275 if considered as an unsigned 32 bits integer

0xFFFFFFFF == -1 if considered as a signed 32 bits integer
Happy owner of license #12422 since 1997

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36504
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2016-07-29, 10:27 UTC

Yes, the value is DWORD(-1) because 0 can be a valid index in the root of a drive.
Author of Total Commander
http://www.ghisler.com

User avatar
Lefteous
Power Member
Power Member
Posts: 9432
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2016-07-29, 10:57 UTC

Wouldn't that be 4294967295 instead of 4294967275?

User avatar
chandragor
Junior Member
Junior Member
Posts: 77
Joined: 2005-06-01, 10:10 UTC
Location: Italy

Post by *chandragor » 2016-07-30, 18:44 UTC

@Lefteous
Yep, you're right, it should be 4294967295. I just cut-and-pasted the number from LonerD message and I didn't notice it was different from what was written on Calculator display.

Now I wonder if LonerD made the same mistake or if he really gets 4294967275, i.e 0xFFFFFFEB == -21 as a signed integer...
Happy owner of license #12422 since 1997

Post Reply