我试图使用WindowsAPI来查找已安装应用程序的版本信息。我使用升级代码通过MsiEnumRelatedProductsapi找出产品代码,但是当我尝试使用产品代码使用MsiGetProductInfo时,版本信息作为垃圾返回。这是我的MsiGetProductInfoapi:[DllImport("msi.dll",CharSet=CharSet.Unicode)]privatestaticexternInt32MsiGetProductInfo(stringproduct,stringproperty,[Out]StringBuildervalueBuf,refInt32len