[Win32utils-devel] win32-api on Windows 7
phasis at gmail.com
Fri Jan 29 23:54:15 EST 2010
2010/1/30 Daniel Berger <djberg96 at gmail.com>:
> I just received and installed my copy of Windows 7 Ultimate. Pretty slick.
> I went with the 64 bit version. It seems to be what most people out
> there have installed. Plus, I figured it would be the most
> problematic, so I may as well get ready to deal with the potential
> So far I've had 1 bug with sys-uname (already fixed).
> I decided to give win32-api a shot:
> win32/api.c:565: warning: cast to pointer from integer of different size
> rb_raise(cAPIProtoError, "Illegal prototype '%s'",
> I'm not sure I understand the warning in this case. Anything I need to
> be worried about?
The real problem is that sizeof(long) != sizeof(void*) on Windows 64 bit.
On Windows 64bit, data size is:
sizeof(char) = 1
sizeof(short) = 2
sizeof(int) = 4
sizeof(long) = 4
sizeof(float) = 4
sizeof(double) = 8
sizeof(void*) = 8
sizeof(size_t) = 8
For detail, refer to http://msdn.microsoft.com/en-us/library/aa505945.aspx
The whole win32utils assumed sizeof(long) = sizeof(void*) = 4.
Thus, win32utils package is compatible with 32 bit.
Another win64utils is required for 64 bit :)
More information about the win32utils-devel