471,355 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,355 software developers and data experts.

IOCTL and name events stuff

Hi all,

I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.
2. My app also need o communicate this the driver using IOCTL.

Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?

How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?

TIA,

Jun 1 '07 #1
6 2863
On Jun 1, 7:49 am, Eran.Ya...@gmail.com wrote:
Hi all,

I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.
2. My app also need o communicate this the driver using IOCTL.

Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?

How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?

TIA,
Hi Eran,

I am not familiar with the device control API but I don't think there
should be a problem importing Device Control API in C# (As long as
it's used in user mode of course).

If you are familiar with the API, maybe this post can help you:
http://www.thescripts.com/forum/thread268027.html

By the way, you can also post your question at
microsoft.public.development.device.drivers newsgroup.

Hope this helps.
Cheers,
Moty

Jun 1 '07 #2
On Jun 1, 8:51 am, Moty Michaely <Moty...@gmail.comwrote:
On Jun 1, 7:49 am, Eran.Ya...@gmail.com wrote:


Hi all,
I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.
2. My app also need o communicate this the driver using IOCTL.
Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?
How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?
TIA,

Hi Eran,

I am not familiar with the device control API but I don't think there
should be a problem importing Device Control API in C# (As long as
it's used in user mode of course).

If you are familiar with the API, maybe this post can help you:http://www.thescripts.com/forum/thread268027.html

By the way, you can also post your question at
microsoft.public.development.device.drivers newsgroup.

Hope this helps.
Cheers,
Moty- Hide quoted text -

- Show quoted text -
Hello Moti and thanks for the reply.

I post it here because it's a C# specific question and I'm not sure if
I get replys specific to C#.

Jun 1 '07 #3
On Jun 1, 11:58 am, Eran.Ya...@gmail.com wrote:
On Jun 1, 8:51 am, Moty Michaely <Moty...@gmail.comwrote:
On Jun 1, 7:49 am, Eran.Ya...@gmail.com wrote:
Hi all,
I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.
2. My app also need o communicate this the driver using IOCTL.
Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?
How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?
TIA,
Hi Eran,
I am not familiar with the device control API but I don't think there
should be a problem importing Device Control API in C# (As long as
it's used in user mode of course).
If you are familiar with the API, maybe this post can help you:http://www.thescripts.com/forum/thread268027.html
By the way, you can also post your question at
microsoft.public.development.device.drivers newsgroup.
Hope this helps.
Cheers,
Moty- Hide quoted text -
- Show quoted text -

Hello Moti and thanks for the reply.

I post it here because it's a C# specific question and I'm not sure if
I get replys specific to C#.
Hi,

True, but it worths to try :).

Moty

Jun 1 '07 #4

<Er********@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
Hi all,

I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.
No problem. Named events are placed in a global namespace (ignoring
terminal services, but you can still access the global namespace even from
there).
2. My app also need o communicate this the driver using IOCTL.
Yuck. IOCTL requires passing buffers around... C# may not be your best
choice there.
>
Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?

How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?
I would suggest C++/CLI. The syntax is quite close to C# as far as
interacting with the .NET framework, creating forms and buttons and so
forth. But it also allows seamless access to the Windows API. At the very
least, you should be able to reuse the header files provided by the kernel
component, instead of having to transcribe everything into C# (constants,
function prototypes, structure definitions, etc).
>
TIA,

Jun 1 '07 #5
On Jun 1, 7:25 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospamwrote:
<Eran.Ya...@gmail.comwrote in message

news:11**********************@g4g2000hsf.googlegro ups.com...
Hi all,
I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.

No problem. Named events are placed in a global namespace (ignoring
terminal services, but you can still access the global namespace even from
there).
2. My app also need o communicate this the driver using IOCTL.

Yuck. IOCTL requires passing buffers around... C# may not be your best
choice there.
Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?
How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?

I would suggest C++/CLI. The syntax is quite close to C# as far as
interacting with the .NET framework, creating forms and buttons and so
forth. But it also allows seamless access to the Windows API. At the very
least, you should be able to reuse the header files provided by the kernel
component, instead of having to transcribe everything into C# (constants,
function prototypes, structure definitions, etc).


TIA,- Hide quoted text -

- Show quoted text -
Hello Ben,

I thanks you for the reply.

Correct me if I am wrong. deviceIoControl is function to communicate
devices for IOCTL ?
You think that it is best to use VC++ instead of C#?

Also, when you mean that named event are in global name space what do
you mean? shouldn't I import Kernel32.dll for that?

thanks again.

Jun 1 '07 #6

<Er********@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
On Jun 1, 7:25 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospamwrote:
><Eran.Ya...@gmail.comwrote in message

news:11**********************@g4g2000hsf.googlegr oups.com...
Hi all,
I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.

No problem. Named events are placed in a global namespace (ignoring
terminal services, but you can still access the global namespace even
from
there).
2. My app also need o communicate this the driver using IOCTL.

Yuck. IOCTL requires passing buffers around... C# may not be your best
choice there.
Can i do it in C#? can C# wait for events signaled from app written in
C\C++ app running in on kernel and sends messages to device using
IOCTL?
How complicated is it going to be? I'm quite noob in C# programming.
should I consider duing it in C|C++ which I am quite noob as well?

I would suggest C++/CLI. The syntax is quite close to C# as far as
interacting with the .NET framework, creating forms and buttons and so
forth. But it also allows seamless access to the Windows API. At the
very
least, you should be able to reuse the header files provided by the
kernel
component, instead of having to transcribe everything into C# (constants,
function prototypes, structure definitions, etc).


TIA,- Hide quoted text -

- Show quoted text -

Hello Ben,

I thanks you for the reply.

Correct me if I am wrong. deviceIoControl is function to communicate
devices for IOCTL ?
You think that it is best to use VC++ instead of C#?
In Visual Studio 2005, the C++ compiler can use both .NET and all Windows
functions directly. That makes it really useful for communicating with
drivers. You can still do your GUI in C# if you want, the functions you
write in C++/CLI will show up in your C# program just like the .NET-provided
ones.
>
Also, when you mean that named event are in global name space what do
you mean? shouldn't I import Kernel32.dll for that?
Most of .NET simply calls a related function built into Windows.

Here are the docs for the Windows function, CreateEvent:
http://msdn2.microsoft.com/en-us/library/ms682396.aspx
You might need OpenEvent instead:
http://msdn2.microsoft.com/en-us/library/ms684305.aspx
>
thanks again.

Jun 8 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Javier | last post: by
reply views Thread by Kyler Laird | last post: by
3 posts views Thread by chris | last post: by
2 posts views Thread by Chris Johnson | last post: by
reply views Thread by Klaus Jensen | last post: by
1 post views Thread by klappnase | last post: by
1 post views Thread by luca | last post: by
13 posts views Thread by lhommedumatch | last post: by
26 posts views Thread by buu | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.