i have a c# library with 2 objects, say object1 and object2. object1 is created each time an instance of internet explorer is opened (through a bho written in vc++). object1 then creates an instance of object2, which stores data and does some logging type operations. this works fine, except object2 has some members that i need to be shared between all instances of object1. i thought that simply making them static would be ok, but this doesnt seem to be the case.
normally i would create one instance of object2, and pass that in to each instance of object1, and there would be no problem. but an instance of the bho object is created for every ie window that is opened, so there is no opportunity to do that in this case. is there some property i can add to the class or to the members to fix this, or can someone think of another way to get around my problem?
fyi: i know my app sounds like spyware, because it is spyware. but it is for a good reason, i am helping with research at my university to make personalized search results. so dont judge me
what we see depends mainly on what we look for.
--John Lubbock
normally i would create one instance of object2, and pass that in to each instance of object1, and there would be no problem. but an instance of the bho object is created for every ie window that is opened, so there is no opportunity to do that in this case. is there some property i can add to the class or to the members to fix this, or can someone think of another way to get around my problem?
fyi: i know my app sounds like spyware, because it is spyware. but it is for a good reason, i am helping with research at my university to make personalized search results. so dont judge me
what we see depends mainly on what we look for.
--John Lubbock