totally confused about UINT_PTR
-
can someone please explaing what type is UINT_PTR. Is it pointer to unsigned integer or just an alias for unsigned integer? :~ after looking in basetsd.h file I found it is defined as : typedef _W64 int INT_PTR; so it seems it is unsigned integer, but then why people at microsoft has choosen such an ambiguous name for it or is it just PTR doesnt mean pointer and I am misinterpreting it. :^) thanks -Saurabh -- modified at 4:03 Friday 4th November, 2005
-
can someone please explaing what type is UINT_PTR. Is it pointer to unsigned integer or just an alias for unsigned integer? :~ after looking in basetsd.h file I found it is defined as : typedef _W64 int INT_PTR; so it seems it is unsigned integer, but then why people at microsoft has choosen such an ambiguous name for it or is it just PTR doesnt mean pointer and I am misinterpreting it. :^) thanks -Saurabh -- modified at 4:03 Friday 4th November, 2005
Use INT_PTR and UINT_PTR when casting a pointer to something else and you want to express that it's casted to something with the same size as a pointer. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/the_new_data_types.asp[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_data_types.asp[^] -- The Blog: Bits and Pieces
-
can someone please explaing what type is UINT_PTR. Is it pointer to unsigned integer or just an alias for unsigned integer? :~ after looking in basetsd.h file I found it is defined as : typedef _W64 int INT_PTR; so it seems it is unsigned integer, but then why people at microsoft has choosen such an ambiguous name for it or is it just PTR doesnt mean pointer and I am misinterpreting it. :^) thanks -Saurabh -- modified at 4:03 Friday 4th November, 2005
Like Johann said, it's used to treat a pointer as an UINT. There's INT_PTR, which treats the pointer as an INT and so on. Pretty useful for writing platform independent code. Simply casting a pointer to unsigned int won't work on a 64 bit platform, for example. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
can someone please explaing what type is UINT_PTR. Is it pointer to unsigned integer or just an alias for unsigned integer? :~ after looking in basetsd.h file I found it is defined as : typedef _W64 int INT_PTR; so it seems it is unsigned integer, but then why people at microsoft has choosen such an ambiguous name for it or is it just PTR doesnt mean pointer and I am misinterpreting it. :^) thanks -Saurabh -- modified at 4:03 Friday 4th November, 2005