Click here to Skip to main content
15,906,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to inject javascript into webbrowser control Pin
led mike16-Apr-08 4:29
led mike16-Apr-08 4:29 
GeneralRe: How to inject javascript into webbrowser control Pin
Alexander Fedorov16-Apr-08 4:50
Alexander Fedorov16-Apr-08 4:50 
GeneralRe: How to inject javascript into webbrowser control Pin
led mike16-Apr-08 5:02
led mike16-Apr-08 5:02 
GeneralRe: How to inject javascript into webbrowser control Pin
Alexander Fedorov16-Apr-08 5:11
Alexander Fedorov16-Apr-08 5:11 
GeneralRe: How to inject javascript into webbrowser control Pin
led mike16-Apr-08 5:27
led mike16-Apr-08 5:27 
GeneralUsing .Net function in vc++ [modified] Pin
rp_suman16-Apr-08 3:01
rp_suman16-Apr-08 3:01 
GeneralRe: Using .Net function in vc++ Pin
Iain Clarke, Warrior Programmer16-Apr-08 3:28
Iain Clarke, Warrior Programmer16-Apr-08 3:28 
GeneralProblem: HANDLE when same name in exe and DLL Pin
janadhana16-Apr-08 1:50
janadhana16-Apr-08 1:50 
Hi All,
When there is a global HANDLE to an Event(unnamed) in a exe and another HANDLE in DLL to an Event(named) with the same name, will ResetEvent/SetEvent called in exe trigger the event wait in DLL?

Hope you understand the Q. Here is more explanation.

EXE --> declare HANDLE g_evt= CreateEvent()
DLL --> declare HANDLE g_evt = Createevent(name)



Exe(main thread) {  <br />
              SetEvent(g_evt); <br />
                 call to dll function x()...<br />
              }<br />
  <br />
<br />
<br />
  DLL(main thread) x()<br />
                    { <br />
                     ResetEvent(g_evt)<br />
                     //createThread(newthread);<br />
                     waitforsingleobjectex(INFINITE, g_evt,TRUE);<br />
                         dosomething();<br />
                    }<br />
 <br />
<br />
<br />
        newthread()<br />
         {<br />
           log<br />
          setevent(g_evt);<br />
         }


when setevent is called in the exe, I see that the there is no wait
and dosomething() is called rightaway. Actually it should be waiting for the newthread() to execute and set the event. Since the call is commented it should be waiting for ever.
Setevent in exe is called for some other thread that is part of the exe. But it is signalling the dll wait object. Please kindly let me know if my reasoning is correct?

Thanks & Regards,
Dhana

GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
Iain Clarke, Warrior Programmer16-Apr-08 2:10
Iain Clarke, Warrior Programmer16-Apr-08 2:10 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
janadhana16-Apr-08 2:17
janadhana16-Apr-08 2:17 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
CPallini16-Apr-08 2:23
mveCPallini16-Apr-08 2:23 
GeneralRe: Problem: HANDLE when same name in exe and DLL Pin
janadhana16-Apr-08 2:27
janadhana16-Apr-08 2:27 
General3D graph printing Pin
danandu16-Apr-08 1:48
danandu16-Apr-08 1:48 
GeneralRe: 3D graph printing Pin
Schehaider_Aymen16-Apr-08 2:06
Schehaider_Aymen16-Apr-08 2:06 
GeneralRe: 3D graph printing Pin
danandu16-Apr-08 23:51
danandu16-Apr-08 23:51 
GeneralCalculating System ON times Pin
nisha0000016-Apr-08 1:18
nisha0000016-Apr-08 1:18 
GeneralRe: Calculating System ON times Pin
David Crow16-Apr-08 3:03
David Crow16-Apr-08 3:03 
GeneralRe: Calculating System ON times Pin
Tony Hill16-Apr-08 3:40
professionalTony Hill16-Apr-08 3:40 
GeneralSet The MFC layout like wind theme Pin
Schehaider_Aymen16-Apr-08 0:39
Schehaider_Aymen16-Apr-08 0:39 
GeneralRe: Set The MFC layout like wind theme Pin
Schehaider_Aymen16-Apr-08 1:05
Schehaider_Aymen16-Apr-08 1:05 
GeneralRe: Set The MFC layout like wind theme Pin
Iain Clarke, Warrior Programmer16-Apr-08 2:18
Iain Clarke, Warrior Programmer16-Apr-08 2:18 
GeneralRe: Set The MFC layout like wind theme Pin
Schehaider_Aymen16-Apr-08 2:20
Schehaider_Aymen16-Apr-08 2:20 
QuestionRe: Set The MFC layout like wind theme Pin
David Crow16-Apr-08 3:00
David Crow16-Apr-08 3:00 
GeneralRe: Set The MFC layout like wind theme Pin
Schehaider_Aymen16-Apr-08 2:47
Schehaider_Aymen16-Apr-08 2:47 
GeneralRe: Set The MFC layout like wind theme Pin
ThatsAlok30-Jun-09 23:12
ThatsAlok30-Jun-09 23:12 

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.