Re: "Named Event"
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 3 Jun 2007 14:34:35 -0400
Yes, you can use OpenExisting to get a reference to an event that was created in a C++ program, for example, as long as they used the same underlying API (CreateEvent, CreateEventEx, which the managed wrappers use) with the same name.
As for DeviceIOControl, there is not a managed representation. You will have to call the function through the P/Invoke layer.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<alexia.bee@xxxxxxxxx> wrote in message news:1180891516.819347.214450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 3, 4:28 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Aneesh,
As of .NET 2.0, you don't need to use interop to get the handle to named
events. You can call the static OpenExisting method to get a reference to
an event which already exists and is named.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"Aneesh P" <anees...@xxxxxxxxx> wrote in message
news:1180859377.068957.95650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> On Jun 3, 11:53 am, alexia....@xxxxxxxxx wrote:
>> Hi all,
>> I need to write app in C# that communicates with other app. I need to
>> use "named event" for that.
>> I should use windows APIs SetEvent() and WaitForSingleObject() etc...
>> I looked for help but couldn't find any.
>> Can any one please help me with that?
>> Thanks.
> See this link:
>http://www.codeproject.com/csharp/InteropEvents.asp- Hide quoted text -
- Show quoted text -
Hello Nicholas,
thanks you and the other guys for your reply.
Can I use OpenExisting to sync with events set by app run from kernel
developed by C++?
Also, Is there a .NET way which replaces WIN API DeviceIoControl?
thanks.
.
- References:
- "Named Event"
- From: alexia . bee
- Re: "Named Event"
- From: Aneesh P
- Re: "Named Event"
- From: Nicholas Paldino [.NET/C# MVP]
- Re: "Named Event"
- From: alexia . bee
- "Named Event"
- Prev by Date: Re: Office 2007 UI in non-commercial applications
- Next by Date: Re: Schedule the call of a Web Service method: task scheduler or Windows Service?
- Previous by thread: Re: "Named Event"
- Next by thread: Re: "Named Event"
- Index(es):