If I understand correctly then rtmetadata.ahk line 213 calls IMetaDataImport::CloseEnum which expects a pointer-sized HCORENUM hEnum, so that line should be args.__delete := args => ComCall(3, this, "ptr", henum, "int") instead. Passing it as "int" was causing me memory read-write errors in x64.