Hi,

I am using KdPrintEx in my driver but i keeep getting the 'identifier not
found' error. I have included ntddk.h where it is supposed to be defined. I
am building teh driver using 'windows checked build environment for XP'. I
have looked into teh sample DDK code 'cdrom' which uses KdPrintEx and I see
no difference in the way its used in sample and my driver. The cdrom sample
builds without errors.

Please let me know what mistake I might be making.

Regds.
Nitin

Re: build error with KdPrintEx by Eliyas

Eliyas
Wed Feb 08 10:25:50 CST 2006

Show us the code. What is the component id you are using?

-Eliyas


"tsindia" <tsindia@newsgroups.nospam> wrote in message
news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I am using KdPrintEx in my driver but i keeep getting the 'identifier not
> found' error. I have included ntddk.h where it is supposed to be defined.
> I am building teh driver using 'windows checked build environment for XP'.
> I have looked into teh sample DDK code 'cdrom' which uses KdPrintEx and I
> see no difference in the way its used in sample and my driver. The cdrom
> sample builds without errors.
>
> Please let me know what mistake I might be making.
>
> Regds.
> Nitin
>



Re: build error with KdPrintEx by tsindia

tsindia
Wed Feb 08 23:02:26 CST 2006

This is the way I am using KdPrintEx

KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,

"UIFD_open() unable to create driver thread\n"));

The component_id is what is suggested in DDK for drivers and the levels are
also as suggested in DDK.

Regds.



"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
> Show us the code. What is the component id you are using?
>
> -Eliyas
>
>
> "tsindia" <tsindia@newsgroups.nospam> wrote in message
> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>> Hi,
>>
>> I am using KdPrintEx in my driver but i keeep getting the 'identifier
>> not found' error. I have included ntddk.h where it is supposed to be
>> defined. I am building teh driver using 'windows checked build
>> environment for XP'. I have looked into teh sample DDK code 'cdrom' which
>> uses KdPrintEx and I see no difference in the way its used in sample and
>> my driver. The cdrom sample builds without errors.
>>
>> Please let me know what mistake I might be making.
>>
>> Regds.
>> Nitin
>>
>
>



Re: build error with KdPrintEx by Mark

Mark
Thu Feb 09 06:43:43 CST 2006

On Thu, 9 Feb 2006 10:32:26 +0530, "tsindia"
<tsindia@newsgroups.nospam> wrote:

>This is the way I am using KdPrintEx
>
>KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>
>"UIFD_open() unable to create driver thread\n"));
>
>The component_id is what is suggested in DDK for drivers and the levels are
>also as suggested in DDK.
>

Which ddk are you using?

There doesn't appear to be any problem with your code segment above.


>Regds.
>
>
>
>"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>> Show us the code. What is the component id you are using?
>>
>> -Eliyas
>>
>>
>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>> Hi,
>>>
>>> I am using KdPrintEx in my driver but i keeep getting the 'identifier
>>> not found' error. I have included ntddk.h where it is supposed to be
>>> defined. I am building teh driver using 'windows checked build
>>> environment for XP'. I have looked into teh sample DDK code 'cdrom' which
>>> uses KdPrintEx and I see no difference in the way its used in sample and
>>> my driver. The cdrom sample builds without errors.
>>>
>>> Please let me know what mistake I might be making.
>>>
>>> Regds.
>>> Nitin
>>>
>>
>>
>


=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: build error with KdPrintEx by jeffm

jeffm
Thu Feb 09 10:15:21 CST 2006

------=_NextPart_0001_AF5AEE3F
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Nitin,

Could you paste in the relevant portion of your build error log?

Thanks,
[MSFT] Jeff McCashland
jeffm@online.microsoft.com

This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_AF5AEE3F
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Nitin,
\par
\par Could you paste in the relevant portion of your build error log?
\par
\par Thanks,
\par [MSFT] Jeff McCashland
\par jeffm@online.microsoft.com
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }
------=_NextPart_0001_AF5AEE3F--


Re: build error with KdPrintEx by Eliyas

Eliyas
Sat Feb 11 13:59:08 CST 2006

I tried the exact same statement in my driver and it built fine.

-Eliyas

