Click here to Skip to main content
15,886,422 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to access DLL file on vista? Pin
rowdy_vc++13-Mar-08 3:26
rowdy_vc++13-Mar-08 3:26 
GeneralRe: How to access DLL file on vista? Pin
Demian Panello13-Mar-08 5:08
Demian Panello13-Mar-08 5:08 
GeneralMutex Pin
LCI13-Mar-08 2:39
LCI13-Mar-08 2:39 
GeneralRe: Mutex Pin
Rajkumar R13-Mar-08 3:17
Rajkumar R13-Mar-08 3:17 
GeneralRe: Mutex Pin
LCI13-Mar-08 3:38
LCI13-Mar-08 3:38 
QuestionRe: Mutex Pin
Rajkumar R13-Mar-08 3:50
Rajkumar R13-Mar-08 3:50 
GeneralRe: Mutex Pin
Rajkumar R13-Mar-08 4:04
Rajkumar R13-Mar-08 4:04 
GeneralRe: Mutex Pin
Mark Salsbery13-Mar-08 7:16
Mark Salsbery13-Mar-08 7:16 
LCI wrote:
1. Do i use CreateMutex or OpenMutex


In the thread initializations, use CreateMutex(). If the mutex already exists then you'll get a
handle to it and GetLastError() returns ERROR_ALREADY_EXISTS. If it's a new mutex you'll still get
a handle to it.

As others have mentioned, you don't need a named mutex if your threads are all in the same process -
which includes your DLL.


LCI wrote:
2. If i use CreateMutex, can someone guide me on where to find the
attribute list for the 1st parameter.


Windows security is beyond the scope of this board, but there is documentation[^]

Pass NULL if in doubt.


LCI wrote:
. On both Create and Open Murtex, the last parameter 'LPCSTR' is supposed
to be a name of the mutex. Can i just create any name? Should it
be a GUID?


You can use a GUID (converted to a character string). Any unique string.

But again, no need for a named mutex if you only have one process - you can use a critical section instead.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralGetting first element of TCHAR string Pin
neha.agarwal2713-Mar-08 2:00
neha.agarwal2713-Mar-08 2:00 
GeneralRe: Getting first element of TCHAR string Pin
Chris Losinger13-Mar-08 2:26
professionalChris Losinger13-Mar-08 2:26 
QuestionRe: Getting first element of TCHAR string Pin
Rajkumar R13-Mar-08 2:36
Rajkumar R13-Mar-08 2:36 
GeneralGet the caption of active window... Pin
ptr_Electron13-Mar-08 1:19
ptr_Electron13-Mar-08 1:19 
GeneralRe: Get the caption of active window... Pin
Demian Panello13-Mar-08 1:32
Demian Panello13-Mar-08 1:32 
GeneralRe: Get the caption of active window... Pin
krmed13-Mar-08 2:04
krmed13-Mar-08 2:04 
GeneralRe: Get the caption of active window... Pin
Demian Panello13-Mar-08 2:36
Demian Panello13-Mar-08 2:36 
GeneralRe: Get the caption of active window... Pin
Rajkumar R13-Mar-08 1:35
Rajkumar R13-Mar-08 1:35 
GeneralRe: Get the caption of active window... Pin
Rajesh R Subramanian13-Mar-08 1:44
professionalRajesh R Subramanian13-Mar-08 1:44 
GeneralRe: Get the caption of active window... Pin
Rajkumar R13-Mar-08 2:06
Rajkumar R13-Mar-08 2:06 
GeneralRe: Get the caption of active window... Pin
Rajesh R Subramanian13-Mar-08 2:14
professionalRajesh R Subramanian13-Mar-08 2:14 
QuestionRe: Get the caption of active window... Pin
CPallini13-Mar-08 4:24
mveCPallini13-Mar-08 4:24 
GeneralRe: Get the caption of active window... Pin
Rajkumar R13-Mar-08 4:45
Rajkumar R13-Mar-08 4:45 
GeneralRe: Get the caption of active window... Pin
ptr_Electron13-Mar-08 2:38
ptr_Electron13-Mar-08 2:38 
GeneralRe: Get the caption of active window... Pin
CPallini13-Mar-08 4:27
mveCPallini13-Mar-08 4:27 
GeneralRe: Get the caption of active window... Pin
Rajkumar R13-Mar-08 5:26
Rajkumar R13-Mar-08 5:26 
GeneralRe: Get the caption of active window... Pin
CPallini13-Mar-08 8:12
mveCPallini13-Mar-08 8:12 

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.