What is a handle in C++?

后端 未结 7 1186
眼角桃花
眼角桃花 2020-11-29 16:55

I have been told that a handle is sort of a pointer, but not, and that it allows you to keep a reference to an object, rather than the object itself. What is a more elaborat

相关标签:
7条回答
  • 2020-11-29 17:44

    HANDLE hnd; is the same as void * ptr;

    HANDLE is a typedef defined in the winnt.h file in Visual Studio (Windows):

    typedef void *HANDLE;
    

    Read more about HANDLE

    0 讨论(0)
提交回复
热议问题