473,503 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# USB Application

Ok, i'm about to start a C# program to interface a board a friend
made. In order to do this; I need the DDK, to make a driver in C++ for
the custom board, then PInvoke it, inside of my C# app. Correct?

PInvoking the driver dosn't sound right... Does anybody have some
incite?
Nov 15 '05 #1
8 23451
You're on the right track. If you're making the driver for the device, then
you have the option of how to do the interface. If it makes sense, look at
the serial port stuff. If you create a USB driver for your device that
emulates a serial port then your device would be accessible by anything that
can talk with serial ports. If you don't want to provide this kind of
access, you can make a custom driver and provide a set of APIs to read
from/write to/configure/monitor the device.
--

"Alex Egg" <eg****@verizon.net> wrote in message
news:a6**************************@posting.google.c om...
Ok, i'm about to start a C# program to interface a board a friend
made. In order to do this; I need the DDK, to make a driver in C++ for
the custom board, then PInvoke it, inside of my C# app. Correct?

PInvoking the driver dosn't sound right... Does anybody have some
incite?

Nov 15 '05 #2
You're on the right track. If you're making the driver for the device, then
you have the option of how to do the interface. If it makes sense, look at
the serial port stuff. If you create a USB driver for your device that
emulates a serial port then your device would be accessible by anything that
can talk with serial ports. If you don't want to provide this kind of
access, you can make a custom driver and provide a set of APIs to read
from/write to/configure/monitor the device.
--

"Alex Egg" <eg****@verizon.net> wrote in message
news:a6**************************@posting.google.c om...
Ok, i'm about to start a C# program to interface a board a friend
made. In order to do this; I need the DDK, to make a driver in C++ for
the custom board, then PInvoke it, inside of my C# app. Correct?

PInvoking the driver dosn't sound right... Does anybody have some
incite?

Nov 15 '05 #3
Ok, then let's see here. I don't think I want to do the serial port thing; I want to do it all USB. So, I make my custom driver for the board and then make a custom set of APIs for IO to the device

By "custom set of APIs" you mean like... An unmanaged C++ .dll that has the "read from/write to/configure/monitor/" functions in it. Then I call those unmanaged C++ functions from my managed C# app using PInvoke. Correct

I think i'm geting this correctly.
Nov 15 '05 #4
Ok, then let's see here. I don't think I want to do the serial port thing; I want to do it all USB. So, I make my custom driver for the board and then make a custom set of APIs for IO to the device

By "custom set of APIs" you mean like... An unmanaged C++ .dll that has the "read from/write to/configure/monitor/" functions in it. Then I call those unmanaged C++ functions from my managed C# app using PInvoke. Correct

I think i'm geting this correctly.
Nov 15 '05 #5
Yes, you'd make your unmanaged DLL that provides access to your device and
use the DLLImport stuff so you can use it from .NET.

--

"Alex Egg" <eg****@verizon.net> wrote in message
news:44**********************************@microsof t.com...
Ok, then let's see here. I don't think I want to do the serial port thing; I want to do it all USB. So, I make my custom driver for the board and then
make a custom set of APIs for IO to the device.
By "custom set of APIs" you mean like... An unmanaged C++ .dll that has the "read from/write to/configure/monitor/" functions in it. Then I call
those unmanaged C++ functions from my managed C# app using PInvoke. Correct?
I think i'm geting this correctly.

Nov 15 '05 #6
Yes, you'd make your unmanaged DLL that provides access to your device and
use the DLLImport stuff so you can use it from .NET.

--

"Alex Egg" <eg****@verizon.net> wrote in message
news:44**********************************@microsof t.com...
Ok, then let's see here. I don't think I want to do the serial port thing; I want to do it all USB. So, I make my custom driver for the board and then
make a custom set of APIs for IO to the device.
By "custom set of APIs" you mean like... An unmanaged C++ .dll that has the "read from/write to/configure/monitor/" functions in it. Then I call
those unmanaged C++ functions from my managed C# app using PInvoke. Correct?
I think i'm geting this correctly.

Nov 15 '05 #7
Thanks for your time.
Nov 15 '05 #8
Thanks for your time.
Nov 15 '05 #9

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

Similar topics

9
3274
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
3
3100
by: Amit Dedhia | last post by:
Hi I am developing a Dot net application (involving image processing) on a uni processor. It works well on my machine. I then take all my code on a multi processor, build and run the application...
6
20036
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
20
2667
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in...
6
25022
by: Josef Brunner | last post by:
Hi, I published my application (VS 2005) and am now trying to install it when I get this error message. It worked before...even on a different machine. Here is the detailed description: ...
9
2966
by: jeff | last post by:
Hi All. I realize that when my Deployed winforms application starts, Windows needs to load the .net 2 framework before control is given to my application.... Is there anyway to either ... -...
3
2674
by: asadikhan | last post by:
Hi, I have written a windows application with a GUI (let's call it MENU). I own the code for this application and have access to it. We have another application that is a third-part windows...
2
4517
by: Michael Kalika | last post by:
Hi, We have developed a VSTO 2005 Excel application and we would like to leverage ClickOnce deployment mechanism for distribution of this application. How can we do that? I was digging in MSDN...
0
5227
by: Tifer | last post by:
Hello, I am building my first .Net Application. The first couple of Publish and Installs I did went fine. But after a couple of builds, I get a modal dialogue box error every time upon trying...
4
4502
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
0
7202
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
7084
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
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
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...
0
5578
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,...
0
3167
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...
0
1512
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 ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
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.