From: rahul on
Sometimes in WATCH window of VS.NET (MFC) value of object is dispalyed
0x00000081 {unused=???}
What is the meaning of "{unused=???}" in watch window.
Also what is the meaning of CX0030 error:(expression can not be
evaluated)
From: Stephen Myers on
rahul wrote:
> Sometimes in WATCH window of VS.NET (MFC) value of object is dispalyed
> 0x00000081 {unused=???}
> What is the meaning of "{unused=???}" in watch window.
> Also what is the meaning of CX0030 error:(expression can not be
> evaluated)

Low values like 0x00000081 are generally the result of the IDE trying to
understand an object based on a null pointer. This causes all kinds
of problems when the IDE tries to display information.

Check that the base address for the object is not NULL.

Steve
From: Drew on

"rahul" <hyrahul64(a)gmail.com> wrote in message
news:d2546bfd-1a59-47ed-b80d-39953946c507(a)e37g2000yqn.googlegroups.com...
> Sometimes in WATCH window of VS.NET (MFC) value of object is dispalyed
> 0x00000081 {unused=???}

What object? What version of VS? What OS?

> What is the meaning of "{unused=???}" in watch window.
> Also what is the meaning of CX0030 error:(expression can not be
> evaluated)

The meaning is self explanatory. Is this expression a static? No information
can be provided without further context. It looks like some offset of a NULL
pointer. Show some code.

Drew


From: Joseph M. Newcomer on
Since you did not mention the type of the object, it is hard to give you a good
explanation. However, it is most likely it is a HANDLE type of some sort. Examining the
definition of a handle, we find that

#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__
*name

so that would explain the "unused" name.

CX0030 means that you have an expression that evaluates to an illegal address, or involves
a reference to an illegal address. For example

WHATEVER * p;

If you look at p in the debugger, if p is a valid pointer, it will show you what it points
to; you can expand the structure, for example. If p is NULL, or 0xCCCCCCCC [an
uninitialized local in debug mode], 0xDFDFDFDF [an uninitialized heap value in debug
mode], or 0xFEEEFEEE [a pointer found in a structure that has been freed] then you are
told it is an expression which cannot be evaluated.
joe

On Wed, 20 Jan 2010 22:59:24 -0800 (PST), rahul <hyrahul64(a)gmail.com> wrote:

>Sometimes in WATCH window of VS.NET (MFC) value of object is dispalyed
>0x00000081 {unused=???}
>What is the meaning of "{unused=???}" in watch window.
>Also what is the meaning of CX0030 error:(expression can not be
>evaluated)
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm