I'm using CSingleLock , When one thread lock an object, and other thread wants to lock that object at that time , The second thread will wait for unlocking by the 1st thread or it just skip that locking code. If it need to wait, It will automatically wait or have to give code to wait ? -------------------------------------------------------------------------- CMutex g_m1; CSingleLock lock1(&g_m1) - - - - - - - -- - - - - - - - - - - - - - - - - - - - if (lock1.Lock()) { m_LockStatus = "Got Lock"; UpdateData(FALSE); } else { m_LockStatus = "Failed"; UpdateData(FALSE); } } ----------------------------------------------------------------------------- Thanks to all.:)
Diglu
Posts
-
About CMutex And CSingleLock -
About CMutex [modified]Yes it is working. Thanks a lot.:)
-
About CMutex [modified]To use Cmutex Object , Any headerfile have to include ? I have not include Header file . I'm geating error : ---------------------------------------------------------------------- lets : CMutex g_m; - - - - - - - - - - - - - - - - - - - - - - E:\Project-MFC\UiThread1\UiThread1Dlg.cpp(17) : error C2146: syntax error : missing ';' before identifier 'g_m' E:\Project-MFC\UiThread1\UiThread1Dlg.cpp(17) : error C2501: 'CMutex' : missing storage-class or type specifiers E:\Project-MFC\UiThread1\UiThread1Dlg.cpp(17) : fatal error C1004: unexpected end of file found ------------------------------------------------------------------------ Thanks to all.:) -- modified at 6:02 Monday 10th July, 2006
-
,How to use ActiveX dll in ASP.net web page?Hello Rams You have to registar in your activex in your tools then you can access all methods inside the Active X bye
-
How to send values from one page to another asp.netHello All, How to send values from one page to another in asp.net, Can any body suggest me how to do the above.... thanks in advance shree
-
Picture & BitmapActually In one Interview I faced This Question.. " What is the different bet Bitmap and Picture? I'm also in confuse what he wants to mean with Picture...
-
Picture & BitmapHi all, What is the difference between bitmap and picture? Thanks to all.
-
Picture & BitmapHi all, What is the difference between Picture and Bitmap? Thanks to all.
-
Edit boxYes the code is working; Thanks a lot.
-
Edit boxIt is Giving Debug Assertion Failed.. NO Error. Assertion Failed.... for the line m_Edit.SetFont(... Where have to give this code " m_Edit.SetFont(... "
-
Edit boxBut It is Giving Debug Assertion Failed.. ----------------------------------- CFont font; font.CreateFont( 12, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily "Arial"); // lpszFacename m_Edit.SetFont(&font);// where m_Edit is: CEdit m_edit; ----------------------------------
-
Edit boxHow can I change the fonts of edit box. Thanks to all.