What is the basic difference between a HANDLE and a pointer?
Why do windows need handles, why can't it manage with pointers to structures??
What is the basic difference between a HANDLE and a pointer?
Why do windows need handles, why can't it manage with pointers to structures??
If you want to ask what the programmer's intent was, you're not likely to get good answers from a forum posting...
But you could try emailing Microsoft and asking them why they made certain mysterious decisions.
Your best bet is to do what the rest of us do... work with it as it is.
ya, but there must be some reason why microsoft switched on to using HANDLES, rather than mere pointers to structures and I think its worth knowing.
If you give access via pointers then you run the risk of exposing the underlying data structures to unwanted examination and/or modification (which could pose a serious threat to system security, etc), whereas handles provide an "opaque" identifier which can only be accessed via API calls. There are other reasons, too, such as the fact that it prevents API's from being broken when the underlying data structures have to be changed and whatnot.