Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 code | Description |
---|---|
|
The operation succeeded. |
|
One or more parameters has not been provided correctly. |
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 8 [desktop apps only] |
Minimum supported server |
Windows Server 2012 [desktop apps only] |
Header |
|