Hello friends.
I have been trying to compare 2 files

I am trying to Compare 2 Strings like 123.log and *.log.
i have tried CompareString but it dosent work.
Is there anyway to compare such strings.

Posted on 2008-03-28 14:48:50 by starzboy
Try lstrcmp

but it's easier to just capitalize the extension and then compare it with what you need.

Include masm.lib and use szUpper and then compare it like this:

extension db ".RAP",0
invoke szUpper, offset extension
.IF d$ == "PAR." ; .RAP in reverse
   ; it's .rap
.ELSEIF dword ptr == "GOL." ; .LOG in reverse
   ; it's .log
Posted on 2008-03-28 17:06:36 by JimmyClif
Seems like you want wildcard comparison - is this for your own needs, or because you need to code a wildcard matcher for school?

There should be plenty of wildcard matching routines out there, with various levels of features. If you don't want to write one youreself, your best bet is to find an algorithm in C, and then hand-convert it to assembly...
Posted on 2008-03-28 20:36:19 by f0dder
search for dot "." from end of first string == pointer1
search for dot "." from end of second string == pointer2
compare pointer1 and pointer2 as strings (strcmpi)
Posted on 2008-03-28 21:54:42 by drizz
Ah thanx a lot friends.
Yes i am coding a wildcard comparision function.
I'll try and report.
Thanx again
Posted on 2008-03-29 00:55:37 by starzboy