Solved

CMultiLock problem

Posted on 2000-05-05
1
250 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
Comment Utility
//....
CEvent ev1, ev2;
CSyncObject *pSyncObjects[] = { &ev1, &ev2 };
CMultiLock mlock(pSyncObjects, 2);
mlock.Lock(100);
//....
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now