"tsindia" <tsindia@newsgroups.nospam> wrote in message
news:O2BoKYTLGHA.2320@TK2MSFTNGP11.phx.gbl...
> This is the way I am using KdPrintEx
>
> KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>
> "UIFD_open() unable to create driver thread\n"));
>
> The component_id is what is suggested in DDK for drivers and the levels
> are also as suggested in DDK.
>
> Regds.
>
>
>
> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
> news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>> Show us the code. What is the component id you are using?
>>
>> -Eliyas
>>
>>
>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>> Hi,
>>>
>>> I am using KdPrintEx in my driver but i keeep getting the 'identifier
>>> not found' error. I have included ntddk.h where it is supposed to be
>>> defined. I am building teh driver using 'windows checked build
>>> environment for XP'. I have looked into teh sample DDK code 'cdrom'
>>> which uses KdPrintEx and I see no difference in the way its used in
>>> sample and my driver. The cdrom sample builds without errors.
>>>
>>> Please let me know what mistake I might be making.
>>>
>>> Regds.
>>> Nitin
>>>
>>
>>
>
>



Re: build error with KdPrintEx by tsindia

tsindia
Tue Feb 14 01:02:16 CST 2006

This is why I find the errors funny, as the other drivers are building fine
with the same XP checked build environment.

I am pasting the error log here for reference and also the headers I am
including. Maybe this will help.

>amz_usb_ifdrv.cpp(167) : error C3861: 'KdPrintEx': identifier not found,
>even
ith argument-dependent lookup
>amz_usb_ifdrv.cpp(180) : error C3861: 'KdPrintEx': identifier not found,
>even
ith argument-dependent lookup
>amz_usb_ifdrv.cpp(227) : error C3861: 'KdPrintEx': identifier not found,
>even
ith argument-dependent lookup
>amz_usb_ifdrv.cpp(237) : error C3861: 'KdPrintEx': identifier not found,
>even
ith argument-dependent lookup
>amz_usb_ifdrv.cpp(282) : error C3861: 'KdPrintEx': identifier not found,
>even
ith argument-dependent lookup

I am including the headers:

#include "stddef.h"

#include "string.h"

#include "ntddk.h"

#include "driver.h"

#include <wdm.h>

#pragma warning(disable:4200) // zero-sized array

#include <usbdi.h>

#include <usbdlib.h>

#include <stdio.h>


her's a paste of my sources and makefile too..

TARGETNAME=TspanUsbDrv
TARGETTYPE=DRIVER
#DDKROOT=$(_NTDRIVE)$(_NTROOT)

C_DEFINES= $(C_DEFINES) -DWMI_SUPPORT -DUSB2

TARGETPATH=obj

#INCLUDES=$(DDKROOT)\private\ntos\inc;
INCLUDES=..\inc;..\..\inc

USE_MAPSYM=1

TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib \
$(DDK_LIB_PATH)\ntoskrnl.lib \
NcGen.lib

MSC_WARNING_LEVEL=/W3


SOURCES= Control.cpp \
Debug.cpp \
DriverEntry.cpp \
ReadWrite.cpp \
stddcls.cpp \
amz_init.cpp \
amz_usb_ifdrv.cpp


Makefile:

!IF 0

Copyright (C) Microsoft Corporation, 1996 - 1998

Module Name:

makefile.

!ENDIF

#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the components of Windows NT
#

#
# if building in a DDK environment
#
!IF defined(DDK_TARGET_OS)

#
# ensure that said build environment is at least Windows XP
# 0x500 == Windows 2000
# 0x501 == Windows XP
# 0x502 == Windows .NET
#
! IF defined(_NT_TARGET_VERSION) && $(_NT_TARGET_VERSION)>=0x501
! INCLUDE $(NTMAKEENV)\makefile.def
! ELSE
! message BUILDMSG: Warning : The sample "$(MAKEDIR)" is not valid
for the current OS target.
! ENDIF

!ELSE

#
# not a DDK environment, probably RAZZLE, so build
#
! INCLUDE $(NTMAKEENV)\makefile.def

!ENDIF

