Click or drag to resize

PtrLen Function

X#
Determine the number of bytes that can be read at a given pointer.

Namespace:  XSharp.VO
Assembly:  XSharp.VO (in XSharp.VO.dll) Version: 2.19
Syntax
 FUNCTION PtrLen(
	lpv AS IntPtr
) AS DWORD
Request Example View Source

Parameters

lpv
Type: IntPtr

Return Value

Type: DWord
The number of bytes that can be read, starting from the location pointed to by ptrRead.
If ptrRead is an invalid pointer, a value of 0 is returned.
Remarks
Examples
This example illustrates PtrLen():
X#
1LOCAL ptrFunc AS PTR
2ptrFunc := @ MyFunc()
3? PtrLen(ptrFunc)
See Also