LockString - Allocate memory and fill it with data |
Top Previous Next |
Syntax
<nAddress> := LockString( <cData>, [<nType] )
Parameters
<cData>
String to be committed to memory.
<nType>
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.
Return value
The memory address where <cData> starts.
Description
LockString allocates a memory block for <cData> and writes the string contained in <cdata> to that block. LockString always adds two 0-bytes in memory at the end of the string. This makes sure a C text string or a Unicode C text string is properly terminated.
To release the allocated memory block, use UnlockString or ReleaseLockString passing the returned address.
Classification
Core
Category
Quick Info
Library: cckptcor.lib / cckptcor.dll Header: StringTypes.ch
See also
LockNullString, LockStringLen, UnlockString, ReadLockString, ReleaseLockString
Example
|