Click here to Skip to main content
15,914,795 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralDepcrecated stl-streams Pin
klawipo3-Dec-02 8:52
klawipo3-Dec-02 8:52 
GeneralRe: Depcrecated stl-streams Pin
Christian Graus3-Dec-02 10:53
protectorChristian Graus3-Dec-02 10:53 
GeneralRe: Depcrecated stl-streams Pin
klawipo3-Dec-02 11:52
klawipo3-Dec-02 11:52 
GeneralRe: Depcrecated stl-streams Pin
Christian Graus4-Dec-02 9:43
protectorChristian Graus4-Dec-02 9:43 
GeneralRe: Depcrecated stl-streams Pin
Taka Muraoka5-Dec-02 16:09
Taka Muraoka5-Dec-02 16:09 
QuestionATL 7: How to _Module.GetModuleInstance()? Pin
Binky3-Dec-02 5:49
Binky3-Dec-02 5:49 
AnswerRe: ATL 7: How to _Module.GetModuleInstance()? Pin
geo_m4-Dec-02 3:25
geo_m4-Dec-02 3:25 
GeneralNeed help in firing event from second thread using shared variable!! Pin
bahruddina3-Dec-02 5:29
bahruddina3-Dec-02 5:29 
hi,

I've developed one ATL EXE server com. This server contains 2 threads.
The main thread (lets call it T1) will do following tasks:
1. Create second thread ( and this I think should be called T2) using "CoMarshalInterThreadInterfaceInStream".
2. Receive input from client application:

HRESULT CMainThread::ReceiveClientInput(BSTR AnyValue)<br />
{<br />
	<br />
	EnterCriticalSection(&cs);			<br />
		m_isFire = true;<br />
	LeaveCriticalSection(&cs);<br />
<br />
	return S_OK;<br />
}


T2 on the other hand continously (every 2 seconds) check for m_isFire value and fire the event:

void CSecondThread::CheckFlag(void)<br />
{<br />
	<br />
	EnterCriticalSection(&cs);		<br />
<br />
	if (isFire == true ){<br />
		Fire_NotifyAllConnectedClients();<br />
		isFire = false;<br />
	}<br />
<br />
	LeaveCriticalSection(&cs);<br />
<br />
}


Now, when event fired from above COM method, there is no client receive this event Frown | :(
I guess I've missed something in my code since I'm quite new in using VC++.

Thank u very very much in advance . Any advice, help and suggestions strongly aprreciated.


Regards,
newbie
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
geo_m5-Dec-02 1:14
geo_m5-Dec-02 1:14 
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
bahruddina6-Dec-02 20:16
bahruddina6-Dec-02 20:16 
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
geo_m6-Dec-02 22:34
geo_m6-Dec-02 22:34 
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
bahruddina7-Dec-02 6:34
bahruddina7-Dec-02 6:34 
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
geo_m7-Dec-02 7:04
geo_m7-Dec-02 7:04 
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
bahruddina7-Dec-02 21:23
bahruddina7-Dec-02 21:23 
GeneralRe: Need help in firing event from second thread using shared variable!! Pin
geo_m7-Dec-02 21:34
geo_m7-Dec-02 21:34 
Generalhandling events Pin
Dezz3-Dec-02 0:09
Dezz3-Dec-02 0:09 
GeneralATL attributed programming, need help! Pin
xi90430-Nov-02 15:56
xi90430-Nov-02 15:56 
GeneralRe: Is there an ATL equivalent for MFC's CObArray? Pin
Rene De La Garza30-Nov-02 7:52
Rene De La Garza30-Nov-02 7:52 
QuestionHow to implement a schedule in VC++ Pin
Anonymous29-Nov-02 21:45
Anonymous29-Nov-02 21:45 
AnswerRe: How to implement a schedule in VC++ Pin
Christian Graus29-Nov-02 22:15
protectorChristian Graus29-Nov-02 22:15 
AnswerRe: How to implement a schedule in VC++ Pin
geo_m4-Dec-02 3:35
geo_m4-Dec-02 3:35 
GeneralLinker error Pin
Paul Ingles28-Nov-02 10:46
Paul Ingles28-Nov-02 10:46 
GeneralRe: Linker error Pin
Rene De La Garza28-Nov-02 10:54
Rene De La Garza28-Nov-02 10:54 
GeneralRe: Linker error Pin
Paul Ingles28-Nov-02 11:21
Paul Ingles28-Nov-02 11:21 
GeneralDeallocation of Queue Memory Pin
Rizi28-Nov-02 5:33
Rizi28-Nov-02 5:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.