hey, is there a api function or s.th. which tells me if a string is a part of another string? or do i have to write this myself?

i searched for it but didn't found anything :(
Posted on 2003-07-01 11:29:20 by Knighty
you mean like InString? - it's on the masm32 package
Posted on 2003-07-01 16:37:27 by arkane
thx, thats what i was looking for :)
Posted on 2003-07-01 19:12:48 by Knighty
The Shlwapi.dll exports StrStr and StrStrI fit the bill.
Posted on 2003-07-01 22:06:08 by Poimander
i did it now with the InString function. And then i have the position in e.g. eax.
But how can i show this number in a messagebox for example. I tried it with wsprintf but i can't get it to work properly.
Posted on 2003-07-02 16:47:24 by Knighty
Knighty,

i assume, form function, the return value in EAX as pointer(didnt tried).
----------
buffer db 50 dup (?)
fmat db '%d',0

call wsprintf, offset buffer, offset fmat, eax
-----------

this is for tasm32 but i suppose you need,

call > invoke
offset > addr

must work.
Posted on 2003-07-02 20:06:22 by cakmak
Knighty,

i assume, form function, the return value in EAX as pointer(didnt tried).
----------
buffer db 50 dup (?)
fmat db '%d',0
tit db 'result',0

call wsprintf, offset buffer, offset fmat, eax
call MessageBox, 0, offset buffer, offset tit,0
-----------

this is for tasm32 but i suppose you need,

call > invoke
offset > addr

must work.

edit: sorry admins, couldnt catch the post, pigeon has flied :)
Posted on 2003-07-02 20:08:01 by cakmak