Click here to Skip to main content
15,921,660 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Class prototype? Pin
Tim Smith1-Feb-02 14:40
Tim Smith1-Feb-02 14:40 
GeneralRe: Class prototype? Pin
Tantalus1-Feb-02 16:30
Tantalus1-Feb-02 16:30 
GeneralRe: Class prototype? Pin
Swinefeaster1-Feb-02 16:37
Swinefeaster1-Feb-02 16:37 
GeneralSort of Serialization Pin
1-Feb-02 14:00
suss1-Feb-02 14:00 
GeneralRe: Sort of Serialization Pin
Swinefeaster1-Feb-02 14:03
Swinefeaster1-Feb-02 14:03 
GeneralRe: Sort of Serialization Pin
1-Feb-02 14:44
suss1-Feb-02 14:44 
GeneralRe: Sort of Serialization Pin
Matt Gullett1-Feb-02 14:52
Matt Gullett1-Feb-02 14:52 
GeneralCMutex Pin
Cathy1-Feb-02 13:55
Cathy1-Feb-02 13:55 
I need to allow users to run more than one instance of my app. Unfortunately I have to use Netbios functions. I have found that my app locks up the entire machine if one instance is deleting the name from the name table at the same time the other one resetting the lanas or adding the name. So I thought I could use a mutex to have the second one wait if the first one is deleting the name. Unfortunately it doesn't seem to work. Here is the code:

CMutex mutex(TRUE, "application name - Stopping or starting network stuff");
CSingleLock lock(&mutex);
lock.Lock();

The first one exectutes this and has not exited the function (so the mutex has not been deleted) when the second one executes this. The second one does not wait.

What am I doing wrong?

Confused | :confused:

Cathy

Life's uncertain, have dessert first!
GeneralRe: CMutex Pin
Rick York1-Feb-02 18:03
mveRick York1-Feb-02 18:03 
GeneralRe: CMutex Pin
Cathy1-Feb-02 20:39
Cathy1-Feb-02 20:39 
GeneralRe: CMutex Pin
Rick York1-Feb-02 21:08
mveRick York1-Feb-02 21:08 
GeneralRe: CMutex Pin
Cathy2-Feb-02 5:13
Cathy2-Feb-02 5:13 
GeneralWTF Pin
Stephen Caldwell1-Feb-02 13:02
Stephen Caldwell1-Feb-02 13:02 
GeneralRe: WTF Pin
Swinefeaster1-Feb-02 14:01
Swinefeaster1-Feb-02 14:01 
GeneralRe: WTF Pin
Sprudling1-Feb-02 14:03
Sprudling1-Feb-02 14:03 
GeneralRe: WTF Pin
Stephen Caldwell1-Feb-02 14:27
Stephen Caldwell1-Feb-02 14:27 
GeneralRe: WTF Pin
Tim Smith1-Feb-02 14:32
Tim Smith1-Feb-02 14:32 
GeneralCapturing the contents of another window... Pin
Peter Weyzen1-Feb-02 12:37
Peter Weyzen1-Feb-02 12:37 
GeneralRe: Capturing the contents of another window... Pin
Stephen Caldwell1-Feb-02 13:22
Stephen Caldwell1-Feb-02 13:22 
Generalmany functions to just one Pin
Steve L.1-Feb-02 11:34
Steve L.1-Feb-02 11:34 
GeneralRe: many functions to just one Pin
Ravi Bhavnani1-Feb-02 11:54
professionalRavi Bhavnani1-Feb-02 11:54 
GeneralExtended Stored Procedures Pin
RK_20001-Feb-02 9:27
RK_20001-Feb-02 9:27 
GeneralRe: further to my question Pin
RK_20001-Feb-02 11:44
RK_20001-Feb-02 11:44 
GeneralNew version of CButtonSSL Pin
Derek Lakin1-Feb-02 9:14
Derek Lakin1-Feb-02 9:14 
GeneralFont display problems in NT, 2000 but not in 9x Pin
Jason Hihn1-Feb-02 8:23
Jason Hihn1-Feb-02 8:23 

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.