Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Need help understanding error 0x80010108


Message #1 by "Mark Phillips" <mark@p...> on Wed, 23 Oct 2002 19:49:51
Marco,

I am looking into the sequence of commands that I send to the control to 
make sure I am not creating a problem.

The form is unloaded if the user kills it or the user hits the exit 
button, and not before. The form is actually sitting in front of me on the 
screen when the control dies!

The module does not keep a local reference to it - I pass it in each time 
the user wants to rotate the object. When the method exist, the object 
goes out of scope. I expected the refernce count to increase by one when I 
enter the method and then decrease by one when I exit, but the form is 
still chugging along so I should still have the form's reference to the 
object. I do have a local variable in the form to reference the control, 
so I guess there are really 2 references.

No DoEvents so far.....knock on wood.

Thanks for your help!

Mark

> Hi Mark,

> thanks for the explanation. I wished our clients could be
t> hat precise!

> When you pass objects in VB, they are always by reference. VB does
n> ot create a copy of them, it just increases the reference count.
I> t is strange that you do not always have this problem. Did you
t> ry if there is a sequence of operations that always causes it?
T> hat could be helpful.
Y> ou said that the form is loaded at run time. When does it go
o> ut of scope? Do you unload it in the code or leave it to the
u> ser to hit the X button? 
W> hen you pass the component to the module, does the module keeps
a>  local reference of it, or the reference goes out of scope
a> t the end of the method? Are you sure that the method in the
m> odule terminates before the form unload? Do you have DoEvents
i> n your code?
I>  use your same tecnique a lot (and I am very careful not to create
c> ircular references, because I work with usercontrols) passing 
s> tandard VB controls, and I never had that problem.

> Marco

> PS: even if the LEAD guys say that that is a VB error, it does not
m> ean that their components are bug-free...

  Return to Index