mem_alloc creates a scalar string of the given length.
Return Value
ssString is string with n bytes.
Parameters
n is the number of bytes of the string.
c is a string or number which is used to initialize the string. If c is a string only the first character is used. If c is a number, the number is converted to a 8-bit value.
Example
def GetCurrentDirectory()
{
ret = RegisterFunction("KERNEL32", "GetCurrentDirectoryA",..
"uint", "_GetCurDir", ["uint", "char*"]);
ssBuffer = mem_alloc(1024);
_GetCurDir(1024, ssBuffer)
return strtrim(ssBuffer);
}
History
| Version | Description |
|---|---|
| 5.0.0 | ??? |
| 4.2.0 | New. |
See also
id-783686