"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
news:O6GKTW0LGHA.2320@TK2MSFTNGP11.phx.gbl...
>I tried the exact same statement in my driver and it built fine.
>
> -Eliyas
>
> "tsindia" <tsindia@newsgroups.nospam> wrote in message
> news:O2BoKYTLGHA.2320@TK2MSFTNGP11.phx.gbl...
>> This is the way I am using KdPrintEx
>>
>> KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>>
>> "UIFD_open() unable to create driver thread\n"));
>>
>> The component_id is what is suggested in DDK for drivers and the levels
>> are also as suggested in DDK.
>>
>> Regds.
>>
>>
>>
>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>> news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>>> Show us the code. What is the component id you are using?
>>>
>>> -Eliyas
>>>
>>>
>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>>> Hi,
>>>>
>>>> I am using KdPrintEx in my driver but i keeep getting the 'identifier
>>>> not found' error. I have included ntddk.h where it is supposed to be
>>>> defined. I am building teh driver using 'windows checked build
>>>> environment for XP'. I have looked into teh sample DDK code 'cdrom'
>>>> which uses KdPrintEx and I see no difference in the way its used in
>>>> sample and my driver. The cdrom sample builds without errors.
>>>>
>>>> Please let me know what mistake I might be making.
>>>>
>>>> Regds.
>>>> Nitin
>>>>
>>>
>>>
>>
>>
>
>



Re: build error with KdPrintEx by David

David
Tue Feb 14 01:23:04 CST 2006

No - duh! Maybe it isn't in wdm.h. Try ntddk.h. It isn't supported on 9x.

"tsindia" <tsindia@newsgroups.nospam> wrote in message
news:OplTZSTMGHA.3756@TK2MSFTNGP10.phx.gbl...
> This is why I find the errors funny, as the other drivers are building
> fine with the same XP checked build environment.
>
> I am pasting the error log here for reference and also the headers I am
> including. Maybe this will help.
>
>>amz_usb_ifdrv.cpp(167) : error C3861: 'KdPrintEx': identifier not found,
>>even
> ith argument-dependent lookup
>>amz_usb_ifdrv.cpp(180) : error C3861: 'KdPrintEx': identifier not found,
>>even
> ith argument-dependent lookup
>>amz_usb_ifdrv.cpp(227) : error C3861: 'KdPrintEx': identifier not found,
>>even
> ith argument-dependent lookup
>>amz_usb_ifdrv.cpp(237) : error C3861: 'KdPrintEx': identifier not found,
>>even
> ith argument-dependent lookup
>>amz_usb_ifdrv.cpp(282) : error C3861: 'KdPrintEx': identifier not found,
>>even
> ith argument-dependent lookup
>
> I am including the headers:
>
> #include "stddef.h"
>
> #include "string.h"
>
> #include "ntddk.h"
>
> #include "driver.h"
>
> #include <wdm.h>
>
> #pragma warning(disable:4200) // zero-sized array
>
> #include <usbdi.h>
>
> #include <usbdlib.h>
>
> #include <stdio.h>
>
>
> her's a paste of my sources and makefile too..
>
> TARGETNAME=TspanUsbDrv
> TARGETTYPE=DRIVER
> #DDKROOT=$(_NTDRIVE)$(_NTROOT)
>
> C_DEFINES= $(C_DEFINES) -DWMI_SUPPORT -DUSB2
>
> TARGETPATH=obj
>
> #INCLUDES=$(DDKROOT)\private\ntos\inc;
> INCLUDES=..\inc;..\..\inc
>
> USE_MAPSYM=1
>
> TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib \
> $(DDK_LIB_PATH)\ntoskrnl.lib \
> NcGen.lib
>
> MSC_WARNING_LEVEL=/W3
>
>
> SOURCES= Control.cpp \
> Debug.cpp \
> DriverEntry.cpp \
> ReadWrite.cpp \
> stddcls.cpp \
> amz_init.cpp \
> amz_usb_ifdrv.cpp
>
>
> Makefile:
>
> !IF 0
>
> Copyright (C) Microsoft Corporation, 1996 - 1998
>
> Module Name:
>
> makefile.
>
> !ENDIF
>
> #
> # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new
> source
> # file to this component. This file merely indirects to the real make
> file
> # that is shared by all the components of Windows NT
> #
>
> #
> # if building in a DDK environment
> #
> !IF defined(DDK_TARGET_OS)
>
> #
> # ensure that said build environment is at least Windows XP
> # 0x500 == Windows 2000
> # 0x501 == Windows XP
> # 0x502 == Windows .NET
> #
> ! IF defined(_NT_TARGET_VERSION) && $(_NT_TARGET_VERSION)>=0x501
> ! INCLUDE $(NTMAKEENV)\makefile.def
> ! ELSE
> ! message BUILDMSG: Warning : The sample "$(MAKEDIR)" is not valid
> for the current OS target.
> ! ENDIF
>
> !ELSE
>
> #
> # not a DDK environment, probably RAZZLE, so build
> #
> ! INCLUDE $(NTMAKEENV)\makefile.def
>
> !ENDIF
>
> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
> news:O6GKTW0LGHA.2320@TK2MSFTNGP11.phx.gbl...
>>I tried the exact same statement in my driver and it built fine.
>>
>> -Eliyas
>>
>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>> news:O2BoKYTLGHA.2320@TK2MSFTNGP11.phx.gbl...
>>> This is the way I am using KdPrintEx
>>>
>>> KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>>>
>>> "UIFD_open() unable to create driver thread\n"));
>>>
>>> The component_id is what is suggested in DDK for drivers and the levels
>>> are also as suggested in DDK.
>>>
>>> Regds.
>>>
>>>
>>>
>>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>>> news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>>>> Show us the code. What is the component id you are using?
>>>>
>>>> -Eliyas
>>>>
>>>>
>>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>>>> Hi,
>>>>>
>>>>> I am using KdPrintEx in my driver but i keeep getting the 'identifier
>>>>> not found' error. I have included ntddk.h where it is supposed to be
>>>>> defined. I am building teh driver using 'windows checked build
>>>>> environment for XP'. I have looked into teh sample DDK code 'cdrom'
>>>>> which uses KdPrintEx and I see no difference in the way its used in
>>>>> sample and my driver. The cdrom sample builds without errors.
>>>>>
>>>>> Please let me know what mistake I might be making.
>>>>>
>>>>> Regds.
>>>>> Nitin
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: build error with KdPrintEx by tsindia

