Microsoft Windows CE 3.0  

WriteBSTR

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Allocates and fills a task-allocated BSTRstring.

STDAPI WriteBSTR(
BSTR *
pstrDest
,
LPCWSTR
szSrc
);

Parameters

pstrDest
Pointer to where the address of the allocated BSTRwill be stored.
szSrc
Wide (Unicode) string that will be copied to the newly allocated BSTRstring.

Return Values

Returns an HRESULTvalue.

Remarks

Memory is allocated for passing between objects across interfaces by calling CoTaskMemAlloc. It is freed by calling CoTaskMemFree. By using a central memory allocator, memory can be allocated, passed, and freed safely between objects created in different programming languages.