thanks
Posted on 2005-01-28 08:39:21 by jndk
Look at MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/shlwapi/string/strchr.asp


It's simple enough - invoke StrChr,addr string_in_which_you_search,addr char_you_search_for



/siddhartha
Posted on 2005-01-28 08:57:10 by siddhartha
Why not use

rep scasb
Posted on 2005-01-28 09:54:48 by roticv
Look at MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/shlwapi/string/strchr.asp


It's simple enough - invoke StrChr,addr string_in_which_you_search,addr char_you_search_for



/siddhartha


but when i try this fun, it said no this fun,
am I don't include some lib ?

and StrChr is in what lib?
thanks
Posted on 2005-01-28 10:04:57 by jndk
also i think u make a mistake

not
addr char_you_search_for

TCHAR wMatch
not address,
Posted on 2005-01-28 10:07:28 by jndk
jndk,

Look at the end of the thread pointed to by the link below. MFNDCHR will find the first occurrence of several characters within a string. Ratch

http://www.masmforum.com/simple/index.php?topic=170.30
Posted on 2005-01-28 16:17:57 by Ratch
it is declared in shlwapi.lib

or you can find it in all crt dlls viz (msvcrt.dll.etc)
here is a working code that will show the string from the wMatch position


.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib

include \masm32\include\shlwapi.inc
includelib \masm32\lib\shlwapi.lib


.data
MsgCaption db "Iczelion's tutorial no.2",0
wMatch db "'",0 ; looks for single quote viz '

.code
start:
invoke StrChr,addr MsgCaption, dword ptr ds:
invoke MessageBox,NULL,eax,addr MsgCaption,NULL
invoke ExitProcess,NULL
end start
Posted on 2005-01-29 06:39:31 by bluffer
There must be an equivalent function in masm32.lib
Posted on 2005-01-29 07:01:55 by Vortex