|
Did you even bother to type "USB bus analyzer[^]" into Google or Yahoo before posting such a basic question?
|
|
|
|
|
No actually I tried...But it shows different vendors or software available for that.....I have not got any generic explanation for it...like how it works and what it does...
-----------------------------
I am a beginner
|
|
|
|
|
That's where you go to the vendor web sites and read documentation on these things so you get a better idea of what you're looking at.
|
|
|
|
|
A protocol analyzer sits either in the middle of a connection, passing data through, or TEE-d into the connection.
In general terms there is either a hardware/software component (newer), or a hardware stand alone system (older). Some systems can be said to be software only (e.g. TCP/IP, USB), but since that puts the computer in the middle, there is still a hardware component requirement (i.e multiple ports, etc).
You can get them for RS-232, RS-485, USB, I2C, etc, pretty much any type of data stream.
They sit on the desired communication bus, and provide knowledge of data, and depending on the type of communications, the control signals/data as well.
They are used to monitor, or debug communications between systems.
The other analyzer that might be what your thinking of for bus monitoring is a Logic State Analyzer or LSA. That involves individual or bus connections to monitor logic levels (i.e. tapping into the DMA bus of a computer, and monitoring the data flow. Two different things for different needs, the LSA is far more into the hardware of the beast, while the Protocol analyzer sits between the beasts.
Neither are complicated to use, just complicated to really understand and analyze what you are getting back from them.
For a better explanation, try http://en.wikipedia.org/wiki/Bus_analyzer[^].
Hope that helps a bit, although the other reply thread does have a point, but hey, it's Christmas.
|
|
|
|
|
hrishiS wrote: I am a beginner
Yep, I guess you are.
If you really want to play, then you hook the HW part of the analyser up to the bus, then you connect the analyser to another PC (normally) which has their SW on it, to capture the bus data for analysis.
And a USB analyser is really, really painfull to analyse,. At a bus level the USB protocol is painfull.
Morality is indistinguishable from social proscription
|
|
|
|
|
Hi,
I want to access functions from a Kernel-Mode dll (*.sys) via C#! Does anyone has an idea how to do this?
The dll(systemfile) supports functions to get and set information of our devices connected via USB.
I tried accessing this functions with:
[DllImport("*.sys",
CharSet = CharSet.Auto,
CallingConvention = CallingConvention.Cdecl)]
public static extern uint USBFindDevices();
Always exit with an AccessViolationException
Thanks Alex
|
|
|
|
|
Well, you can start by providing DllImport with an actual filename. You cannot use wildcards in the file specification.
|
|
|
|
|
i used an actual filename "Sample.sys" but it did not work
|
|
|
|
|
In that case, you don't have a file in PE format that exposes an exports table. There's no way to import the functions in that file using normal methods.
SYS files do not have a set format. They are either text files, memory-image format, PE format, or some other data.
You can find out if your SYS file has any exports by opening it up using Dependancy Walker[^].
|
|
|
|
|
I do have exports and see them by opening the sys file with the Dependyncy Walker (they are listet as Function)
How can i call these exports (functions) with c#?
|
|
|
|
|
You do have the documentation on those functions, correct? Without it, you'll find calling them impossible because you won't know how many and of what type parameters to pass to the functions. You cannot get that information from the file.
Have you specified the full path to the file in the DllImport line and told it what the EXACT function name is (case matters)?
|
|
|
|
|
The documentation is correct!
For testing i only use a function which has no parameters!
I also tested with the full path (but the file is located in the running direcotry) but alos did not work!
Should it be possible to call functions from this Export-Driver ("Sample.sys") from a c# project?
How does it work in C++?
|
|
|
|
|
Truthfully, never tried it.
|
|
|
|
|
Stop wasting his time, it cant be done.
Morality is indistinguishable from social proscription
|
|
|
|
|
Wasting time?? You do realize this thread is almost a month old?
I realize you can't do it now. At the time, I honestly didn't know and didn't have the time to try it. I simply told him how to try it himself. If it didn't work for him, great, then we both know. But, he at least learned how to TRY it for himself.
|
|
|
|
|
Well, if you are still interested / have not found out yourself yet...
you definitely can NOT call functions exported from a driver from within a
C# app / dll directly. This doesn't work because the C#-application is running
in user-mode (a cpu mode for user applications that e.g. doesn't allow you to
shut down the machine etc.) and the driver whose methods you are trying to call,
is running in kernel mode. I don't know how much experience you actually have
with programming kernel mode drivers please don't get me wrong if you know it already,
but you can accomplish what you need to by sending IOCTLs (IO control codes) to your
driver from the c# application / dll. (This works by calling Win32 API DeviceIoControl()...
you can easily look up the signature for this one in the SDK documentation)
And for the export driver ... you'd better use a normal driver, load and start it or let it be
loaded and started by the OS to send IOCTLs to it afterwards.
But for now, have some nice days,
whish a good new year, Eric
|
|
|
|
|
Well, if you are still interested / have not found out yourself yet...
you definitely can NOT call functions exported from a driver from within a
C# app / dll directly. This doesn't work because the C#-application is running
in user-mode (a cpu mode for user applications that e.g. doesn't allow you to
shut down the machine etc.) and the driver whose methods you are trying to call,
is running in kernel mode. I don't know how much experience you actually have
with programming kernel mode drivers please don't get me wrong if you know it already,
but you can accomplish what you need to by sending IOCTLs (IO control codes) to your
driver from the c# application / dll. (This works by calling Win32 API DeviceIoControl()...
you can easily look up the signature for this one in the SDK documentation)
And for the export driver ... you'd better use a normal driver, load and start it or let it be
loaded and started by the OS to send IOCTLs to it afterwards. For more questions on driver
development, take a look at http://www.osronline.com .
But for now, have some nice days,
I wish you a good new year, Eric
|
|
|
|
|
You cant access kernel mode files this way at all.
Morality is indistinguishable from social proscription
|
|
|
|
|
Firstly you may get more assistance by posting this question in the C# forum. Secondly, what does the documentation for this DLL say about using these functions in C#?
|
|
|
|
|
Are you sure that the function is declared as cdecl (CallingConvention = CallingConvention.Cdecl)
Typically Windows exports are stdcall. (this matters only the function has parameters)
What function exactly are you trying to export? Can you post the full signature and driver name (??.sys) here please?
|
|
|
|
|
You cant do it.
Not at all. It cant be done. Not in C#, C++VB, assembler, C, machine code, magic wands, anything,
The ONLY way to talk to kernel mode components is via the handle created by CreateFile() and then, you can only access kernel components that actually create a symbolic link accessible from user mode, and all kernel mode dlls, (in fact there arent that many) wont.
A sys file is NOT a dll. Its a library of functions that bridge parts of the OS and device.
Morality is indistinguishable from social proscription
|
|
|
|
|
Has anyone here any specific experience with touch screen technology as far as the hardware goes?
I am starting a project that is going to utilize them and am looking for some real world feedback on the differences in image quality, length of service, and accuracy of the resistive types vs. the capacitive types.
My environment is going to be a DRs office, most likely fluorescent lighting, maybe some direct sunlight that can effect contrast, etc... but nothing mobile. Small (7-8 inch) screen size) using a finger or stylus if I have to, but would prefer direct touch.
I am interested in opinions\experience on sensitivity and Mean Time Between failures (MTBF).
Also, if you have any recommendations on specific vendors that have been good\great\abysmal that would also be a great help.
Thanks... first time asking a HW related question here so I am wondering if anyone is even going to see it
|
|
|
|
|
With a traditional mouse having a scroll wheel, clicking the wheel turned the cursor into a circle with up/down arrows. A friend of mine was telling me the same thing has happened with her Vista laptop. When either of the left/right buttons on the touchpad are clicked, nothing happens except for the "circle with up/down arrows" cursor shows up. Any cues on how to remedy this?
Thanks.
- DC
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I tried every combination I could to see if this would work but no luck. However, when I looked at Control Panel -> Mouse, I found a settings option to select the action to take on left/right button. One of the options allows it to emulate the "middle click"; so I guess that may be the place to look. btw I have Synaptics TouchPad on my laptop, but I guess the other makes are fairly similar.
|
|
|
|
|
I'm trying to get the Unique Serial Number of an SD (Secure Digital) Memory Card, I know how to get the volume information and the like. From reading the specification for the SD Card, I do know each has such an Unique ID. After doing many search here, google, and other web sites I haven't been able to find the answer.
Thanks as always for any help you can provide
|
|
|
|