Internet Direct (Indy)
Home
PreviousUpNext
MemoryPos Function

Locates a string occurring in the specified memory buffer.

Pascal
function MemoryPos(
    const ASubStr: string; 
    MemBuff: PChar; 
    MemorySize: Integer
): Integer;
Parameters 
Description 
ASubStr 
Value to locate in the memory buffer.
 
MemBuff 
Memory buffer to search for the desired value.
 
MemorySize 
Number of bytes in the memory buffer to search. 

Integer - Offset in the memory buffer for the specifies string value.

MemoryPos is an Integer function used to locate the position of a string occurring in the specified memory buffer. 

ASubStr is the value to be located. 

MembBUff is the buffer containing values to be searched for the initial occurrance of the string in ASubStr. 

MemorySize indicates the maximum number of bytes in MemBuff to be examined for an occurrance of ASubStr. 

The return value for the function indicates the position where ASubStr occurs in the memory buffer, where the initial byte offset is 1. 0 (zero) indicates that ASubStr does not occur in the specified memory buffer. 

 

Please note that MemoryPos is defined for all platforms except .Net due to its use of PChar data types and pointers.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.