Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to cancel the ContextMenu! Pin
Nick Parker13-Aug-04 11:37
protectorNick Parker13-Aug-04 11:37 
GeneralProcess Information Pin
DRVoodoo12-Aug-04 14:34
DRVoodoo12-Aug-04 14:34 
GeneralLimit to one cpu Pin
Mr. Rogers12-Aug-04 13:23
Mr. Rogers12-Aug-04 13:23 
GeneralRe: Limit to one cpu Pin
Arun Bhalla12-Aug-04 13:32
Arun Bhalla12-Aug-04 13:32 
GeneralRe: Limit to one cpu Pin
Daniel Turini12-Aug-04 13:44
Daniel Turini12-Aug-04 13:44 
GeneralRe: Limit to one cpu Pin
parths12-Aug-04 23:58
parths12-Aug-04 23:58 
GeneralRe: Limit to one cpu Pin
Mr. Rogers13-Aug-04 2:41
Mr. Rogers13-Aug-04 2:41 
GeneralThread groups -or- handling singletons in an AppDomain Pin
Arun Bhalla12-Aug-04 13:00
Arun Bhalla12-Aug-04 13:00 
I'm in a somewhat sticky situation.

I'm developing an Explorer Bar (for IE). In my implementation, I used a few singletons for very important (core) classes which are, by design, singleton. I guess I didn't want to have to manage parent-child relations for conceivably every object I worked with, but it seems like that was a bad decision. This worked okay until I realized that new windows in IE (such as created by Ctrl-N or File->New Window) are running in the same process, and since the singleton pattern I'm using does so with a static accessor (get) property, this system fails as I believe the two instances of the Explorer Bar are running in the same AppDomain because they're running in two different threads of the same IE process. So basically, instead of having separate singletons per thread group, then end up sharing the same singleton, which is bad for Windows Forms objects. Smile | :)

The kinda tricky thing is that my Explorer Bar is multi-threaded, so I can't just implement my singleton accessor using a hashtable keyed on the thread ID. If there were a way to access a thread group ID, or some sort of way to figure out which thread ID or IE window owns that particular CLR instance, that would be helpful.

So any suggestions, managed or unmanaged, would be helpful. Maybe I simply need to rearchitect everything, even though now really isn't the best time for that. I'd rather be able to add a few lines into my singleton accessor (Singleton.Instance) instead.

Thanks!
Arun

Generalenum to int Pin
Lasse Johansen12-Aug-04 12:50
Lasse Johansen12-Aug-04 12:50 
GeneralRe: enum to int Pin
Arun Bhalla12-Aug-04 13:08
Arun Bhalla12-Aug-04 13:08 
GeneralRe: enum to int Pin
Lasse Johansen12-Aug-04 13:28
Lasse Johansen12-Aug-04 13:28 
QuestionScroll Bar???? Pin
Anonymous12-Aug-04 10:15
Anonymous12-Aug-04 10:15 
AnswerRe: Scroll Bar???? Pin
Nick Parker12-Aug-04 11:35
protectorNick Parker12-Aug-04 11:35 
Generalwx.NET Cross-Platform UI Toolkit - NEW VERSION Pin
t9mike12-Aug-04 9:57
t9mike12-Aug-04 9:57 
GeneralRe: wx.NET Cross-Platform UI Toolkit - NEW VERSION Pin
Nick Parker12-Aug-04 11:36
protectorNick Parker12-Aug-04 11:36 
GeneralLate Binding to Powerpoint and Events Pin
SBolder12-Aug-04 9:36
SBolder12-Aug-04 9:36 
Generalplease help me in DataGrid Pin
ImanMahmoud12-Aug-04 9:09
ImanMahmoud12-Aug-04 9:09 
GeneralJoining Two DataSets Pin
YiannisF12-Aug-04 9:08
YiannisF12-Aug-04 9:08 
GeneralJoining Two DataSets Pin
YiannisF12-Aug-04 9:08
YiannisF12-Aug-04 9:08 
GeneralRe: Joining Two DataSets Pin
Wender Oliveira12-Aug-04 10:29
Wender Oliveira12-Aug-04 10:29 
GeneralUI Design Question Pin
ddelapasse12-Aug-04 8:54
ddelapasse12-Aug-04 8:54 
GeneralRe: UI Design Question Pin
mav.northwind12-Aug-04 20:15
mav.northwind12-Aug-04 20:15 
Generalproperty binding Pin
Member 114126612-Aug-04 8:47
Member 114126612-Aug-04 8:47 
GeneralCryptoStream does not work over NetworkStream Pin
mircea8512-Aug-04 8:17
mircea8512-Aug-04 8:17 
QuestionError in objConexao = New SqlConnection(connString); ?? Pin
vilmarbr12-Aug-04 7:55
vilmarbr12-Aug-04 7:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.