Re: I am loosing the handle



Thank you all, I have found my bug, I had written some test code that
involved a character buffer, it was being overwritten.

the character buffer, followed by clComm pointer to my class that the first
thing it encounters is hComm, thus that was the first thing it would
overwrite. Now I removed this test code and everything is back to normal.

Thank you much,,,,
Neil
"Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:OGfekbNBGHA.976@xxxxxxxxxxxxxxxxxxxxxxx
> it sounds like you have a buffer overrun occuring somewhere in your code.
> if you are using visual studio, you can set a breakpoint on the memory
> address of the handle and see who is overwriting the value.
>
> there is no part of memory that is protected at run time. you have a bug,
> you need to fix it. even thoug the hComm field is now staying the same,
> some other part of the class is now being overwritten where hComm used to
> be.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> "Neil" <neil@xxxxxxxxxx> wrote in message
> news:XIDpf.6483$k76.1399@xxxxxxxxxxxxxxxxxxxxxxxxx
> >
> > "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote in message
> > news:OG9oEmLBGHA.272@xxxxxxxxxxxxxxxxxxxxxxx
> >> Access specifiers are compile-time protection. They don't affect run
> >> time.
> >>
> >
> > Then, I guess by moving hComm from the top, to a bottom place is what
> > actually did it? Because now it is not getting overwritten, what could
> > have
> > caused this to happen? How can I protect hComm from getting overwritten
> > in
> > the future? Is there a part in memory that is protected during
run-time?
> >
> > Thank you,
> > Neil
> >
> >
>
>


.


Loading