473,480 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating Event like in win32 events

R A
Hi

How do I create Event handle same as using the win32 CreateEvent? I need the
..net app (c#) to wait for event (such as win 32 waitforsingleobject api).
Thanks,
Ron
Nov 15 '05 #1
1 2496
Ron,

Take a look at the ManualResetEvent and AutoResetEvent classes. They
both derive from WaitHandle, which has static methods which will allow you
to wait on those handles to be set.

Subsequently, you can also set the Handle property of one of these event
classes to a handle returned from CreateEvent (or wherever you get it from)
so that you can use the managed representation of it.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"R A" <ro****@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
Hi

How do I create Event handle same as using the win32 CreateEvent? I need the .net app (c#) to wait for event (such as win 32 waitforsingleobject api).
Thanks,
Ron

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3539
by: Dejun Yang | last post by:
Could anybody help me? How to sink an event from C++.NET in C#? For example, for following CSource, how to sink EventTest in C#? #pragma once #include <windows.h> using namespace System; ...
21
18638
by: Alo Sarv | last post by:
Hi From what I have understood from various posts in this newsgroup, writing event loops pretty much comes down to this: while (true) { handleEvents(); sleep(1); // or _sleep() or...
2
5256
by: Ben | last post by:
My current project requires me to create part of a form that is created on the fly. The project consists a list of entries to an event. The name and address and such is easy. The design is detup so...
18
2011
by: Elder Hyde | last post by:
Hey all, A class of mine needs to tell the outside world when its buffer is not empty. The problem is that C# seems to force you to put the event-raising code in the base class. To illustrate,...
0
361
by: Manfred Braun | last post by:
Hi All, I am trying to fetch system-events, and I am successful with "TimeChanged", but cannot get "SessionEnding". I am not an OO expert and so - just to be sure - I made all my methods public...
4
17249
by: rawCoder | last post by:
Hi all, How Can You Raise Events Asynchronously ? Now for the details ... I want to do inter modular communication using events in such a way that the contributing modules need not...
6
1364
by: Jon | last post by:
I have a service program that creates a crystal report and prints the report to a named printer driver. The printer driver raises an event when it is finished. I am supposed to trap for the...
1
8226
by: kret | last post by:
Hi, this is my first post so first of all I would like to say hello :) Now getting to my problem. In my job I have to create an ActiveX control in .NET 1.1 that can be lunched from IE....
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6758
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7010
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.