求助,GlobalAlloc函数到底返回什么值?(不知道具体应该发到哪个小类,如果发错了请见谅!)
大家好,我在一本书上看到对于GlobalAlloc()函数的解释:
“如果内存申请失败,eax 返回 NULL,否则返回只是一个指向内存块的起始地址的指针,用户需要保存这个指针,在使用内存或者释放内存的时候还要用到它”
而查阅MSDN得到如下结果:
Return Values:
If the function succeeds, the return value is a handle to the newly allocated memory object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
----------
请教高手,这里到底返回句柄还是指针???请指教一下,谢谢啦!