Function InstrEx(ByVal StartPos As Long,SrcStr As String,sFind As String) As Long
Local n As Long,p As Asciiz Ptr
n=Len(SrcStr)
If StartPos>=n Then Exit Function
If StartPos>1 Then
p=StrStrI(ByVal StrPtr(SrcStr)+StartPos-1,ByVal StrPtr(sFind))
Else
p=StrStrI(ByVal StrPtr(SrcStr),ByVal StrPtr(sFind))
End If
If p<>0 Then
Function=p-StrPtr(SrcStr)+1
End If
End Function