On Mon, 15 Feb 2021, Dmitry Timoshkov wrote: [...]
Window handles are not pointers, please avoid gratuitous changes in the diffs.
include/windef.h:#ifndef NO_STRICT include/windef.h:# ifndef STRICT include/windef.h:# define STRICT include/windef.h:# endif /* STRICT */
So Wine compiles with STRICT.
include/winnt.h:#ifdef STRICT include/winnt.h:#define DECLARE_HANDLE(a) typedef struct a##__ { int unused; } *a include/winnt.h:#else /*STRICT*/ include/winnt.h:#define DECLARE_HANDLE(a) typedef HANDLE a include/winnt.h:#endif /*STRICT*/
And DECLARE_HANDLE() creates pointer types.
So from the compiler point of view they are pointers.
From an implementation point of view... well, that's irrelevant:
handle-using code is not supposed to care about how handles are implemented.