Re: wdfdriver.h file in DDK(Windows Server 2003 SP1 DDK) for XP Pr

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Don,

Sorry for the above question. I should have included the wdf.h in staed
of wdfdriver.h.

Thanks
-Srini


"Srinimg@xxxxxxxxx" wrote:

Hello Don,
Thank you very much, I could get WDK and Installed.

Little follow up on WdfDriver.h file, as i get Build Error in the
wdfdriver.h file. could you please help me by flashing your input.

I have souce file (RegMon.c) that has the code given below
---------------------------------------------------------------
#include <wdm.h>
#include <Ntddk.h>
#include <Wdfdriver.h>

NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
)
{
NTSTATUS status = STATUS_SUCCESS;
WDF_DRIVER_CONFIG config;


WDF_DRIVER_CONFIG_INIT(
&config,
MyEvtDeviceAdd
);
config.EvtDriverUnload = MyEvtDriverUnload;
status = WdfDriverCreate(
DriverObject,
RegistryPath,
WDF_NO_OBJECT_ATTRIBUTES,
&config,
WDF_NO_HANDLE
);
if (!NT_SUCCESS(status)) {
TraceEvents(
TRACE_LEVEL_ERROR,
DBG_PNP,
"WdfDriverCreate failed with status %!STATUS!",
status
);
}
return status;
}
---------------------------------------------------------------
results in the build error(Partial)

