$ESCAPECHARS ON
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
DECLARE FUNCTION CallAsmProc LIB "user32" ALIAS "CallWindowProcA" _
(Proc AS LONG, A1 AS LONG, A2 AS LONG, A3 AS LONG, _
A4 AS LONG) AS LONG
DEFBYTE AInstrArray (0 TO 91) = _
{ _
&HC8, &H00, &H00, &H00, &H56, &H57, &H8B, &H45, &H08, &H83, _
&HF8, &H00, &H0F, &H84, &H01, &H00, &H00, &H00, &H48, &H8B, _
&H75, &H0C, &H01, &HC6, &H89, &HF0, &H48, &H40, &H89, &HC6, _
&H8B, &H7D, &H10, &H80, &H3E, &H00, &H0F, &H84, &H27, &H00, _
&H00, &H00, &HFC, &HA6, &H0F, &H85, &HE9, &HFF, &HFF, &HFF, _
&H80, &H3F, &H00, &H0F, &H84, &H0B, &H00, &H00, &H00, &H80, _
&H3E, &H00, &H0F, &H84, &H0D, &H00, &H00, &H00, &HEB, &HE5, _
&H8B, &H75, &H0C, &H29, &HF0, &H40, &HE9, &H05, &H00, &H00, _
&H00, &HB8, &H00, &H00, &H00, &H00, &H5F, &H5E, &HC9, &HC2, _
&H10, &H00 _
}
DEFINT ptrAInstr
ptrAInstr = VARPTR (AInstrArray(0))
FUNCTION AInstr (Arg1 AS LONG, Arg2 AS LONG, Arg3 AS LONG) AS LONG
Result = CallAsmProc (ptrAInstr, Arg1, Arg2, Arg3, 0)
END FUNCTION
DEFSTR searchIn = "dhjsjkdhk lzuieyuyrfqs fjkhkyeui zyrzeuhfjkh _
fuizeyruizeyrazjkfhsdjkhflqsdhuizey_
abcdefghijklmnopqrstuvwxyz"
DEFSTR searchFor = "xyz"
DEFINT ptrSearchIn, ptrSearchFor
ptrSearchIn = VARPTR(searchIn)
ptrSearchFor = VARPTR(searchFor)
PRINT ("ASM AInstr search Found at : " & STR$(AInstr(1, ptrSearchIn, ptrSearchFor)))
PRINT ("Same Instr RQ search Found at : " & STR$(INSTR(1, searchIn, searchFor)))
DEFSTR sExit
INPUT "\n\n CR to QUIT \n\n", sExit
Application.Terminate
END
|
|