tsindia
Tue Feb 14 02:21:43 CST 2006

David,

I have included ntddk.h and I am aware that it isin't supported on 9x.
"David J. Craig" <drivers@yoshimuni.com> wrote in message
news:%23%23hY$dTMGHA.3460@TK2MSFTNGP15.phx.gbl...
> No - duh! Maybe it isn't in wdm.h. Try ntddk.h. It isn't supported on
> 9x.
>
> "tsindia" <tsindia@newsgroups.nospam> wrote in message
> news:OplTZSTMGHA.3756@TK2MSFTNGP10.phx.gbl...
>> This is why I find the errors funny, as the other drivers are building
>> fine with the same XP checked build environment.
>>
>> I am pasting the error log here for reference and also the headers I am
>> including. Maybe this will help.
>>
>>>amz_usb_ifdrv.cpp(167) : error C3861: 'KdPrintEx': identifier not found,
>>>even
>> ith argument-dependent lookup
>>>amz_usb_ifdrv.cpp(180) : error C3861: 'KdPrintEx': identifier not found,
>>>even
>> ith argument-dependent lookup
>>>amz_usb_ifdrv.cpp(227) : error C3861: 'KdPrintEx': identifier not found,
>>>even
>> ith argument-dependent lookup
>>>amz_usb_ifdrv.cpp(237) : error C3861: 'KdPrintEx': identifier not found,
>>>even
>> ith argument-dependent lookup
>>>amz_usb_ifdrv.cpp(282) : error C3861: 'KdPrintEx': identifier not found,
>>>even
>> ith argument-dependent lookup
>>
>> I am including the headers:
>>
>> #include "stddef.h"
>>
>> #include "string.h"
>>
>> #include "ntddk.h"
>>
>> #include "driver.h"
>>
>> #include <wdm.h>
>>
>> #pragma warning(disable:4200) // zero-sized array
>>
>> #include <usbdi.h>
>>
>> #include <usbdlib.h>
>>
>> #include <stdio.h>
>>
>>
>> her's a paste of my sources and makefile too..
>>
>> TARGETNAME=TspanUsbDrv
>> TARGETTYPE=DRIVER
>> #DDKROOT=$(_NTDRIVE)$(_NTROOT)
>>
>> C_DEFINES= $(C_DEFINES) -DWMI_SUPPORT -DUSB2
>>
>> TARGETPATH=obj
>>
>> #INCLUDES=$(DDKROOT)\private\ntos\inc;
>> INCLUDES=..\inc;..\..\inc
>>
>> USE_MAPSYM=1
>>
>> TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib \
>> $(DDK_LIB_PATH)\ntoskrnl.lib \
>> NcGen.lib
>>
>> MSC_WARNING_LEVEL=/W3
>>
>>
>> SOURCES= Control.cpp \
>> Debug.cpp \
>> DriverEntry.cpp \
>> ReadWrite.cpp \
>> stddcls.cpp \
>> amz_init.cpp \
>> amz_usb_ifdrv.cpp
>>
>>
>> Makefile:
>>
>> !IF 0
>>
>> Copyright (C) Microsoft Corporation, 1996 - 1998
>>
>> Module Name:
>>
>> makefile.
>>
>> !ENDIF
>>
>> #
>> # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new
>> source
>> # file to this component. This file merely indirects to the real make
>> file
>> # that is shared by all the components of Windows NT
>> #
>>
>> #
>> # if building in a DDK environment
>> #
>> !IF defined(DDK_TARGET_OS)
>>
>> #
>> # ensure that said build environment is at least Windows XP
>> # 0x500 == Windows 2000
>> # 0x501 == Windows XP
>> # 0x502 == Windows .NET
>> #
>> ! IF defined(_NT_TARGET_VERSION) && $(_NT_TARGET_VERSION)>=0x501
>> ! INCLUDE $(NTMAKEENV)\makefile.def
>> ! ELSE
>> ! message BUILDMSG: Warning : The sample "$(MAKEDIR)" is not valid
>> for the current OS target.
>> ! ENDIF
>>
>> !ELSE
>>
>> #
>> # not a DDK environment, probably RAZZLE, so build
>> #
>> ! INCLUDE $(NTMAKEENV)\makefile.def
>>
>> !ENDIF
>>
>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>> news:O6GKTW0LGHA.2320@TK2MSFTNGP11.phx.gbl...
>>>I tried the exact same statement in my driver and it built fine.
>>>
>>> -Eliyas
>>>
>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>> news:O2BoKYTLGHA.2320@TK2MSFTNGP11.phx.gbl...
>>>> This is the way I am using KdPrintEx
>>>>
>>>> KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>>>>
>>>> "UIFD_open() unable to create driver thread\n"));
>>>>
>>>> The component_id is what is suggested in DDK for drivers and the levels
>>>> are also as suggested in DDK.
>>>>
>>>> Regds.
>>>>
>>>>
>>>>
>>>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>>>> news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>>>>> Show us the code. What is the component id you are using?
>>>>>
>>>>> -Eliyas
>>>>>
>>>>>
>>>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>>>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>>>>> Hi,
>>>>>>
>>>>>> I am using KdPrintEx in my driver but i keeep getting the
>>>>>> 'identifier not found' error. I have included ntddk.h where it is
>>>>>> supposed to be defined. I am building teh driver using 'windows
>>>>>> checked build environment for XP'. I have looked into teh sample DDK
>>>>>> code 'cdrom' which uses KdPrintEx and I see no difference in the way
>>>>>> its used in sample and my driver. The cdrom sample builds without
>>>>>> errors.
>>>>>>
>>>>>> Please let me know what mistake I might be making.
>>>>>>
>>>>>> Regds.
>>>>>> Nitin
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: build error with KdPrintEx by David

