Dear All,

Recently I read the article "Try This -- Interactive Driver Testing" (The NT
Inside, Vol 11). It introduces a minimal driver skeleton. I tried to build
the code, but encountered a compiler error.

The code uses the function "DbgPrompt". But there is no declaration of
DbgPrompt in any *.h files in Win DDK (2600). And there is no information
about this function in DDK's help.

I have noted that the function is exported by ntoskrnl.lib. So I added
"TARGETLIBS=$(DDK_LIB_PATH)\ntoskrnl.lib" in "source" file. But I still need
to know the declaration of the function "DbgPrompt".

Can anyone tell me about this or how to use "DbgPrompt" in drivers.

Thanks in advance.

Re: How to use DbgPrompt in drivers? by Don

Don
Thu Apr 21 07:21:15 CDT 2005

There was a bug in the posted code, the correct definition of DebPrompt is:

int DbgPrompt(PCHAR string, PCHAR buf, ULONG bufsize))

Where:

string is a string to be displayed
buf is the buffer to receive the line from WinDBG
bufsize is the size of the buffer

The function returns the number of chatacters read. Note: this should be
used for testing purposes only, the function is undocumented.


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



"Zhou" <changzhi_zhou@163.com> wrote in message
news:euCzodlRFHA.3544@TK2MSFTNGP12.phx.gbl...
> Dear All,
>
> Recently I read the article "Try This -- Interactive Driver Testing" (The
> NT
> Inside, Vol 11). It introduces a minimal driver skeleton. I tried to build
> the code, but encountered a compiler error.
>
> The code uses the function "DbgPrompt". But there is no declaration of
> DbgPrompt in any *.h files in Win DDK (2600). And there is no information
> about this function in DDK's help.
>
> I have noted that the function is exported by ntoskrnl.lib. So I added
> "TARGETLIBS=$(DDK_LIB_PATH)\ntoskrnl.lib" in "source" file. But I still
> need
> to know the declaration of the function "DbgPrompt".
>
> Can anyone tell me about this or how to use "DbgPrompt" in drivers.
>
> Thanks in advance.
>
>
>



Re: How to use DbgPrompt in drivers? by Zhou

Zhou
Thu Apr 21 08:46:08 CDT 2005

Thanks a lot for your help :)


"Don Burn" <burn@stopspam.acm.org> wrote in message
news:%UM9e.13744$Jg7.3133@fe03.lga...
> There was a bug in the posted code, the correct definition of DebPrompt
is:
>
> int DbgPrompt(PCHAR string, PCHAR buf, ULONG bufsize))
>
> Where:
>
> string is a string to be displayed
> buf is the buffer to receive the line from WinDBG
> bufsize is the size of the buffer
>
> The function returns the number of chatacters read. Note: this should be
> used for testing purposes only, the function is undocumented.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
>
> "Zhou" <changzhi_zhou@163.com> wrote in message
> news:euCzodlRFHA.3544@TK2MSFTNGP12.phx.gbl...
> > Dear All,
> >
> > Recently I read the article "Try This -- Interactive Driver Testing"
(The
> > NT
> > Inside, Vol 11). It introduces a minimal driver skeleton. I tried to
build
> > the code, but encountered a compiler error.
> >
> > The code uses the function "DbgPrompt". But there is no declaration of
> > DbgPrompt in any *.h files in Win DDK (2600). And there is no
information
> > about this function in DDK's help.
> >
> > I have noted that the function is exported by ntoskrnl.lib. So I added
> > "TARGETLIBS=$(DDK_LIB_PATH)\ntoskrnl.lib" in "source" file. But I still
> > need
> > to know the declaration of the function "DbgPrompt".
> >
> > Can anyone tell me about this or how to use "DbgPrompt" in drivers.
> >
> > Thanks in advance.
> >
> >
> >
>
>