Hi.
I have conflict with using libs through #include directive.
If you open this code from C:\WINDDK\3790\src\video\displays\mirror\disp\enable.c from (DDK) and add
#include “ntddk.h”
after
#include “driver.h”
And try to compile, you’ll see Heap of mistakes.
For example
c:\winddk\3790\inc\ddk\wxp\ntdef.h(1791) : error C4005: ‘MAKELANGID’ : macro red
efinition
How can I solve this problem?
Well since driver.h is an include file for a particular driver, fix it.
Typically, you should have this after ntddk.h since most includes depend on
things from ntddk.h.
–
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
wrote in message news:xxxxx@ntdev…
> Hi.
> I have conflict with using libs through #include directive.
> If you open this code from
> C:\WINDDK\3790\src\video\displays\mirror\disp\enable.c from (DDK) and add
> #include “ntddk.h”
> after
> #include “driver.h”
> And try to compile, you’ll see Heap of mistakes.
> For example
> c:\winddk\3790\inc\ddk\wxp\ntdef.h(1791) : error C4005: ‘MAKELANGID’ :
> macro red
> efinition
>
> How can I solve this problem?
>
Yes, I know that it’s from driver.h but how I can fix it?
That the main question.
Rewrite NTDDK.H
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Sunday, July 29, 2007 18:36
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lib(#include) conflict
Yes, I know that it’s from driver.h but how I can fix it?
That the main question.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Forgot the first option:
don’t include it in a sample driver that compiles correctly.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Martin O’Brien
Sent: Sunday, July 29, 2007 18:52
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Lib(#include) conflict
Rewrite NTDDK.H
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Sunday, July 29, 2007 18:36
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Lib(#include) conflict
Yes, I know that it’s from driver.h but how I can fix it?
That the main question.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
But I need to use functions from ntddk.h for example ZwCreateFile.
How can I use ZwCreateFile in this driver?
xxxxx@gmail.com wrote:
How can I use ZwCreateFile in this driver?
You cannot do so. We have explained this before. This is a GDI driver,
and GDI drivers are not allowed to call any DDK APIs outside of
win32k.sys. All of the legal APIs are in <ntddvdeo.sys>, and that’s
already included in driver.h.
The best you can do is make an ioctl call into your miniport, and have
the miniport call ZwCreateFile.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.</ntddvdeo.sys>