David
Tue Feb 14 11:25:08 CST 2006

Then why does it say '#include <wdm.h>' below?

"tsindia" <tsindia@newsgroups.nospam> wrote in message
news:uzw6y%23TMGHA.3432@tk2msftngp13.phx.gbl...
> David,
>
> I have included ntddk.h and I am aware that it isin't supported on 9x.
> "David J. Craig" <drivers@yoshimuni.com> wrote in message
> news:%23%23hY$dTMGHA.3460@TK2MSFTNGP15.phx.gbl...
>> No - duh! Maybe it isn't in wdm.h. Try ntddk.h. It isn't supported on
>> 9x.
>>
>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>> news:OplTZSTMGHA.3756@TK2MSFTNGP10.phx.gbl...
>>> This is why I find the errors funny, as the other drivers are building
>>> fine with the same XP checked build environment.
>>>
>>> I am pasting the error log here for reference and also the headers I am
>>> including. Maybe this will help.
>>>
>>>>amz_usb_ifdrv.cpp(167) : error C3861: 'KdPrintEx': identifier not found,
>>>>even
>>> ith argument-dependent lookup
>>>>amz_usb_ifdrv.cpp(180) : error C3861: 'KdPrintEx': identifier not found,
>>>>even
>>> ith argument-dependent lookup
>>>>amz_usb_ifdrv.cpp(227) : error C3861: 'KdPrintEx': identifier not found,
>>>>even
>>> ith argument-dependent lookup
>>>>amz_usb_ifdrv.cpp(237) : error C3861: 'KdPrintEx': identifier not found,
>>>>even
>>> ith argument-dependent lookup
>>>>amz_usb_ifdrv.cpp(282) : error C3861: 'KdPrintEx': identifier not found,
>>>>even
>>> ith argument-dependent lookup
>>>
>>> I am including the headers:
>>>
>>> #include "stddef.h"
>>>
>>> #include "string.h"
>>>
>>> #include "ntddk.h"
>>>
>>> #include "driver.h"
>>>
>>> #include <wdm.h>
>>>
>>> #pragma warning(disable:4200) // zero-sized array
>>>
>>> #include <usbdi.h>
>>>
>>> #include <usbdlib.h>
>>>
>>> #include <stdio.h>
>>>
>>>
>>> her's a paste of my sources and makefile too..
>>>
>>> TARGETNAME=TspanUsbDrv
>>> TARGETTYPE=DRIVER
>>> #DDKROOT=$(_NTDRIVE)$(_NTROOT)
>>>
>>> C_DEFINES= $(C_DEFINES) -DWMI_SUPPORT -DUSB2
>>>
>>> TARGETPATH=obj
>>>
>>> #INCLUDES=$(DDKROOT)\private\ntos\inc;
>>> INCLUDES=..\inc;..\..\inc
>>>
>>> USE_MAPSYM=1
>>>
>>> TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib \
>>> $(DDK_LIB_PATH)\ntoskrnl.lib \
>>> NcGen.lib
>>>
>>> MSC_WARNING_LEVEL=/W3
>>>
>>>
>>> SOURCES= Control.cpp \
>>> Debug.cpp \
>>> DriverEntry.cpp \
>>> ReadWrite.cpp \
>>> stddcls.cpp \
>>> amz_init.cpp \
>>> amz_usb_ifdrv.cpp
>>>
>>>
>>> Makefile:
>>>
>>> !IF 0
>>>
>>> Copyright (C) Microsoft Corporation, 1996 - 1998
>>>
>>> Module Name:
>>>
>>> makefile.
>>>
>>> !ENDIF
>>>
>>> #
>>> # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new
>>> source
>>> # file to this component. This file merely indirects to the real make
>>> file
>>> # that is shared by all the components of Windows NT
>>> #
>>>
>>> #
>>> # if building in a DDK environment
>>> #
>>> !IF defined(DDK_TARGET_OS)
>>>
>>> #
>>> # ensure that said build environment is at least Windows XP
>>> # 0x500 == Windows 2000
>>> # 0x501 == Windows XP
>>> # 0x502 == Windows .NET
>>> #
>>> ! IF defined(_NT_TARGET_VERSION) && $(_NT_TARGET_VERSION)>=0x501
>>> ! INCLUDE $(NTMAKEENV)\makefile.def
>>> ! ELSE
>>> ! message BUILDMSG: Warning : The sample "$(MAKEDIR)" is not
>>> valid for the current OS target.
>>> ! ENDIF
>>>
>>> !ELSE
>>>
>>> #
>>> # not a DDK environment, probably RAZZLE, so build
>>> #
>>> ! INCLUDE $(NTMAKEENV)\makefile.def
>>>
>>> !ENDIF
>>>
>>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>>> news:O6GKTW0LGHA.2320@TK2MSFTNGP11.phx.gbl...
>>>>I tried the exact same statement in my driver and it built fine.
>>>>
>>>> -Eliyas
>>>>
>>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>>> news:O2BoKYTLGHA.2320@TK2MSFTNGP11.phx.gbl...
>>>>> This is the way I am using KdPrintEx
>>>>>
>>>>> KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>>>>>
>>>>> "UIFD_open() unable to create driver thread\n"));
>>>>>
>>>>> The component_id is what is suggested in DDK for drivers and the
>>>>> levels are also as suggested in DDK.
>>>>>
>>>>> Regds.
>>>>>
>>>>>
>>>>>
>>>>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>>>>> news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>>>>>> Show us the code. What is the component id you are using?
>>>>>>
>>>>>> -Eliyas
>>>>>>
>>>>>>
>>>>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>>>>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am using KdPrintEx in my driver but i keeep getting the
>>>>>>> 'identifier not found' error. I have included ntddk.h where it is
>>>>>>> supposed to be defined. I am building teh driver using 'windows
>>>>>>> checked build environment for XP'. I have looked into teh sample DDK
>>>>>>> code 'cdrom' which uses KdPrintEx and I see no difference in the way
>>>>>>> its used in sample and my driver. The cdrom sample builds without
>>>>>>> errors.
>>>>>>>
>>>>>>> Please let me know what mistake I might be making.
>>>>>>>
>>>>>>> Regds.
>>>>>>> Nitin
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: build error with KdPrintEx by tsindia

