Functions COM functions SysAllocString / SysFreeString require calling CoInitialize?

Is COM initialization required to use SysAllocString, SysFreeString, and other BSTR processing functions?

MSDN says

You need to initialize the COM library in the stream before you call any of the library functions except CoGetMalloc

It seems to me that the BSTR distribution functions use IMalloc, and therefore no COM init is required?

+4
source share
1 answer

I can't find the official documentation that says you can call these functions without initializing COM, but I can take you on the way down the memory strip for some nice observations.

Windows 95 4 , Explorer ole32.dll. , - COM, , , SH *, Co *, COM/OLE.

, mini-COM 100% Windows XP , , , -COM.

, , Windows 2000 IShellFolder2 (GetDetailsEx) VARIANT. VARIANT BSTR! IColumnProvider:: GetItemData VARIANT.

, Windows 2000 BSTR CoInitialize, SHGetDesktopFolder IShellFolder , .

, , :

  • Windows 2000 -COM?
  • IShellFolder2 shell32.dll COM, ?

, IShellFolder2 IColumnProvider , Explorer ( ?), , COM.

, , , - Windows 2000.

0

Source: https://habr.com/ru/post/1659335/


All Articles