im trying to get Hutch's BMBinSearch lib to work for me. im just trying to search a string for certain text and display the text if it was found in a messagebox. here is the code. i just zero'd out the messagebox parameters hoping someone can fill them in for me.
Posted on 2002-01-08 20:43:44 by smurf
.model flat, stdcall
option casemap:none

include \masm32\include\
include \masm32\include\
include \masm32\include\
include \masm32\include\

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\masm32.lib

startpos db 0
lpSource db "Searching this text for specific text",0
lpSubStr db "specific",0
sResult db 9 dup(0)


invoke BinSearch ,0\ ;start address of search
,ADDR lpSource\ ;data to be searched
,SIZEOF lpSource -1\ ;length of data to be searched
,ADDR lpSubStr\ ;data to find
,SIZEOF lpSubStr -1 ;length of data to find

.IF eax != -1
lea ebx, lpSource
add eax, ebx
invoke MemCopy,eax,ADDR sResult,SIZEOF lpSubStr - 1
invoke MessageBox,0,ADDR sResult,0,0 ;display the data found in a messagebox. should dispay "specific"
invoke ExitProcess,NULL
end start

with SIZEOF the 0 value byte gets counted too :)
Posted on 2002-01-08 21:11:54 by Hiroshimator
thank you sir:grin:
Posted on 2002-01-08 21:15:41 by smurf