How to clear up blue screen code stop:0x0000007E

Dear OSR member:
I am an new people on WDM subject. i am study by myself.so sometime make mistake . i wanto create a virtual device and do the action about read or write.
i have build the .sys file successful, but when load the .sys file , the computer will be show the bule screen code :0x0000007E (—can not find the special mode)
I find this infromation but i do not know what is the means . can you tell me that how to clear up this issue?
maybe i use the function ExAllocatePool().
bellow is my code:

DriverEntry()
{
AddDevice;
DriverUnload;
DispatchCreate;
DispatchClose;
DispatchRead;
DispatchWirte
DispatchDeviceControl;

Servkey.Buffer=(PWSTR)ExAllocatePool(PagedPool,…); // *********

}
AddDevice()
{
PDEVICE_EXTENSION pdx;
NTSTATUS status;
status=IoCreateDevice(…);
if(NT_SUCCESS(status))
{


IoInitializeRemoveLock(&pdx->RemoveLock,‘kcol’,0,0);
pdx->DataBuffer=ExAllocatePool(NonPagedPool,1024); //*********
RtlZeroMemory(pdx->DataBuffer,1024);

}

}
Wating for your good news, thanks

Best wishes
Henry


MSN ÖÐÎÄÍø£¬×îÐÂʱÉÐÉú»î×ÊѶ£¬°×Áì¾Û¼¯ÃÅ»§¡£
http://cn.msn.com

Sorry, but you have to debug the problem… using the debugger.

A bugcheck 0x7E is fairly common. It simply means that your driver caused an exception. This could be due to dereferencing a bad pointer, or something else.

The easiest way to do this for somebody that is new to writing drivers is to set a breakpoint in DriverEntry and AddDevice, and step through your code… looking at each call and its return values… until you find WHERE the problem is occurring.

Hope that helps… some.

Peter
OSR

枫hustzhong wrote:

I am an new people on WDM subject. i am study by myself.so
sometime make mistake . i wanto create a virtual device and do the
action about read or write.
i have build the .sys file successful, but when load the .sys file
, the computer will be show the bule screen code :0x0000007E (—can
not find the special mode)

No. That’s what a user-mode error 7E means. A blue screen 7E is in
bugcodes.h: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED.

I find this infromation but i do not know what is the means . can
you tell me that how to clear up this issue?
maybe i use the function ExAllocatePool().

What makes you think that is the problem? Just guessing? As Peter
said, you need to hook up a debugger. The “!analyze -v” command in
Windbg can tell you where the exception occurred.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Following is the information on bugcheck 0x7E taken from WDK.

Use windbg and run !analyze -v it will give information about the 4 parameters.

It gives the bad pointer you are passing as well.

Most probably its a bad pointer that is being passed.

You can look at stack trace that will tell you which function of yours is executing code that is resulting in the BSOD.

Using windbg it gives source level debugging by which you can step through your code to the point which is causing BSOD.

Best of luck!

-Praveen

Bug Check 0x7E: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
The SYSTEM_THREAD_EXCEPTION_NOT_HANDLED bug check has a value of 0x0000007E. This indicates that a system thread generated an exception which the error handler did not catch.

Parameters
The following parameters are displayed on the blue screen.

Parameter Description
1 The exception code that was not handled
2 The address at which the exception occurred
3 The address of the exception record
4 The address of the context record

Cause
This is a very common bug check. To interpret it, you must identify which exception was generated.

Common exception codes include:

a… 0x80000002: STATUS_DATATYPE_MISALIGNMENT
An unaligned data reference was encountered.

b… 0x80000003: STATUS_BREAKPOINT
A breakpoint or ASSERT was encountered when no kernel debugger was attached to the system.

c… 0xC0000005: STATUS_ACCESS_VIOLATION
A memory access violation occurred.

For a complete list of exception codes, see the ntstatus.h file located in the inc directory of the Windows Driver Kit.

Bug Check 0x7E: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
The SYSTEM_THREAD_EXCEPTION_NOT_HANDLED bug check has a value of 0x0000007E. This indicates that a system thread generated an exception which the error handler did not catch.

Parameters
The following parameters are displayed on the blue screen.

Parameter Description
1 The exception code that was not handled
2 The address at which the exception occurred
3 The address of the exception record
4 The address of the context record

Cause
This is a very common bug check. To interpret it, you must identify which exception was generated.

Common exception codes include:

a… 0x80000002: STATUS_DATATYPE_MISALIGNMENT
An unaligned data reference was encountered.

b… 0x80000003: STATUS_BREAKPOINT
A breakpoint or ASSERT was encountered when no kernel debugger was attached to the system.

c… 0xC0000005: STATUS_ACCESS_VIOLATION
A memory access violation occurred.

For a complete list of exception codes, see the ntstatus.h file located in the inc directory of the Windows Driver Kit.

“??hustzhong” wrote in message news:xxxxx@ntdev…
Dear OSR member:
I am an new people on WDM subject. i am study by myself.so sometime make mistake . i wanto create a virtual device and do the action about read or write.
i have build the .sys file successful, but when load the .sys file , the computer will be show the bule screen code :0x0000007E (—can not find the special mode)
I find this infromation but i do not know what is the means . can you tell me that how to clear up this issue?
maybe i use the function ExAllocatePool().
bellow is my code:

DriverEntry()
{
AddDevice;
DriverUnload;
DispatchCreate;
DispatchClose;
DispatchRead;
DispatchWirte
DispatchDeviceControl;

Servkey.Buffer=(PWSTR)ExAllocatePool(PagedPool,…); //

}
AddDevice()
{
PDEVICE_EXTENSION pdx;
NTSTATUS status;
status=IoCreateDevice(…);
if(NT_SUCCESS(status))
{


IoInitializeRemoveLock(&pdx->RemoveLock,‘kcol’,0,0);
pdx->DataBuffer=ExAllocatePool(NonPagedPool,1024); //

RtlZeroMemory(pdx->DataBuffer,1024);



}

}
Wating for your good news, thanks

Best wishes
Henry

------------------------------------------------------------------------------
???ɰ?Hotmail???ص???أ??? Windows Live Mail?? ???ԣ?