|
i am student who study device driver.
i don't understand blow source so i search DDK document but i can't understand.
can you explain line by line?
sorry to ask whole thing
HANDLE GetDeviceViaInterface( GUID* pGuid, DWORD instance)
{
// Get handle to relevant device information set
HDEVINFO info = SetupDiGetClassDevs(pGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_INTERFACEDEVICE);
if(info==INVALID_HANDLE_VALUE)
{
printf("No HDEVINFO available for this GUID\n");
return NULL;
}
// Get interface data for the requested instance
SP_INTERFACE_DEVICE_DATA ifdata;
ifdata.cbSize = sizeof(ifdata);
if(!SetupDiEnumDeviceInterfaces(info, NULL, pGuid, instance, ifdata))
{
printf("No SP_INTERFACE_DEVICE_DATA available for this GUID instance\n");
SetupDiDestroyDeviceInfoList(info);
return NULL;
}
// Get size of symbolic link name
DWORD ReqLen;
SetupDiGetDeviceInterfaceDetail(info, ifdata, NULL, 0, ReqLen, NULL);
PSP_INTERFACE_DEVICE_DETAIL_DATA ifDetail = (PSP_INTERFACE_DEVICE_DETAIL_DATA)(new char[ReqLen]);
if( ifDetail==NULL)
{
SetupDiDestroyDeviceInfoList(info);
return NULL;
}
// Get symbolic link name
ifDetail->cbSize = sizeof(SP_INTERFACE_DEVICE_DETAIL_DATA);
if( !SetupDiGetDeviceInterfaceDetail(info, ifdata, ifDetail, ReqLen, NULL, NULL))
{
SetupDiDestroyDeviceInfoList(info);
delete ifDetail;
return NULL;
}
printf("Symbolic link is %s\n",ifDetail;DevicePath);
// Open file
HANDLE rv = CreateFile( ifDetail;DevicePath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if( rv==INVALID_HANDLE_VALUE) rv = NULL;
delete ifDetail;
SetupDiDestroyDeviceInfoList(info);
return rv;
}
hi
i am student.
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
I'm looking for resources on programming in machine/binary language so far I've only found resources on coding in ML on atari archives.So if anyone written any tutorials or found any ebooks on the subject please email them to alien.fx_fiend@yahoo.com.What I'm looking for is cutting edge and in depth analysis into the fundamental workings of a system and ML coding.
~When The Demons Arrive The Survivors Will Envy The Dead~
|
|
|
|
|
how about x86 assembly[^] ?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Try for
IBM PC Assembly language and programming
Peter Abel.
|
|
|
|
|
I don't know much about networking..
I can see a port in the back of my motherboard for connecting the LAN cable.
Isn't it enough for setting up a LAN??
What is an NIC card?
What is the use of it when the motherboard comes with the cable port.
I think the RJ45 is in the back of the board...
Is there any special use for using an NIC??
|
|
|
|
|
|
During development of a USB device, I temporarily used Vendor ID=547 and Device Id=1002, since those were the defaults for the development kit I was using. I have since switched to using properly-registered IDs.
Unfortunately, a product I have purchased and would like to use (a chip programmer) uses the same IDs, and any time I plug it in Windows wants to attach my drivers rather than the proper drivers for the device. I can easily enough see what devices are 'installed' and uninstall them, but the next time I plug in the device it installs it with my drivers rather than prompting for the right ones.
What must I do to tell windows that 0547/1002 is NOT my device and I would like it to prompt for a .INF file (which could then load the proper drivers)?
|
|
|
|
|
I have no clue to where windows caches the setting or files. Have you tried uninstalling your driver, purging the temporary files and removing any .INFs that match your description? Other than that, this is why default IDs are bad.
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
Since having written the earlier message, I've managed to delete the appropriate .INF files and pretty much convinced the system that my device doesn't exist under its old identity. I still can't get the new device to work, though. My guess is that it partially installed something in such a way as to get itself confused.
Sometime I'll reinstall the OS on this machine, and when I do I can fix things then.
In the mean time, I wonder how I should best contact/pester the device vendor. It seems that its .INF files contain both the default vendor/device id's and some other ones, but the device itself uses the default ones. Grrr....
|
|
|
|
|
I have some old manufacturing equipment that has 3.5" floppy drives.
I am wanting to replace the floppy drives with something else like a USB stick. I
must use the FDD interface because of the limitations of the equipment.
Are there any available products already available?
If possible, I would like to access the storage over a network connection also.
|
|
|
|
|
What do you know about the hardware/software in question? Do you need read/write access, or would read-only be sufficient? There exist SmartMedia-to-floppy interfaces which allow a SmartMedia card to be used as a very large (but still slow) floppy disk, but those unfortunately require the installation of special drivers. If you need something that physically looks to the rest of the system like a 3.5" drive, I would expect such a thing could probably be constructed with a small microcontroller, a CPLD, a flash chip, and some buttons and a display to switch disks. Sounds like that would be an interesting project; not particularly difficult, but I don't know if anyone's done it.
|
|
|
|
|
|
That device looks interesting. I'm a little curious, though, how it would work with devices that don't use a DOS-compatible file system. Something like an Ensoniq DSK just has three sample-storage areas per disk; push 1, 2, or 3 to select the area to save/load. It's conceivable that it might use a file system, but I think it's far more likely that it just reads a fixed range of tracks based upon the button selected.
|
|
|
|
|
If it's being honest about working almost anywhere I'd assume it emulates the device at a very low level... *IF*
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
The file format used by the equipment is FAT. The disks written by the equipment can be read on a PC and vice versa.
The equipment can format a disk and then be used with a PC.
|
|
|
|
|
|
Hi Guys
Just had this done. The floppy to usb converter is now available foronly 50USD+freight and can be shipped to any part of world. Its compatible with 1.44 mb floppy format and works fine in CNC / Knitting/weaving/Embroidery/ Yamaha Keyboards/Korg Keyboards and several otrher machines . If anyone needs the converter pls mail me at vishal@keindia.com or info@floppytousb.net
for more details about unit please visit floppytousb.net
Regards
Vishal.
|
|
|
|
|
Hello,
I'm developing some client-server software, and the server side is running Linux, Postgresql and Python, the bottleneck will probably be the DB. The problem is, I don't know what sort of hardware to buy for my clients. Performance requirements are modest, but its reliability I'm worried about.
A DIY job with my local PC shop can get me a quad-core 12MB L2 cache Intel, 8GB DDR3 Kingston RAM, and 4x500GB SATA 7500rpm WD HDDs (software RAID 0+1) with a $150 power source, extra cooling and a better case (from Thermaltake), and a $400 UPS, all of this should make it more reliable, and it costs less than $2k. (I've yet to do any stress-testing, but that kind of hardware should be able to cope with quite a beating)
Then I looked at brand-name servers, like IBM X series, and Dells, and good God, the prices. If I want the same toys, I have to pay many times that amount. I understand that they have hot-swap, hardware RAID, and a nice badge, but what (else) on hell do they charge so much for? Is a Xeon with apparently the same performance specs as a normal Intel really worth a grand more? Dell must have gold-plated their keyboards, else I can't figure out why they charge ~70 bucks for a standard 104-key one, and a tape backup unit is around $700
My test server is a dual-core Intel with 2GB DDR2 RAM and 2x500GB 7500rpm HDDs (software RAID 1), hosting a low-traffic website, email and my software, for less than $500 (no UPS) and it never missed a beat since I installed it half a year ago.
For a brand system with my performance specs (the quad-core set) I've seen quotes as high as 20 grand, so I must ask, CP folks: if you'd have to buy servers with roughly those specs, one for each customer, reliability is a huge concern, and higher server cost means less profit, would you pick DIY or brand name?
Thanks for the help!
|
|
|
|
|
Apart from substituting Hardware RAID, I'd steer well clear of Software RAID if reliability is a concern, which would add approx $100.
For your spec I would be tempted to go for a local builder, provided I was satisfied with their build quality/after sales service.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks
|
|
|
|
|
Its overkill.
No reason to be spending 2k on a startup server. You probably wont use anywhere near its limitations before it becomes obsolete
|
|
|
|
|
This is an odd problem I've been having for about 2 years now. I was hoping some of you hardware gurus could help me out with it. Here's the issue:
Whenever my hard drive starts to get full, like as in less than 10% free space left, the screen begins to randomly black out for a few seconds every ten minutes or so. It blacks out, turns itself back on, and then blacks out again, a few minutes later, over and over. Annoying as hell of course, when you're trying to get work done.
Now, I *know* it's a result of the full hard drive, because this only ever happens when the hard drive is full and it is fixed when the hard drive is emptied again. I'd thought it was viruses in the past, since the problem was fixed as soon as the thing was reformatted. I'd also thought it was maybe an overheating issue, or a powersupply issue. But now I'm convinced that it's a hard drive space issue. Why would the thing work fine again, with the exact same hardware running, once Windows was re-installed?
My only guess is that it has something to do with the lack of virtual memory space taxing the RAM, and in turn taxing the graphics processes enough to black the whole thing out for a few moments every 5 to 10 minutes or so. It seems to be worse with memory intensive programs running in the foreground.
I'd like to get this thing figured out without having to delete half my programs and files, or reformatting yet again. Hopefully there's a solution.
(I have 1GB Ram. Win XP. AMD Sempron processor (3000+, 1.8 ghz). The hard drive is 150GB, with about 9GB free. The display adapter is a GeForce 7600 GS. All drivers and programs have been updated and virus/spyware scanned--clean. Please help.)
"Go to, I’ll no more on’t; it hath made me mad." - Hamlet
|
|
|
|
|
I thing you have it all figured out. However, 9GB should be enough to hold a 2 GB swapfile or something like that. You should consider letting Windows handle the swapfile, if you don't already, and maybe defrag the HDD (with swapping disabled, of course). Linux has a clever solution for those problems: It uses a dedicated swap partition, so no file fragmentation ever happens. You could simulate that by moving your swapfile to a separate partition.
Good luck!
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
That's serious overkill. Killing the old swap, defragging, and creating a new non-resizable swapfile will accomplish the same thing without complicating your filesystem.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
I disagree. He has had the problem several times, and I think that warrants a special setup.
However, for most people, it really IS serious overkill.
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|