From: Alex Y Wang on
Hi all, I need to create a taskbar icon in my program with one of our
library functions. I've constantly got a memory corruption which
turned out to be caused by the size of NOTIFYICONDATA changing. I
tried sizeof(NOTIFYICONDATA) in the immediate window both inside and
outside the library function, I got different values! one is 88 and
the other is 488. I've done some research and got the idea that the
size of this data structure depends on the version of shell32.dll, but
I still can't figure out at which point this value may change and how
to prevent it. Can anybody help me? Thanks.

Alex

From: David Lowndes on
>Hi all, I need to create a taskbar icon in my program with one of our
>library functions. I've constantly got a memory corruption which
>turned out to be caused by the size of NOTIFYICONDATA changing.
> I
>tried sizeof(NOTIFYICONDATA) in the immediate window both inside and
>outside the library function, I got different values! one is 88 and
>the other is 488.

Alex,

It might be that you're building with inconsistent settings of
projects. The structure has been expanded for different operating
systems, so it's possible one part of your project is build for one
version of the OS, and another part a different one.

Have a look at WINVER and the topic titled "Using the Windows Headers"
in MSDN.

Dave
From: Kellie Fitton on
On Oct 12, 6:18 am, Alex Y Wang <redflying...(a)gmail.com> wrote:
> Hi all, I need to create a taskbar icon in my program with one of our
> library functions. I've constantly got a memory corruption which
> turned out to be caused by the size of NOTIFYICONDATA changing. I
> tried sizeof(NOTIFYICONDATA) in the immediate window both inside and
> outside the library function, I got different values! one is 88 and
> the other is 488. I've done some research and got the idea that the
> size of this data structure depends on the version of shell32.dll, but
> I still can't figure out at which point this value may change and how
> to prevent it. Can anybody help me? Thanks.
>
> Alex


Hi,

What happens when you use the following function first:

SecureZeroMemory()

http://msdn2.microsoft.com/en-us/library/aa366877.aspx

Kellie.