A very simple question, if i create a HANDLE in app1.exe and it gets value 0x01 is that value globally unique ?
Or is it possible that when some other process creates a HANDLE that also has value 0x01.
If they are not unique what other construct can i use to get a unique id compatible with handles (such that it will be impossible or highly unlikely that a HANDLE with that id is created anywhere else).
The important thing to understand is that handles are not objects. Handles are pointers (or indexes) to per-process object table. To answer your question, HANDLES are not globally unique, but they are scoped to only make sense inside a particular process.
For any kernel object to be able to be accessible from other process, you have to DuplicateHandle.
Another way to share objects across processes is to call CreateProcess with bInheritHandles set to true.