C:\WINDDK\6000\src\kmdf\RegMon>build -cZg
BUILD: Compile and Link for x86
BUILD: Start time: Tue Feb 13 13:11:03 2007
BUILD: Examining c:\winddk\6000\src\kmdf\regmon directory for files to
compile.
BUILD: Compiling c:\winddk\6000\src\kmdf\regmon directory
_NT_TARGET_VERSION SET TO WINXP
Compiling - regmon.c
errors in directory c:\winddk\6000\src\kmdf\regmon
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(48) : error C2146: syntax error :
missing ')' before identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(48) : error C2061: syntax error :
identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(48) : error C2059: syntax error :
';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(48) : error C2059: syntax error :
','
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(50) : error C2059: syntax error :
')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(55) : error C2146: syntax error :
missing ')' before identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(55) : error C2061: syntax error :
identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(55) : error C2059: syntax error :
';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(56) : error C2059: syntax error :
')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(82) : error C2061: syntax error :
identifier 'PFN_WDF_DRIVER_DEVICE_ADD'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(84) : error C2061: syntax error :
identifier 'EvtDriverUnload'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(84) : error C2059: syntax error :
';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(97) : error C2059: syntax error :
'}'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(102) : error C2146: syntax error
: missing ')' before identifier 'Config'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(102) : error C2061: syntax error
: identifier 'Config'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(102) : error C2059: syntax error
: ';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(102) : error C2059: syntax error
: ','
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(104) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(147) : error C2054: expected '('
to follow 'WDFDRIVER'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(150) : error C2085:
'WdfGetDriver' : not in formal parameter list
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(150) : error C2143: syntax error
: missing ';' before '{'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(160) : error C2054: expected '('
to follow 'WDFAPI'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(161) : error C2146: syntax error
: missing ')' before identifier 'DriverGlobals'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(161) : error C2085:
'PFN_WDFDRIVERCREATE' : not in formal parameter list
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(161) : error C2146: syntax error
: missing ',' before identifier 'DriverGlobals'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(162) : error C2059: syntax error
: 'type'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(167) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(178) : error C2146: syntax error
: missing ')' before identifier 'DriverAttributes'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(178) : error C2081:
'PWDF_OBJECT_ATTRIBUTES' : name in formal parameter list illegal
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(178) : error C2061: syntax error
: identifier 'DriverAttributes'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(178) : error C2059: syntax error
: ';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(178) : error C2059: syntax error
: ','
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(183) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(194) : error C2143: syntax error
: missing ')' before '*'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(194) : error C2143: syntax error
: missing '{' before '*'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(194) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(195) : error C2146: syntax error
: missing ')' before identifier 'DriverGlobals'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(195) : error C2061: syntax error
: identifier 'DriverGlobals'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(195) : error C2059: syntax error
: ';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(195) : error C2059: syntax error
: ','
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(197) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(203) : error C2146: syntax error
: missing ')' before identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(203) : error C2061: syntax error
: identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(203) : error C2059: syntax error
: ';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(204) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(205) : error C2449: found '{' at
file scope (missing function header?)
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(207) : error C2059: syntax error
: '}'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(224) : error C2146: syntax error
: missing ')' before identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(224) : error C2061: syntax error
: identifier 'Driver'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(224) : error C2059: syntax error
: ';'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(225) : error C2059: syntax error
: ')'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(226) : error C2449: found '{' at
file scope (missing function header?)
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(228) : error C2059: syntax error
: '}'
c:\winddk\6000\inc\wdf\kmdf\10\wdfdriver.h(249) : error C2146: syntax error
: missing ')' before identifier 'Driver'

Thanks in advance
-Srini


"Don Burn" wrote:

1830 is the DDK, 6000 is the WDK, WDK is the Vista Windows Driver Kit. It
contains the KMDF 1.5, the only KMDF for the Windows Server 2003 SP1 DDK is
KMDF 1.1, you want to be using the latest.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply





"Srinimg@xxxxxxxxx" <Srinimgyahoocom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:33CD99A3-BC23-4DD5-81FD-0337446D88E6@xxxxxxxxxxxxxxxx
Hello Don,

I had already installed the ISO (1830_usa_ddk ie WDK) and i don't
have anything related to KMDF. but in some place i read KMDF is included
in
the latetest WDK Version 1.5. Could you please tell me where exactly i
can
find the WDK Version 1.5 so as to have wdfdriver.h and other related
KMDF
stuff?

Thanks you very much in advance
-Srini


"Don Burn" wrote:

The webpage points you to the ISO image for the whole kit. You can
either
burn a DVD or use a virtual DVD reader such as OSR's at
http://www.osronline.com/article.cfm?article=410


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"Srinimg@xxxxxxxxx" <Srinimgyahoocom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:1E0508E0-E2A7-4C40-837F-1D5F0B76ADB3@xxxxxxxxxxxxxxxx
Hello Don,

Thanks for the reply. Does this link has the KMDF Installation
Kit
or
am i missing something?

Thank you very much
-Srini


"Don Burn" wrote:

You need the Kernel Mode Driver Framework (KMDF). To get the latest
one,
download the WDK see
http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"Srinimg@xxxxxxxxx" <Srinimgyahoocom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in
message news:9AB53045-66C0-4F21-A8A0-0916E57C7ABF@xxxxxxxxxxxxxxxx
Hello all,
I have installed the Windows Server 2003 SP! DDK in Win XP
Professional System to filter Registry calls using Kernal Mode
Driver(Ref
:
http://msdn2.microsoft.com/en-us/library/aa906577.aspx ).

I don't have the header file(wdfdriver.h) that has
WDF_DRIVER_CONFIG to initialize the driver by invoking
WdfDriverCreate(). So
could you please tell me where can i find the wdfdriver.h? Does the
file(wdfdriver.h) part of the Windows Server 2003 SP1 DDK
Intallation?

Thanks in advance
-Srini









.



Relevant Pages

  • Re: wdfdriver.h file in DDK(Windows Server 2003 SP1 DDK) for XP Pr
    ... I could get WDK and Installed. ... missing ')' before identifier 'Driver' ...
    (microsoft.public.development.device.drivers)
  • Re: SetupDixxxx general question
    ... missing ')' before '*' ... missing ')' before identifier 'hwnd' ... > Please do not send e-mail directly to this alias. ... >> Can SetupDixxxx functions called from kernel-mode driver? ...
    (microsoft.public.development.device.drivers)
  • Re: nvidia-driver rebooting machine on X startup
    ... Same driver different hw, same os version... ... FreeBSD is a registered trademark of The FreeBSD Foundation. ... acpi0: <Nvidia AWRDACPI> on motherboard ... Identifier "Microsoft_Natural" ...
    (freebsd-questions)
  • Re: WINDDK is not getting compiled
    ... missing ';' before identifier 'CHAR' ... missing ';' before identifier 'DEVNODEID' ... '__out': undeclared identifier ...
    (microsoft.public.development.device.drivers)
  • Re: Cannot start Beryl
    ... > Which driver should I be using? ... InputDevice "Generic Keyboard" ... Load "bitmap" ... Identifier "Generic Keyboard" ...
    (Ubuntu)