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

Re: error - no object file generated by Sandra

Sandra
Fri Dec 10 20:36:51 CST 2004

well.... figured it out... programming overlook...

"Sandra" <sandra@noemailplease.com> wrote in message
news:O4LMXSy3EHA.2404@TK2MSFTNGP14.phx.gbl...
> 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
>
>
>
>



Re: error - no object file generated by Maxim

Maxim
Sun Dec 12 12:18:29 CST 2004

> NetMonitor.C <-- this is a new file that I have added to the Passthru
> structure.
>
> PMyStruct g_MyStruct;

Here is redeclaration. The global was already declared in the header as
"extern", do not redeclare it.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com