Talk:Windows Programming/Handles and Data Types

" HANDLES are defined as being unsigned 32-bit quantities in , but HANDLES should never be used like integers. They are unique identifiers, and if you edit them, or use them in arithmetic, then they can never be used to get the table entry that they correspond to. In other words, HANDLES should be stored, but they should never be changed by the programmer. "

I dont know much assembly, or what goes on in the win32.dll, but in the c++ WinNT.h Header file a HANDLE is defined as a pointer. I think it should be mentioned in some form that handles are pointers.

Im not going to quote code from WinNT.h, but its worth having a look.

Handles should not be considered as pointers. They are "opaque" identifiers, i.e. Windows knows what they are, but developers are not supposed to use them directly to find anything in the system except throught documented API functions.113.151.206.174 (discuss) 03:53, 26 August 2012 (UTC)

- the typedef of HANDLE is (ultimately) void*, which means that on 64 bit Windows it's 64 bits wide not 32 as stated on this page. See http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx

Handles can also refer to threads and files. My question is: which types of handle need to be closed when you are done with them?113.151.206.174 (discuss) 03:47, 26 August 2012 (UTC)