473,770 Members | 7,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3018
On Jun 1, 7:49 am, Eran.Ya...@gmai l.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.publi c.development.d evice.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...@gmai l.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.publi c.development.d evice.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...@gmai l.com wrote:
On Jun 1, 8:51 am, Moty Michaely <Moty...@gmail. comwrote:
On Jun 1, 7:49 am, Eran.Ya...@gmai l.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.publi c.development.d evice.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********@gma il.comwrote in message
news:11******** **************@ g4g2000hsf.goog legroups.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.no spamwrote:
<Eran.Ya...@gma il.comwrote in message

news:11******** **************@ g4g2000hsf.goog legroups.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********@gma il.comwrote in message
news:11******** **************@ g4g2000hsf.goog legroups.com...
On Jun 1, 7:25 pm, "Ben Voigt [C++ MVP]" <r...@nospam.no spamwrote:
><Eran.Ya...@gm ail.comwrote in message

news:11******* *************** @g4g2000hsf.goo glegroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4285
by: Javier | last post by:
Hi all!! I'm trying to use Python to help in testing software for the Windows Platform. The sw we develop at the company I work for sets up quite a number of "new" device drives in Windows, and as part of the testing process I'd need to be able to "query" them about their state and suchlike. The "interface" for doing so involves opening "device files" (of the form \\.\Device\CDCrypto) and sending them ioctls to query their state.
0
1387
by: Kyler Laird | last post by:
I want to know which input one of my V4L devices is using. This is done using the VIDIOC_G_INPUT ioctl. I'm trying to figure out how to do it in Python. I found the pyv4l. http://pyv4l.sourceforge.net/ It hasn't been updated in awhile. It doesn't know about VIDIOC_G_INPUT. I tried creating it with this. foo = VIDIOCGINPUT = video4linux._IOR('v', 38, 'i') I was even able to get ioctl() to go with this.
3
23481
by: chris | last post by:
Here is my code for the call to ioctl: for ( ; ; ) { if ( (buf = malloc(len)) == NULL) errQuit("malloc error while allocating ifconf buffer"); ifc.ifc_len = len; ifc.ifc_buf = buf; if (ioctl(sockfd, SIOCGIFCONF, &ifc) < 0) {
2
1707
by: Chris Johnson | last post by:
I have need to determine the capabilities of an optical drive. Right now I'm using SDL to find the drives, and ioctl to get the capabilities. Unfortunately, based on the output that I'm getting, either my method of interpretation is bad or these drives are misrepresenting themselves (which they shouldn't be, as other programs can use the abilites they would here appear to be lacking). If anyone has experience with the...
0
1449
by: Klaus Jensen | last post by:
Hi! This has been annoying me for a while now, and I can't get it to work It is really driving me nuts! Basicly this simple webapp created to illustrate my problem, renders five buttons, and adds a handler to the click event. When a button is clicked, the background-color is set to blue.
1
4562
by: klappnase | last post by:
Hello, I am writing an app that records from the soundcard using ossaudiodev. In the OSS programmer's guide they recommend when reading data fragments from the soundcard to use the fragment size as it is requested by the driver. According to the programmer's guide the ioctl call to determine the requested fragment size is: int frag_size;
1
6593
by: luca | last post by:
Hi, I was trying to make to work directly l i2c with python with the calls ioctl. But I have of the problems and I do not succeed to go ahead. this and l error 129# python pcf8591_ioctl.py Reading from 4 ch 8 bit A/D converter PCF8591 Traceback (most recent call last):
13
3282
by: lhommedumatch | last post by:
Hi, Does the ioctl(fd,SIOCGSTAMP,&time_val) function work for serial port? (fd = open("/dev/ttyS1",O_RDWR)) Regards,
26
1673
by: buu | last post by:
So, let's say that a user enters an event name in text box, and would like to raise it.. is it possible to call events by their 'name'? Is it possible to enumerate events inside app. and to check their names?
0
9592
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10058
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9870
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7416
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5313
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
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
3
2817
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.