MemWord Function | |
Get a pointer to a matching word in a memory buffer.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION MemWord(
ptrBuffer AS IntPtr,
dwValue AS WORD,
dwCount AS DWORD
) AS IntPtr
public static IntPtr MemWord(
IntPtr ptrBuffer,
ushort dwValue,
uint dwCount
)
Request Example
View SourceParameters
- ptrBuffer
- Type: IntPtr
A pointer to the memory buffer to examine. - dwValue
- Type: Word
The word value to match. - dwCount
- Type: DWord
The number of words in ptrBuffer to examine.
Return Value
Type:
IntPtr
A pointer to the first occurrence of
dwValue within the first
dwCount words of
ptrBuffer.
If
dwValue is not matched, MemWord() returns a NULL_PTR.
Remarks Examples
This example uses MemWord() on a PSZ:
1Function Start()
2 LOCAL ptrW := "ABCDEFGHIJ" AS PSZ
3 ? MemWord(ptrW, Bin2W("CD"), 3)
4 ? MemWord(ptrW, Bin2W("CD"), 1)
5
6
See Also