xmllmx
unread,May 26, 2012, 4:05:12 PM5/26/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Code Sample 1:
#include <ntifs.h>
NTSTATUS DriverEntry(PDRIVER_OBJECT param1, PUNICODE_STRING param2)
{
char s1[] = "Hello";
char s2[] = "World";
int n = memcmp(s1, s2, 5);
return 0;
}
WDK compiler reports: error LNK2019: unsolved extern symbol _memcmp referenced in function _DriverEntry@8
However, if I modify a bit the code as follows, then the compiler will accept it.
Code Sample 2:
#include <ntifs.h>
NTSTATUS DriverEntry(PDRIVER_OBJECT param1, PUNICODE_STRING param2)
{
char s1[] = "Hello";
char s2[] = "World";
memcmp(s1, s2, 5);
return 0;
}
Why?
Thanks in advance!