PowerShell: how to convert a COM object to an .NET interop type?

前端 未结 2 2032
南方客
南方客 2020-12-07 02:14

As described in my question Create ISO image using PowerShell: how to save IStream to file?, in PowerShell I create an IStream object as follows:

$is = (New-         


        
2条回答
  •  Happy的楠姐
    2020-12-07 03:02

    You can't make this work. PowerShell uses a transparent "com adapter" layer that prevents this from working, but enables late binding in script. For the majority of cases this a Good Thing, but not in yours.

提交回复
热议问题