473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ 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 waitforsingleob ject api).
Thanks,
Ron
Nov 15 '05 #1
1 2502
Ron,

Take a look at the ManualResetEven t 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************* *@exisconsultin g.com

"R A" <ro****@hotmail .com> wrote in message
news:uD******** ******@TK2MSFTN GP09.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 waitforsingleob ject 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
3546
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; namespace CSource {
21
18678
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 nanosleep(), depending on platform }
2
5258
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 that the creater of the even can make their own event in the database. When they do so a 2 tables are created. One for the entries such as names...
18
2019
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, consider what I'll do in Java: public interface DataAvailabilityListener extends java.util.EventListener { void dataArrived(DataAvailabilityEvent...
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 and static, this this does'nt seem to help. Could someone plesase help? My code is below:
4
17255
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 maintain the reference to any module.
6
1372
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 following event to determine when I can continue with my code flow. Event: %printername%.mfx.complete Can anyone help me out with some sample code to...
1
8249
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. This part is done but next requirement is that after closing ActiveX I have to redirect parent page to location X or Y depending on how the
0
7946
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7457
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7791
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5078
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
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 we have to send another system

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.