[newbie] _lfind syntax problem

From: Peter Schmitz (PeterSchmitz_at_discussions.microsoft.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 08:09:02 -0800

Hi again,

this time, I want to do some binary searching. Therefore I have declared the
following:

BYTE *buffer; //holds pointer to data to search in
UINT bufferlen; //length in bytes of buffer
BYTE *pattern; //holds pointer to pattern to search for
UINT patternlen; //length of pattern in bytes

Now, I've decided to use _lfind for this searching (I'm not using bsearch,
because AFAIK I'd have to sort the buffer I search in - and as I normally
search in rather small buffers this would decrease my speed significantly -
or am I wrong?).
But somehow I don't get the correct syntax to call _lfind (perhaps because
I'm a newbie to C). So, could someone show me how to call _lfind with the
parameters from above?

Merry Christmas
Peter



Relevant Pages

  • Re: "secure" file flag?
    ... necessary to flush the data through the drive cache. ... onto the platters after you have applied each pattern. ... > buffer contents is prepared for the next step of the erasure process, ... to the conclusion disk encryption is probably a lower-cost solution. ...
    (freebsd-hackers)
  • Re: RegEx partial matching
    ... If you don't want your buffer to be too big, ... you can safely discard the lower 10 characters. ... > like to be safe and just keep 3x the length of the pattern I'm looking ... I want to match full featured regular expressions not just fixed ...
    (comp.lang.java.programmer)
  • Re: regular expression reverse match?
    ... >> determines if the buffer is acceptable against a pattern as the string ... >> added to the buffer as long as it's within the pattern. ... >I don't think its possible with regular expressions, or at least the way you ... I compared rex to simplifying a math problem like ...
    (comp.lang.python)
  • [newbie] _lfind syntax problem
    ... UINT bufferlen; ... BYTE *pattern; //holds pointer to pattern to search for ... Now, I've decided to use _lfind for this searching (I'm not using bsearch, ...
    (microsoft.public.vc.language)
  • [newbie] _lfind syntax problem
    ... UINT bufferlen; ... BYTE *pattern; //holds pointer to pattern to search for ... Now, I've decided to use _lfind for this searching (I'm not using bsearch, ...
    (microsoft.public.win32.programmer.kernel)

Quantcast