Re: System hang with ATI x1600 or x300 video card installed

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



rbaddanki@xxxxxxxxx wrote:

I'm kind of isolated the issue.

In my AddDevice function I've the following subroutine:

void InitializeTimer()
{

LARGE_INTEGER duetime = {0};

// Set up the timer for entropy gathering.
KeInitializeDpc(&dpc, GetEntropy, NULL);
KeInitializeTimerEx(&timer, NotificationTimer);
KeSetTimerEx(&timer, duetime, INTERVAL, &dpc);
}

If I call the above function two times consequently it is hanging,
why? Please answer.

Why? Because you are trashing the memory for the timer and DPC structures,
after you have already turned it over to the kernel. These structures get
stuffed with information and linked into the kernel's data structures. By
overwriting the data, you screw up this linkage.

Is this just a paraphrase, or are "dpc" and "timer" really global
variables? No modern programmer would actually use global variables in a
driver, would they?
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.