MemInt Function | |
Get a pointer to a matching integer in a memory buffer.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION MemInt(
ptrBuffer AS IntPtr,
iValue AS LONG,
dwCount AS DWORD
) AS IntPtr
public static IntPtr MemInt(
IntPtr ptrBuffer,
int iValue,
uint dwCount
)
Request Example
View SourceParameters
- ptrBuffer
- Type: IntPtr
A pointer to the memory buffer to examine. - iValue
- Type: Long
An integer to match. - dwCount
- Type: DWord
The number of integers in ptrBuffer to examine.
Return Value
Type:
IntPtr
A pointer to the first occurrence of
iValue within the first
dwCount integers of
ptrBuffer.
If
iValue is not matched, MemInt() returns a NULL_PTR.
Remarks Examples
This example uses MemInt() on a PSZ:
1FUNCTION Start()
2 LOCAL ptrI := "ABCDEFGHIJ" AS PSZ
3 ? MemInt(ptrI, Bin2I("EFGH"), 2)
4 ? MemInt(ptrI, Bin2I("EFGH"), 1)
5
See Also