MemShort Function | |
Get a pointer to a matching short integer in a memory buffer.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION MemShort(
ptrBuffer AS IntPtr,
siValue AS SHORT,
dwCount AS DWORD
) AS IntPtr
public static IntPtr MemShort(
IntPtr ptrBuffer,
short siValue,
uint dwCount
)
Request Example
View SourceParameters
- ptrBuffer
- Type: IntPtr
A pointer to the memory buffer to examine. - siValue
- Type: Short
The short integer value to match. - dwCount
- Type: DWord
The number of short integers in ptrBuffer to examine.
Return Value
Type:
IntPtr
A pointer to the first occurrence of
siValue within the first
dwCount short integers of
ptrBuffer.
If
siValue is not matched, MemShort() returns a NULL_PTR.
Remarks Examples
This example uses MemShort() on a PSZ:
1FUNCTION StartShort()
2 LOCAL ptrSI := "ABCDEFGHIJ" AS PSZ
3
4
5 ? MemShort(ptrSI, 16961,2)
6 ? MemShort(ptrSI, 16961,1)
7
See Also