开发者

Do HMONITORs need to be released? If so, how?

开发者 https://www.devze.com 2023-02-06 01:28 出处:网络
Several multiple-monitor API functions (eg, MonitorFromRect) return a HMONITOR handle to the monitor in question. I have been unable to find the function to free this handle - does 开发者_JS百科it nee

Several multiple-monitor API functions (eg, MonitorFromRect) return a HMONITOR handle to the monitor in question. I have been unable to find the function to free this handle - does 开发者_JS百科it need to be freed, and if so, how should I free it?


The SDK docs always explicitly mention how a handle needs to be released. Nothing for HMONITOR, you are just getting a handle to an internal object that's around anyway.


Microsoft's Example program doesn't try to free the handle. While their examples might not be perfect, they are a good indication of the way a function is meant to be used.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号