tsindia
Tue Feb 14 23:33:38 CST 2006

David,

I have to include both wdm.h and ntddk.h. I Hope I can include both.
Ntddk.h for now is required only for KdPrintEx but wdm.h ofcourse has many
definitions that I need.

Regds.

"David J. Craig" <drivers@yoshimuni.com> wrote in message
news:%2382NauYMGHA.2300@TK2MSFTNGP15.phx.gbl...
> Then why does it say '#include <wdm.h>' below?
>
> "tsindia" <tsindia@newsgroups.nospam> wrote in message
> news:uzw6y%23TMGHA.3432@tk2msftngp13.phx.gbl...
>> David,
>>
>> I have included ntddk.h and I am aware that it isin't supported on
>> 9x.
>> "David J. Craig" <drivers@yoshimuni.com> wrote in message
>> news:%23%23hY$dTMGHA.3460@TK2MSFTNGP15.phx.gbl...
>>> No - duh! Maybe it isn't in wdm.h. Try ntddk.h. It isn't supported on
>>> 9x.
>>>
>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>> news:OplTZSTMGHA.3756@TK2MSFTNGP10.phx.gbl...
>>>> This is why I find the errors funny, as the other drivers are building
>>>> fine with the same XP checked build environment.
>>>>
>>>> I am pasting the error log here for reference and also the headers I am
>>>> including. Maybe this will help.
>>>>
>>>>>amz_usb_ifdrv.cpp(167) : error C3861: 'KdPrintEx': identifier not
>>>>>found, even
>>>> ith argument-dependent lookup
>>>>>amz_usb_ifdrv.cpp(180) : error C3861: 'KdPrintEx': identifier not
>>>>>found, even
>>>> ith argument-dependent lookup
>>>>>amz_usb_ifdrv.cpp(227) : error C3861: 'KdPrintEx': identifier not
>>>>>found, even
>>>> ith argument-dependent lookup
>>>>>amz_usb_ifdrv.cpp(237) : error C3861: 'KdPrintEx': identifier not
>>>>>found, even
>>>> ith argument-dependent lookup
>>>>>amz_usb_ifdrv.cpp(282) : error C3861: 'KdPrintEx': identifier not
>>>>>found, even
>>>> ith argument-dependent lookup
>>>>
>>>> I am including the headers:
>>>>
>>>> #include "stddef.h"
>>>>
>>>> #include "string.h"
>>>>
>>>> #include "ntddk.h"
>>>>
>>>> #include "driver.h"
>>>>
>>>> #include <wdm.h>
>>>>
>>>> #pragma warning(disable:4200) // zero-sized array
>>>>
>>>> #include <usbdi.h>
>>>>
>>>> #include <usbdlib.h>
>>>>
>>>> #include <stdio.h>
>>>>
>>>>
>>>> her's a paste of my sources and makefile too..
>>>>
>>>> TARGETNAME=TspanUsbDrv
>>>> TARGETTYPE=DRIVER
>>>> #DDKROOT=$(_NTDRIVE)$(_NTROOT)
>>>>
>>>> C_DEFINES= $(C_DEFINES) -DWMI_SUPPORT -DUSB2
>>>>
>>>> TARGETPATH=obj
>>>>
>>>> #INCLUDES=$(DDKROOT)\private\ntos\inc;
>>>> INCLUDES=..\inc;..\..\inc
>>>>
>>>> USE_MAPSYM=1
>>>>
>>>> TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib \
>>>> $(DDK_LIB_PATH)\ntoskrnl.lib \
>>>> NcGen.lib
>>>>
>>>> MSC_WARNING_LEVEL=/W3
>>>>
>>>>
>>>> SOURCES= Control.cpp \
>>>> Debug.cpp \
>>>> DriverEntry.cpp \
>>>> ReadWrite.cpp \
>>>> stddcls.cpp \
>>>> amz_init.cpp \
>>>> amz_usb_ifdrv.cpp
>>>>
>>>>
>>>> Makefile:
>>>>
>>>> !IF 0
>>>>
>>>> Copyright (C) Microsoft Corporation, 1996 - 1998
>>>>
>>>> Module Name:
>>>>
>>>> makefile.
>>>>
>>>> !ENDIF
>>>>
>>>> #
>>>> # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new
>>>> source
>>>> # file to this component. This file merely indirects to the real make
>>>> file
>>>> # that is shared by all the components of Windows NT
>>>> #
>>>>
>>>> #
>>>> # if building in a DDK environment
>>>> #
>>>> !IF defined(DDK_TARGET_OS)
>>>>
>>>> #
>>>> # ensure that said build environment is at least Windows XP
>>>> # 0x500 == Windows 2000
>>>> # 0x501 == Windows XP
>>>> # 0x502 == Windows .NET
>>>> #
>>>> ! IF defined(_NT_TARGET_VERSION) && $(_NT_TARGET_VERSION)>=0x501
>>>> ! INCLUDE $(NTMAKEENV)\makefile.def
>>>> ! ELSE
>>>> ! message BUILDMSG: Warning : The sample "$(MAKEDIR)" is not
>>>> valid for the current OS target.
>>>> ! ENDIF
>>>>
>>>> !ELSE
>>>>
>>>> #
>>>> # not a DDK environment, probably RAZZLE, so build
>>>> #
>>>> ! INCLUDE $(NTMAKEENV)\makefile.def
>>>>
>>>> !ENDIF
>>>>
>>>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>>>> news:O6GKTW0LGHA.2320@TK2MSFTNGP11.phx.gbl...
>>>>>I tried the exact same statement in my driver and it built fine.
>>>>>
>>>>> -Eliyas
>>>>>
>>>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>>>> news:O2BoKYTLGHA.2320@TK2MSFTNGP11.phx.gbl...
>>>>>> This is the way I am using KdPrintEx
>>>>>>
>>>>>> KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
>>>>>>
>>>>>> "UIFD_open() unable to create driver thread\n"));
>>>>>>
>>>>>> The component_id is what is suggested in DDK for drivers and the
>>>>>> levels are also as suggested in DDK.
>>>>>>
>>>>>> Regds.
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>>>>>> news:OYxlQxMLGHA.420@tk2msftngp13.phx.gbl...
>>>>>>> Show us the code. What is the component id you are using?
>>>>>>>
>>>>>>> -Eliyas
>>>>>>>
>>>>>>>
>>>>>>> "tsindia" <tsindia@newsgroups.nospam> wrote in message
>>>>>>> news:%23xDRQ8GLGHA.2696@TK2MSFTNGP14.phx.gbl...
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am using KdPrintEx in my driver but i keeep getting the
>>>>>>>> 'identifier not found' error. I have included ntddk.h where it is
>>>>>>>> supposed to be defined. I am building teh driver using 'windows
>>>>>>>> checked build environment for XP'. I have looked into teh sample
>>>>>>>> DDK code 'cdrom' which uses KdPrintEx and I see no difference in
>>>>>>>> the way its used in sample and my driver. The cdrom sample builds
>>>>>>>> without errors.
>>>>>>>>
>>>>>>>> Please let me know what mistake I might be making.
>>>>>>>>
>>>>>>>> Regds.
>>>>>>>> Nitin
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: build error with KdPrintEx by Tim

