Interview
    C#
    VB.Net
    VC++
    ASP.Net
    ADO.Net
    .Net Framework
    Silverlight
    WPF(Windows Presentation Foundation)/XAML
    WCF(Windows Communication Foundation)
    Java
    PHP
    AJAX
    Assembly
    XML
    Wireless/Mobile Development
    Cold Fusion
    MSSQL Server 2000/2005/2008/2012
    MYSQL
    DB2
    MS Access
    Java Script
    VB Script
    JQuery
    Testing
    BlackBox Testing
    WhiteBox Testing
    OOPS
    SharePoint
    ASP.NET MVC
    HTML5
    CSS/CSS3
    IIS 7
    Windows 8
    Google API
    Facebook API
    Twitter API
    Android Programming
    iPhone/iPad Programming
    Windows Phone Programming
    Json
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit Question | Search 
Report Abuse Form
Reason:    
 
Interview
Home >> VC++ >> What is CMutex? How can we use it?

What is CMutex? How can we use it?

Posted By Arun Singh on 8/17/2012
Views: 582
Major Category: .Net
Sub Category: VC++
Total Answer 1
User Information Answer
• Arun Singh
Posted Date 8/17/2012

CMutex is a synchronization class which uses synchronization object named as mutex. It allows multiple program thread can share the same resource by taking turns. At the starting of the program it creates a mutex at beginning and then a system gives a unique ID or name for it. After that, any thread which needs the resource can use the mutex to lock the resource.

For example; access of a file. To use CMutex, construct its object when it is needed to be accessed. Give the name of mutex and to the application will own it. You can access mutex when constructor returns again to the start. When you have done, accessing the controlled resource then call CSyncObject::Unlock.


Report Abuse

Report Abuse Form
Reason:    
 
Total Online Users: 2715
Advertisement
MindStick Cleaner
Advertise with Us
  
Copyright © 2009 - 2013MindStick. All Rights Reserved.