xmllmx <
xml...@gmail.com> wrote:
>
>I know RtlCompareMemory is a better choice. But I just wonder its cause.
You must have changed more than just the "int n =". The difference here is
the optimization level.
memcmp is an intrinsic. If you have intrinsics enabled (/Oi), then the
compiler expands the code for memcmp inline, by using a "rep cmpsb"
instruction. No function call is required. If you have the instrinsic
switch turned off, then it compiles a call to the external function memcmp,
which must exist.
By the way, "memcmp", like most of the C run-time library, is available for
kernel drivers in the library libcntpr.lib. Just add
USE_LIBCNTPR=1
to your "sources" file.
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.