Tim
Tue Feb 14 23:50:35 CST 2006

"tsindia" <tsindia@newsgroups.nospam> wrote:
>
> I have to include both wdm.h and ntddk.h. I Hope I can include both.

Everything in wdm.h is also in ntddk.h. You never need both. If you
aren't targetting Win98, forget about wdm.h.

>Ntddk.h for now is required only for KdPrintEx but wdm.h ofcourse has many
>definitions that I need.

Try rearrangling the headers. Put <ntddk.h> first, then add <string.h> and
<stddef.h>.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: build error with KdPrintEx by tsindia

tsindia
Wed Feb 15 01:15:53 CST 2006

Thanks a lot Tim. I removed wdm.h and that solved my problem.
Regds.
"Tim Roberts" <timr@probo.com> wrote in message
news:v2g5v1pb6p3oehkaa4rs26iu7k3964art4@4ax.com...
> "tsindia" <tsindia@newsgroups.nospam> wrote:
>>
>> I have to include both wdm.h and ntddk.h. I Hope I can include both.
>
> Everything in wdm.h is also in ntddk.h. You never need both. If you
> aren't targetting Win98, forget about wdm.h.
>
>>Ntddk.h for now is required only for KdPrintEx but wdm.h ofcourse has many
>>definitions that I need.
>
> Try rearrangling the headers. Put <ntddk.h> first, then add <string.h>
> and
> <stddef.h>.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.