如何通过ProgID查找COM对象的dll路径?

时间:2017-03-22 08:22:38

标签: progid

如何通过ProgID查找COM对象的dll路径?

myCOMobject = CreateObject(“SomeProgID”)

如何使用myCOMobject查找已注册的COM服务器的dll路径?

1 个答案:

答案 0 :(得分:0)

也许:

func cropImage(toRect rect:CGRect) -> UIImage? {
    var rect = rect
    rect.origin.y = rect.origin.y * self.scale
    rect.origin.x = rect.origin.x * self.scale
    rect.size.width = rect.width * self.scale
    rect.size.height = rect.height * self.scale

    guard let imageRef = self.cgImage?.cropping(to: rect) else {
        return nil
    }

    let croppedImage = UIImage(cgImage:imageRef)
    return croppedImage
}