Hi All,
I'm trying to create a local Structure to store some network information in
it...
I have declared my struct as following:
GLOBALS.H
typedef
struct _MyStruct
{
ULONG MyField1;
...
long MyFiendN;
}
MyStruct, *PMyStruct;
extern MyStruct g_MyStruct
GLOBAL.C
MyStruct g_MyStruct;
NetMonitor.C <-- this is a new file that I have added to the Passthru
structure.
PMyStruct g_MyStruct;
g_MyStruct->MyField1 = pAdapt->LinkSpeed;
Then during the compile I get the following error:
error C4700: local variable g_MyStruct used without having been initialized
so I go to my NetMonitor.c and I make the following change:
PMyStruct MyNetwork = NULL;
MyNetwork->MyField1 = pAdapt->LinkSpeed;
Then the system crashes that couldn't fill the object g_MyStruct->MyField1
and here is the error from dbgview:
DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)
An attempt was made to access a pageable (or completely invalid) address at
an
interrupt request level (IRQL) that is too high. This is usually
caused by drivers using improper addresses.
If kernel debugger is available get stack backtrace.
Arguments:
Arg1: 00000000, memory referenced
Arg2: 00000002, IRQL
Arg3: 00000001, value 0 = read operation, 1 = write operation
Arg4: bf797eed, address which referenced memory