The MASM Forum

Microsoft 64 bit MASM => MASM64 SDK => Topic started by: bluedevil on September 01, 2022, 06:27:44 PM

Title: Handle Sizes
Post by: bluedevil on September 01, 2022, 06:27:44 PM
Hello

In 64bit windows all handles are also 64bit(8 bytes) right? Like HBITMAP, HBRUSH,HDDEDATA,HFILE,HFONT... Those handles are actually typedefs of HANDLE and so in 64bit architecture they are also 8bytes long.

My question is are there any exceptions?

PS: I have looked up here Windows Data Types (https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types)
Title: Re: Handle Sizes
Post by: bluedevil on September 01, 2022, 06:30:44 PM
typedef int HFILE;

OK HFILE is actually int. So it 's 4 bytes.
Title: Re: Handle Sizes
Post by: hutch-- on September 01, 2022, 07:02:33 PM
No, all handles in 64 bit ARE 64 bit, QWORD as the native data size.
Title: Re: Handle Sizes
Post by: bluedevil on September 01, 2022, 08:43:27 PM
Quote from: hutch-- on September 01, 2022, 07:02:33 PM
No, all handles in 64 bit ARE 64 bit, QWORD as the native data size.

Thank you hutch--, I am well aware of that. I only want to ask if anyone experienced any exceptions =)