Silly DDK #include problem...

I need to convert a multibyte string to a unicode string to be used with the
ZwCreateFile function in my wdm kernel streaming driver.

The only suitable function that does this seems to be the
MultiByteToWideChar, which is defined in winnls.h.

My problem: the compiler finds 102 errors in the winnls.h file.

An example, it complains for all typedefs.

typedef DWORD LGRPID;

creates the following compile errors:

“c:\winddk\inc\crt\winnls.h(685) : error C2061: syntax error : identifier
‘LGRPID’”
“c:\winddk\inc\crt\winnls.h(685) : error C2059: syntax error : ‘;’”

My driver is a modified version of the testcap sample.

Could someone tell me what I am doing wrong here?

Thanks…

Johan
[slightly frustrated DDK newbie]


Hitta rätt på nätet med MSN Sök http://search.msn.se/

Try RtlAnsiStringToUnicodeString()

DDK Developer wrote:

I need to convert a multibyte string to a unicode string to be used
with the ZwCreateFile function in my wdm kernel streaming driver.

The only suitable function that does this seems to be the
MultiByteToWideChar, which is defined in winnls.h.

My problem: the compiler finds 102 errors in the winnls.h file.

An example, it complains for all typedefs.

typedef DWORD LGRPID;

creates the following compile errors:

“c:\winddk\inc\crt\winnls.h(685) : error C2061: syntax error :
identifier ‘LGRPID’”
“c:\winddk\inc\crt\winnls.h(685) : error C2059: syntax error : ‘;’”

My driver is a modified version of the testcap sample.

Could someone tell me what I am doing wrong here?

Thanks…

Johan
[slightly frustrated DDK newbie]


Hitta rätt på nätet med MSN Sök http://search.msn.se/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@bitdefender.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

>Try RtlAnsiStringToUnicodeString()

Thanks :)))


Chatt: Träffa nya nätkompisar på Habbo Hotel
http://habbohotel.msn.se/habbo/sv/channelizer