Problems porting WDM to Vista RC1

J

john

I'm trying to port my WDM driver to Vista RC1 but I crashes during
driver initialization.
Using Windbg, I narrowed it down to a RtlIntegerToUnicode system call.
This function works perfectly in W2K or XP. Did MS do anything
different in this function?

I also can't get my KdPrint statement to be displayed.

John
 
J

john

I'm trying to port my WDM driver to Vista RC1 but I crashes during
driver initialization.
Using Windbg, I narrowed it down to a RtlIntegerToUnicode system call.
This function works perfectly in W2K or XP. Did MS do anything
different in this function?

I also can't get my KdPrint statement to be displayed.

John


I found out what was causing the problem and there was a change in
Vista.

In the RtlIntegerToUnicode system call, the Unicode String was
initialized using the address to a constant character string (L" ").
Apparently, Vista does not like for you to modify the address pointed
to by L" ". Once I modified the code to allocate memory for the
Unicode String, Vista didn't crash anymore.

My driver is still not loading (see my other post) though.

John
 
V

Venus²²

john said:
I found out what was causing the problem and there was a change in
Vista.

In the RtlIntegerToUnicode system call, the Unicode String was
initialized using the address to a constant character string (L" ").
Apparently, Vista does not like for you to modify the address pointed
to by L" ". Once I modified the code to allocate memory for the
Unicode String, Vista didn't crash anymore.

My driver is still not loading (see my other post) though.

John

Huummmmmmmmm I thought you already fixed it when you said "I've found out.."
Go get it done John.
 
D

Doron Holan [MS]

it doesn't work b/c you are passing read only constant data to a funciton
which will write to it. XP and later has had this functionality, but it
depends on the amount of memory you have in the machine if it is on or not

d
 
J

john

Thank for the response.

I found out that Vista will not allow the memory of a constant wchar
string to be modified. XP and 2000 apparently don't care.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top