EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

UtilStringCopyWithAlloc function

The UtilStringCopyWithAlloc function allocates and copies a source string.

Syntax


HRESULT UtilStringCopyWithAlloc(
  _Out_  LPWSTR *Buffer,
  _In_   UINT BufferMax,
  _In_   LPCWSTR Source
);

Parameters

Buffer [out]

Type: LPWSTR*

The location where the pointer to the allocated memory is stored. When no longer needed, it must be released with CoTaskMemFree. This buffer is always null-terminated.

BufferMax [in]

Type: UINT

The maximum number of characters to read from Source.

Source [in]

Type: LPCWSTR

The string to be copied.

Return value

Type: HRESULT

Possible return values include, but are not limited to, the following.

Return codeDescription
S_OK

The operation succeeded.

E_INVALIDARG

One or more parameters has not been provided correctly.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Ndattributils.h

See also

CoTaskMemFree
UtilAssembleStringsWithAlloc
UtilLoadStringWithAlloc

 

 

커뮤니티 추가 항목

추가
표시:
© 2014 Microsoft