?
Solved

CMultiLock problem

Posted on 2000-05-05
1
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

752 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