Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.os.ms-windows.programmer.nt.kernel-mode > #25
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
|---|---|
| From | xmllmx <xmllmx@gmail.com> |
| Newsgroups | comp.os.ms-windows.programmer.nt.kernel-mode |
| Subject | Is memcmp an unsolved symbol in NT kernel driver even if compiled with /Oi? |
| Date | Sat, 26 May 2012 13:04:03 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 35 |
| Message-ID | <44201cc4-e49a-49fe-9335-5f642e911afd@googlegroups.com> (permalink) |
| NNTP-Posting-Host | 65.49.68.176 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1338062752 8369 127.0.0.1 (26 May 2012 20:05:52 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Sat, 26 May 2012 20:05:52 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=65.49.68.176; posting-account=yQZ4lQoAAABfGlSyiQO-EUykAywJx2gc |
| User-Agent | G2/1.0 |
| X-Received-Bytes | 1599 |
| Xref | csiph.com comp.os.ms-windows.programmer.nt.kernel-mode:25 |
Show key headers only | View raw
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!
Back to comp.os.ms-windows.programmer.nt.kernel-mode | Previous | Next — Next in thread | Find similar
Is memcmp an unsolved symbol in NT kernel driver even if compiled with /Oi? xmllmx <xmllmx@gmail.com> - 2012-05-26 13:04 -0700
Re: Is memcmp an unsolved symbol in NT kernel driver even if compiled with /Oi? "Don Burn" <burn@windrvr.com> - 2012-05-26 20:19 +0000
Re: Is memcmp an unsolved symbol in NT kernel driver even if compiled with /Oi? xmllmx <xmllmx@gmail.com> - 2012-05-26 13:37 -0700
Re: Is memcmp an unsolved symbol in NT kernel driver even if compiled with /Oi? Tim Roberts <timr@probo.com> - 2012-05-27 18:52 -0700
csiph-web