hdc

Sharing HDC between different processes

南楼画角 提交于 2019-11-27 03:31:37
问题 I am writing some kind of IPC functionality and need to pass certain resources from one process to another. This works well for Pipe handles etc. which can be duplicated via DuplicateHandle. Now I need to pass a HDC from one process to the other. Is this even possible? If yes: how? Sub-Question: I am assuming passing window handles (HWND) from one process to the other is safe. Is this assumption correct? 回答1: All GDI handles are stored in a table that is mapped into every process. The entries