Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Kernel32.GetModuleHandle should return IntPtr instead of SafeHandle #563

Closed
@HavenDV

Description

@HavenDV

The GetModuleHandle function returns a handle to a mapped module without incrementing its reference count. However, if this handle is passed to the FreeLibrary function, the reference count of the mapped module will be decremented. Therefore, do not pass a handle returned by GetModuleHandle to the FreeLibrary function. Doing so can cause a DLL module to be unmapped prematurely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions