Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Chunk data trasmfer between two thread. Pin
LeeeNN24-Oct-05 15:51
LeeeNN24-Oct-05 15:51 
AnswerRe: Chunk data trasmfer between two thread. Pin
John R. Shaw24-Oct-05 18:32
John R. Shaw24-Oct-05 18:32 
GeneralRe: Chunk data trasmfer between two thread. Pin
LeeeNN25-Oct-05 8:01
LeeeNN25-Oct-05 8:01 
QuestionEvent Handling Pin
suezzz0024-Oct-05 12:42
suezzz0024-Oct-05 12:42 
AnswerRe: Event Handling Pin
khan++24-Oct-05 19:36
khan++24-Oct-05 19:36 
GeneralRe: Event Handling Pin
S. Senthil Kumar24-Oct-05 20:08
S. Senthil Kumar24-Oct-05 20:08 
GeneralRe: Event Handling Pin
khan++24-Oct-05 20:36
khan++24-Oct-05 20:36 
AnswerRe: Event Handling Pin
S. Senthil Kumar24-Oct-05 21:09
S. Senthil Kumar24-Oct-05 21:09 
suezzz00 wrote:
I suspect that the event that is created is not an OS event , but rather local to the running application.


No they are not. See my reply to khan++.

Your SetEvent PInvoke signature is wrong. You can use http://pinvoke.net[^] to get P/Invoke signatures for Win32 API functions.

The following code works fine for me.
C++
HANDLE h = CreateEvent(NULL, FALSE, FALSE, "TestEvent");
WaitForSingleObject(h, 5000);
cout << "past event";


C#
[DllImport("kernel32.dll")]
static extern bool SetEvent(IntPtr hEvent);

[DllImport("Kernel32.dll", SetLastError=true)]
static extern IntPtr OpenEvent(uint dwDesiredAccess, bool bInheritHandle, string lpName);

IntPtr handle = OpenEvent(0x000F0000 | 0x00100000 | 0x3, false, "TestEvent"); // First parameter is EVENT_ALL_ACCESS
SetEvent(handle);


Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
Questiondrawing on mouse move Pin
Ann6624-Oct-05 11:37
sussAnn6624-Oct-05 11:37 
AnswerRe: drawing on mouse move Pin
Christian Graus24-Oct-05 12:42
protectorChristian Graus24-Oct-05 12:42 
AnswerRe: drawing on mouse move Pin
vikas amin24-Oct-05 19:53
vikas amin24-Oct-05 19:53 
QuestionGet the folder of current application Pin
ddmcr24-Oct-05 9:24
ddmcr24-Oct-05 9:24 
AnswerRe: Get the folder of current application Pin
Ghasrfakhri24-Oct-05 9:42
Ghasrfakhri24-Oct-05 9:42 
GeneralRe: Get the folder of current application Pin
ddmcr24-Oct-05 9:56
ddmcr24-Oct-05 9:56 
GeneralRe: Get the folder of current application Pin
Blake Miller24-Oct-05 12:17
Blake Miller24-Oct-05 12:17 
GeneralRe: Get the folder of current application Pin
toxcct24-Oct-05 21:59
toxcct24-Oct-05 21:59 
QuestionRe: Get the folder of current application Pin
David Crow25-Oct-05 3:55
David Crow25-Oct-05 3:55 
AnswerRe: Get the folder of current application Pin
toxcct25-Oct-05 4:10
toxcct25-Oct-05 4:10 
AnswerRe: Get the folder of current application Pin
ThatsAlok24-Oct-05 18:41
ThatsAlok24-Oct-05 18:41 
AnswerRe: Get the folder of current application Pin
vikas amin24-Oct-05 20:37
vikas amin24-Oct-05 20:37 
QuestionError 5 with DeleteFile Pin
Chintoo72324-Oct-05 7:29
Chintoo72324-Oct-05 7:29 
AnswerRe: Error 5 with DeleteFile Pin
Joe Woodbury24-Oct-05 7:37
professionalJoe Woodbury24-Oct-05 7:37 
AnswerRe: Error 5 with DeleteFile Pin
FarPointer24-Oct-05 7:37
FarPointer24-Oct-05 7:37 
AnswerRe: Error 5 with DeleteFile Pin
David Crow24-Oct-05 7:41
David Crow24-Oct-05 7:41 
QuestionWM_DROPFILES in a system defined &quot;EDIT&quot; window Pin
Dilpo24-Oct-05 7:20
Dilpo24-Oct-05 7:20 

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.