The statement
DbgPrint(( __LINE__ "\n" ));
results in compilation error
error C2143: syntax error : missing ')' before 'string'
warning C4047: 'function' : 'PCSTR' differs in levels of indirection
from 'int'
warning C4024: 'DbgPrint' : different types for formal and actual
parameter 1
while the statement
DbgPrint(( "%d \n", __LINE__ ));
gives the following compilation warnings (errors):
warning C4047: 'function' : 'PCSTR' differs in levels of indirection
from 'int'
warning C4047: 'function' : 'PCSTR' differs in levels of indirection
from 'int'
warning C4024: 'DbgPrint' : different types for formal and actual
parameter 1
warning C4024: 'DbgPrint' : different types for formal and actual
parameter 1
Can any one point me if there is any problem in my code (DbgPrint
statements).
I have not faced this problem with earlier versions of WDK/DDK on
Vista
Thanks,
Mark
> DbgPrint(( "%d \n", __LINE__ ));
Either use fewer parentheses or switch to KdPrint.
Hope this helps,
Alberto.
You have two problems. First, DbgPrint is a real function, and thus only
takes one set of parens. KdPrint is a macro, and requires two sets.
Second, just as the error message says, __LINE__ is an integer, not a
string. You can't pass it where a string is expected.
>I have not faced this problem with earlier versions of WDK/DDK on
>Vista
You probably used KdPrint instead of DbgPrint.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.