How can I tell if a Windows module handle is still valid?

Posted by spacedog on Stack Overflow See other posts from Stack Overflow or by spacedog
Published on 2009-07-10T20:31:12Z Indexed on 2010/05/12 19:24 UTC
Read the original article Hit count: 187

Filed under:
|
|
|

A module can be unloaded, so how can I tell for sure if it is still in memory? I have a handle to it, obtained from GetModuleHandle. When I tried calling GetHandleInformation on it I see error 0xc0000008 - "An invalid HANDLE was specified." This happened before it could have been unloaded.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about handle