Solved

CMultiLock problem

Posted on 2000-05-05
1
265 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 200 total points
ID: 2783036
//....
CEvent ev1, ev2;
CSyncObject *pSyncObjects[] = { &ev1, &ev2 };
CMultiLock mlock(pSyncObjects, 2);
mlock.Lock(100);
//....
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

691 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