Austin English austinenglish@gmail.com wrote:
+33 stdcall CryptUIWizDigitalSign(long ptr wstr ptr ptr)
Appropriate .spec type for HWND is not ptr.
On 2015-02-11 10:24, Dmitry Timoshkov wrote:
Austin English austinenglish@gmail.com wrote:
+33 stdcall CryptUIWizDigitalSign(long ptr wstr ptr ptr)
Appropriate .spec type for HWND is not ptr.
300 DECLARE_HANDLE(HWND);
561 #define DECLARE_HANDLE(a) typedef struct a##__ { int unused; } *a
Pretty sure it is? ;)
Thomas Faber thomas.faber@reactos.org wrote:
+33 stdcall CryptUIWizDigitalSign(long ptr wstr ptr ptr)
Appropriate .spec type for HWND is not ptr.
300 DECLARE_HANDLE(HWND);
561 #define DECLARE_HANDLE(a) typedef struct a##__ { int unused; } *a
Pretty sure it is? ;)
This has nothing to do with neither .spec file conventions, nor real win32 types.
This was surprising to me as well, but apparently we are using long for HWND in spec files.
It'd be nice to hear about why we do this (and why it's safe for us to do this) when HWND is a pointer-sized type, instead of a repeated assertion of "this is wrong", when it was a reasonable thing for someone unaware of this rule to expect. I have some guesses, but I'd rather hear from someone who knows about it.
Vincent Povirk madewokherd@gmail.com wrote:
This was surprising to me as well, but apparently we are using long for HWND in spec files.
It'd be nice to hear about why we do this (and why it's safe for us to do this) when HWND is a pointer-sized type, instead of a repeated assertion of "this is wrong", when it was a reasonable thing for someone unaware of this rule to expect. I have some guesses, but I'd rather hear from someone who knows about it.
Because window handles (and other user32 objects as well) are not pointers by theire nature. Microsoft has invented a way to distiguish various handles at compile time using a trick with defining a pointer to a dummy structure, but once again that has nothing to do with real handles meaning.