更新时间:2016-01-24 22:09:44浏览次数:1+次
Commonly, if this string is passed to a COM function as an [in] parameter, then this requires the caller to free the string. This can be done by using SysFreeString, as described in the Windows SDK. For more information, see Allocating and Releasing Memory for a BSTR.
如果是COM要传出字符串,基本上就只能使用AllocSysString函数了;如果是给COM传入一个字符串就没多大必要用这个函数了,这还会带来到底有谁释放的问题相关资讯