Click here to Skip to main content
15,890,412 members
Home / Discussions / C#
   

C#

 
GeneralRe: .Net Bug, Anyone else have this problem... Pin
T Jenniges31-Oct-02 8:01
T Jenniges31-Oct-02 8:01 
GeneralRe: .Net Bug, Anyone else have this problem... Pin
Stephane Rodriguez.31-Oct-02 8:09
Stephane Rodriguez.31-Oct-02 8:09 
QuestionHow to give focus to the child window in a SDI App Pin
kiranj31-Oct-02 6:27
kiranj31-Oct-02 6:27 
AnswerRe: How to give focus to the child window in a SDI App Pin
John Fisher1-Nov-02 12:28
John Fisher1-Nov-02 12:28 
GeneralCasting and WMI problem Pin
Anonymous31-Oct-02 5:19
Anonymous31-Oct-02 5:19 
GeneralRe: Casting and WMI problem Pin
Paul Riley31-Oct-02 5:48
Paul Riley31-Oct-02 5:48 
GeneralRe: Casting and WMI problem Pin
Anonymous31-Oct-02 11:31
Anonymous31-Oct-02 11:31 
QuestionHow to disabled some TabPage? Pin
Anonymous31-Oct-02 2:15
Anonymous31-Oct-02 2:15 
QuestionMessage or Callback? Pin
Daniel Strigl30-Oct-02 22:38
Daniel Strigl30-Oct-02 22:38 
AnswerRe: Message or Callback? Pin
James T. Johnson30-Oct-02 22:48
James T. Johnson30-Oct-02 22:48 
AnswerRe: Message or Callback? Pin
John Fisher31-Oct-02 9:07
John Fisher31-Oct-02 9:07 
GeneralRe: Message or Callback? Pin
Daniel Strigl4-Nov-02 0:54
Daniel Strigl4-Nov-02 0:54 
Generalcreating an add-in with c# Pin
Danny Rodriguez30-Oct-02 18:58
Danny Rodriguez30-Oct-02 18:58 
GeneralRe: creating an add-in with c# Pin
Steven Lyons30-Oct-02 19:52
Steven Lyons30-Oct-02 19:52 
GeneralClickety Police! Pin
David Stone31-Oct-02 3:59
sitebuilderDavid Stone31-Oct-02 3:59 
QuestionPlaceholders in C#? Pin
Anonymous30-Oct-02 18:21
Anonymous30-Oct-02 18:21 
AnswerRe: Placeholders in C#? Pin
Steven Lyons30-Oct-02 19:44
Steven Lyons30-Oct-02 19:44 
AnswerRe: Placeholders in C#? Pin
Daniel Turini31-Oct-02 8:09
Daniel Turini31-Oct-02 8:09 
Questionwhy a referenced dll can not check out??? Pin
fftongzhi30-Oct-02 15:40
fftongzhi30-Oct-02 15:40 
AnswerRe: why a referenced dll can not check out??? Pin
Daniel Turini31-Oct-02 8:04
Daniel Turini31-Oct-02 8:04 
GeneralRe: why a referenced dll can not check out??? Pin
fftongzhi31-Oct-02 14:27
fftongzhi31-Oct-02 14:27 
GeneralIndexer problem Pin
nothign12312330-Oct-02 11:31
nothign12312330-Oct-02 11:31 
GeneralStrange Mutex Behavior Pin
EricK730-Oct-02 9:26
sussEricK730-Oct-02 9:26 
GeneralRe: Strange Mutex Behavior Pin
EricK730-Oct-02 11:17
sussEricK730-Oct-02 11:17 
I figured out some more details of what's going on. It is still a mystery to me.

My application actually does more than just shutdown when it finds out that there is another instance of the application running. It notifies the first instance that there was an attempt to open another instance. It does so by using Remoting, marshalling a communicator object using a TcpChannel.

When the first instance starts it begins by creating a Mutex, it then creates the communicator object, publishes it to a Uri, creates a TcpChannel, and registers the TcpChannel. The Mutex suceeds in blocking all subsequent instances up until the point it creates the TcpChannel. The thread should still own the Mutex since I neither removed the Mutex nor exited the thread. The funny thing is that when debug information is included and compiler optimization is turned off, the Mutex blocks until the first instance is closed...

The line that creates the TcpChannel, and which seems to be causing the problems with the Mutex is as follows:
TcpChannel tcp = New TcpChannel(props, null, null);

where props is justa hastable with bindTo=127.0.0.1 and port=0.

Any ideas?
GeneralRe: Strange Mutex Behavior Pin
Richard Deeming30-Oct-02 23:50
mveRichard Deeming30-Oct-02 23:50 

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.