Temporary fix to trying to put a pointer in a DWORD
wine-devel at shemesh.biz
Sun Oct 17 16:37:57 CDT 2004
Vincent Béron wrote:
>Besides the fact that HIDWORD and LODWORD (typo in LODDWORD) do not
Yes, I was extrapolating on existing macros for readability.
> it looks fine as long as you don't actually compile it.
>Writing those two and compiling yields the error "initializer element is
Yes. You are right. If you try to cast them to "unsigned long long", you
get the compiler to reveal the true problem:
> keyboard.c:86: warning: initializer element is not computable at load time
Which is, I'm afraid, without solution. The compiler is not smart enough
to understand that the cast (or a shift of 32 bits) is not really a
mathematical operation, and will refuse to do it if it doesn't know the
exact value at compile time. I tried doing the same thing with pointer
arithmetics, but to no avail (the cast fails). I'm afraid this one
bested me. I don't see a clean solution to this one.
Lingnu Open Source Consulting ltd.
More information about the wine-devel