LoadImageW/LoadImageA in the metadata currently return a HANDLE type, which would be closed with CloseHandle.
However the docs state that one of DeleteObject, DeleteCursor or DeleteIcon should be used to release the handle, and only if the LR_SHARED flag was not passed in. The metadata returning HANDLE means CloseHandle will always be called, which is the wrong method and the wrong conditions.
How can we model this in the metadata?
LoadImageW/LoadImageAin the metadata currently return aHANDLEtype, which would be closed withCloseHandle.However the docs state that one of
DeleteObject,DeleteCursororDeleteIconshould be used to release the handle, and only if theLR_SHAREDflag was not passed in. The metadata returningHANDLEmeansCloseHandlewill always be called, which is the wrong method and the wrong conditions.How can we model this in the metadata?