|
I know it's a programming website and my question has nothing to do with programming, but I exist in CP for some time and I love the community.
Problem Statement
OK. The problem is: it takes extremely much time to recognize a CD or DVD for my DVD-ROM drive. By extremely long I mean 5-15 minutes. What is interesting, it happens only for the first CD/DVD used from system start. The further insterted CDs are recognized and read much slower than before the problem appeared, but they are recognized at almost normal time.
I suppose is enough information for somebody who knows what's going on. However, here is the background.
Background
1. I messed up IDE cable. I thought that there is a problem with HDD and a "HDD cable" mislead me. In effect, I was plugging/unplugging CD cable and maybe I damaged it.
2. I do not know a model of my CD-ROM. I mean, it is a classical no-name from a computer bought as a whole. I regret buying it that way.
Any ideas? Thanks in advance.
Greetings - Jacek
|
|
|
|
|
There are a couple of things you might try. First off, clean the drive. Get a commercial CD cleaning kit that includes a dummy disk for the drive and give it a good dusting. When the drive tries to read a disk, if it runs into errors it will retry for a while, and it can sometimes take a few minutes. Secondly, check the jumpers on the drives - all of them. A single IDE port/cable is allowed to have 1 or 2 devices attached. Most machines using IDE technology have two ports, each supporting two devices. If you have only one HDD and one CD, the best configuration is to let each be Master (or no selection on the jumpers at all, depending on the manufacturer) of its own cable. If you must use two devices on a port, one must be Master, and the other Slave. Since a CD drive is slower than a HDD, the HDD should always be the Master. In the event that you have two HDDs, put them both on the same cable, and connect the CD to its own separate cable.
One other thing to consider is replacing the cable. If you've damaged it, or you have an old ATA33 cable on a modern IDE port, you're asking for trouble. They're cheap to replace so, given your mention that it might be damaged, you might as well start with this step and see what happens.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Thank you.
Yeah, I had been "googling" and read about switching jumpers in several forums. I technically know what are jumpers, but I don't have a faintest idea where are they in this specific case. On a motherboard? On a cable? On a CD/HD drive?
I have a single HDD with SATA cable and a single DVD-ROM drive with ATA cable. I consider my PC as modern one (2007).
Greetings - Jacek
|
|
|
|
|
Jacek Gajek wrote:
I have a single HDD with SATA cable and a single DVD-ROM drive with ATA cable
Never mind then, you don't have a jumper issue. The jumpers are important only when you have two ATA drives on a single cable, as one drive must be master, the other the slave. Even this depends on where you live, as many European models use a third position - CS (chip select) - which is rarely used in the US.
I haven't built any machines using SATA drives yet, but I don't believe they require jumpers to work. But since you suspect there might be damage to a cable I'd replace them both, just to be sure. As I mentioned, they're cheap. The DVD-ROM should be given a good cleaning, too, as dirt on the optics commonly causes read errors, which lead to many retries and long delays.
You might also reinstall the DVD-ROM driver software, if it shipped with drivers. Sometimes drivers get corrupted, though I have no idea how that can happen. I've had several HP products fail to respond after months of service, and reinstalling them often restored full function. Use the System applet in Control Panel to access Device Manager, then delete the drive from the list. Then reinstall the software per the manufacturer's directions.
It's also a possibility that the drive itself is failing. I know that sounds unreasonable, but I've had two fail on me in less time. Happily, they no longer cost more than the computer.
The last possible problem I can think of is an ugly one - the drive controller on the motherboard may be failing. I haven't had this happen in a long time, but it does occasionally occur. It used to be possible to buy a drive controller card to bypass the onboard controller, but I haven't seen one of those in years.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: Then reinstall the software per the manufacturer's directions
I doubt that a company which sold me this computer knows who is a manufacturer of their DVD drives... It's name is "DVD Multi recorder". Therefore, excluding the step quoted above, I tried all of that.
What's fun, for some time DVD was recognized as FDD. After messing (plugging/unplugging) with ATA cable it wasn't recognized at all. After next messing, the current state has been achieved.
Roger Wright wrote: It's also a possibility that the drive itself is failing.
It is higly improbable, because it happend just after some risky operations where performed, which wasn't directly related to the drive itself. A fatal coincidence might happen, though (hope not).
Roger Wright wrote: the drive controller on the motherboard may be failing
Yep that would be ugly. The motherboard is ASUS, though. On the other side, why the hell could it fail in this specific moment?
Thank you for your interest and helpful answers. I will try to find someone who has such cleaning CD and stealencourage him to giveborrow it to me for a yearday or two.
Greetings - Jacek
|
|
|
|
|
Roger Wright wrote: Never mind then, you don't have a jumper issue. The jumpers are important only when you have two ATA drives on a single cable, as one drive must be master, the other the slave. Even this depends on where you live, as many European models use a third position - CS (chip select) - which is rarely used in the US.
I noticed some other symptoms (I left DVD broken since I didn't need it at the time and now I need it so the problem comes back).
1. When that long recognition occurs, a HDD led is on (constant, no blinking).
2. After about 15 min DVD is recognized (I see it's label in explorer and can view DVD properties in a device manager).
3. I tried to copy a file from DVD. The OS (Win 7 Pro) almost hung - every operation was taking much time, even though I have Quad processor. In a task manager, I noticed that one of cores is 100% utilized by kernel (a red indicator). Transfer was ~1,5 MB/s, which is unaccteprable for 5 GB file
4. Both explorer and device manager show a not existing CD drive (not DVD).
Is it possible that computer thinks that there is CD drive and it is a "master" and it slowes down everything (it read about it here[^], the last issue, on the bottom of the table?
Greetings - Jacek
|
|
|
|
|
Hi to All,
I wanted some information or idea on protocol analyzer (Bus analyzer)....
Can anyone please give me a brief idea on Bus Analyser...
I want to know what is it and how it works..like (I have read that bus analyzer comes with a hw and sw....now how anyone connects it..to USB?..and how we can analyze)
One small example would be very very great...
Thanks in advance.
-----------------------------
I am a beginner
|
|
|
|
|
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
|
|
|
|
|