MemClear Function | ![X#](../icons/logo100.jpg) |
Fill a memory buffer with null characters.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION MemClear(
ptrDest AS IntPtr,
dwCount AS DWORD
) AS IntPtr
public static IntPtr MemClear(
IntPtr ptrDest,
uint dwCount
)
Request Example
View SourceParameters
- ptrDest
- Type: IntPtr
A pointer to the memory buffer to fill. - dwCount
- Type: DWord
The number of bytes to fill.
Return Value
Type:
IntPtr
A pointer to the filled memory buffer.
Remarks
MemClear() sets the first
dwCount bytes of the memory buffer pointed to by
ptrValue to the ASCII CHR(0) character.
Tip |
---|
This function allows the direct manipulation of a memory location and should be used with extreme care.
|
Examples
This example clears out the contents of an allocated block:
1LOCAL ptrBuff AS PTR
2ptrBuff := MemAlloc(10)
3MemClear(ptrBuff, 10)
See Also