CopyStringToMemory - Transfer data from a string to memory
|Top Previous Next|
<lRet> := CopyStringToMemory( <nAddress>, <cString>, [<nType>], [<nBufferSize>], [<nBytesWritten>] )
Target start address of string in memory.
String to copy to the target address. In memory one 0-byte (STRINGTYPE_TEXT, STRINGTYPE_BINARY0) or two 0-bytes (STRINGTYPE_UNICODETEXT) are added. Strings of STRINGTYPE_BINARY are not terminated.
Type of string data to be written to memory. This value can be STRINGTYPE_BINARY, STRINGTYPE_BINARY0, STRINGTYPE_TEXT, STRINGTYPE_UNICODETEXT. Specifying this parameter requests character set conversions while copying the string data. Default is STRINGTYPE_BINARY.
Size (number of bytes) of buffer available for the string and it's terminator. This parameter can be omitted if you are sure there is enough buffer space available. At least Len(<cString>) bytes are required to accommodate binary strings and Len(<cString>)+1 bytes for text strings and the terminating 0-byte. Unicode strings require 2* Len(<cString>)+2 bytes of memory. If <nBufferSize> is specified, <cString> is truncated if necessary to fit the buffer including its terminator.
OUT: Number of bytes written during the operation.
A string is written to memory starting at address <nAddress>. During the transfer to memory character set conversions can be requested with <nType>. The conversions available are:
In memory the string is terminated with one 0-byte (or two 0-bytes for Unicode strings). If a buffer size is specified, the string is truncated to fit into the buffer with termination.
Library: cckptcor.lib / cckptcor.dll