From: Maxim S. Shatskih on
> #define IOCTL_Device_Function CTL_CODE(DeviceType, Function, Method, Access)
>
> The Function is a reference to a driver function, but how do you specify it?

Your decision. It's your IOCTL number among other IOCTL numbers of yours.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Javier Càceres on
Hello Maxim,

Thanks.

I have two more questions.

1) I'm writing a KMDF driver but I don't know where is TraceEvents function
defined or what command switch is necessary.
I'm building so:
SOURCE_DIR>build -c

SOURCE_FILE(88) : error C4013: 'TraceEvents' undefined; assuming extern
returning int

2)What tool can I use to see tracing messages?


Thanks a lot,
Where is TraceEvents defined?

"Maxim S. Shatskih" wrote:

> > #define IOCTL_Device_Function CTL_CODE(DeviceType, Function, Method, Access)
> >
> > The Function is a reference to a driver function, but how do you specify it?
>
> Your decision. It's your IOCTL number among other IOCTL numbers of yours.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>
>
From: Javier Càceres on
Thanks Don Burn & Maxim,

I have two more questions.

1) I'm writing a KMDF driver but I don't know where is TraceEvents function
defined or what command switch is necessary.
I'm building so:
SOURCE_DIR>build -c

SOURCE_FILE(88) : error C4013: 'TraceEvents' undefined; assuming extern
returning int

2)What tool can I use to see tracing messages?


Thanks a lot,

"Maxim S. Shatskih" wrote:

> > And how do you match (or point) the IOCTL_1 CTL_CODE to the driver method in
> > charge of processing that request?
>
> The header file with the IOCTL declarations must be included to both user and kernel mode code.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>
>
From: Don Burn on
TraceEvents is probably from a sample and requires WPP tracing. Take a look
at the sample code you started from, in the SOURCES file there is probably a
RUN_WPP line that you forgot to put in your SOURCES file.

--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Javier C�ceres" <JavierCceres(a)discussions.microsoft.com> wrote in message
news:7F5B9997-796B-4CD1-A691-CFA989A41360(a)microsoft.com...
> Hello Maxim,
>
> Thanks.
>
> I have two more questions.
>
> 1) I'm writing a KMDF driver but I don't know where is TraceEvents
> function
> defined or what command switch is necessary.
> I'm building so:
> SOURCE_DIR>build -c
>
> SOURCE_FILE(88) : error C4013: 'TraceEvents' undefined; assuming extern
> returning int
>
> 2)What tool can I use to see tracing messages?
>
>
> Thanks a lot,
> Where is TraceEvents defined?
>
> "Maxim S. Shatskih" wrote:
>
>> > #define IOCTL_Device_Function CTL_CODE(DeviceType, Function, Method,
>> > Access)
>> >
>> > The Function is a reference to a driver function, but how do you
>> > specify it?
>>
>> Your decision. It's your IOCTL number among other IOCTL numbers of yours.
>>
>> --
>> Maxim S. Shatskih
>> Windows DDK MVP
>> maxim(a)storagecraft.com
>> http://www.storagecraft.com
>>
>>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4434 (20090917) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4434 (20090917) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




From: Javier Càceres on

I saw it and my sources file is equal:

TARGETNAME=arandamsrdriver
TARGETTYPE=DRIVER

KMDF_VERSION_MAJOR=1


TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\ntstrsafe.lib \
$(DDK_LIB_PATH)\wdmsec.lib

C_DEFINES=$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE

INCLUDES=$(INCLUDES);..

SOURCES= msrdriver.c

#SOURCES= msrdriver.rc \
# msrdriver.c

#
# Generate WPP tracing code
# $(SOURCES) -- run software preprocessor on files listed in SOURCES
# -km -- use kernel mode
# -func -- define function we'll use for tracing
# This would map all TraceEvents calls to
# DoTraceMessage.
#
RUN_WPP= $(SOURCES) \
-km \
-func:TraceEvents(LEVEL,FLAGS,MSG,...) \
-func:Hexdump((LEVEL,FLAGS,MSG,...)) \
-gen:{km-WdfDefault.tpl}*.tmh

TARGET_DESTINATION=wdf

# Temporarily excuse usage of serviceability impairing macros in code...
ALLOW_DATE_TIME=1