SysAllocStringByteLen

psz, len)
char FAR* psz
unsigned int len

Allocates a new string of len bytes, copies len bytes from the passed string into it, and then appends a null character. Valid for 32-bit systems only.

Parameter

psz

A zero-terminated string to copy, or NULL to keep the string uninitialized.

len

Number of bytes to copy from psz. A null character is placed afterwards, making a total of len+1 bytes allocated.

Return Value

Points to a copy of the string or NULL, if insufficient memory exists.

Comments

If psz is NULL, a string of the requested length is allocated, but not initialized. The string psz can contain embedded null characters and need not end with a null. The returned string should later be freed with SysFreeString.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples