Hi, A DWORD is declared as: typedef unsigned long DWORD; However, the docs also say that it''s a 32-bit unsigned integer. The range is 0 through 4294967295 decimal. When using FFI should I declare a DWORD as :ulong or :uint? Regards, Dan
Hi, 2012/4/11 Daniel Berger <djberg96 at gmail.com>> Hi, > > A DWORD is declared as: typedef unsigned long DWORD; > > However, the docs also say that it''s a 32-bit unsigned integer. The > range is 0 through 4294967295 decimal. > > When using FFI should I declare a DWORD as :ulong or :uint? > > >I think DWORD should be :ulong. In the header file WinDef.h of Platform SDK, I can see typedef unsigned long DWORD; Also refer to python''s wintypes.py http://coverage.livinglogic.de/Lib/ctypes/wintypes.py.html Regards, Park Heesob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20120411/8e023b0b/attachment.html>
On Tue, Apr 10, 2012 at 9:48 AM, Heesob Park <phasis at gmail.com> wrote:> Hi, > > 2012/4/11 Daniel Berger <djberg96 at gmail.com> >> >> Hi, >> >> A DWORD is declared as: typedef unsigned long DWORD; >> >> However, the docs also say that it''s a 32-bit unsigned integer. The >> range is 0 through 4294967295 decimal. >> >> When using FFI should I declare a DWORD as :ulong or :uint? >> >> > > I think DWORD should be :ulong. > > In the header file WinDef.h of Platform SDK, I can see > > typedef unsigned long ? ? ? DWORD; > > Also refer to python''s > wintypes.py?http://coverage.livinglogic.de/Lib/ctypes/wintypes.py.htmlOk, thanks, that''s what I''ve been using. Regards, Dan