G
Guest
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
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