Solved

CMultiLock problem

Posted on 2000-05-05
1
263 Views
Last Modified: 2013-11-20
I'm converting a Win32 multithreaded program in a program that uses MFC synchronization objects. In the .h file of my class I define

CEvent  *IntfTskEvents[2];

In my .cpp file when I do

CMultiLock sLock(IntfTskEvents,2 ,FALSE);
 
I get a compile error: cannot convert parameter 1 from 'class CEvent *[2]' to 'class CSyncObject *[]'

can anyone show me a short example of how to use CMultiLock?
0
Comment
Question by:BlackRussian
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 200 total points
ID: 2783036
//....
CEvent ev1, ev2;
CSyncObject *pSyncObjects[] = { &ev1, &ev2 };
CMultiLock mlock(pSyncObjects, 2);
mlock.Lock(100);
//....
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 169
deburging in oracle form 12 105
java ^ examples 8 69
mapBully challenge 6 154
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question