|
I am developing a software where I store the Instance ID of every disk in the system. How can I get the Instance ID from a disk number? e.g I want Instance ID of DIsk0 DIsk1 etc.?
here is what I am doing
1] SetupDiClassGuidsFromNameA("DiskDrive",***);
to get the GUID for disk drives
2]SetupDiEnumDeviceInf(***) to enumrate all the disks.This gives me Instance ID's of all the disks
but how can I get the device instance ID of spesific disk(like Disk0)?
|
|
|
|
|
Your best bet is to use WMI. The following code was pulled from Microsoft's WMI Code Creator (you can download it from their website):
strComputer = "." <br />
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") <br />
Set colItems = objWMIService.ExecQuery( _<br />
"SELECT * FROM Win32_DiskDrive",,48) <br />
For Each objItem in colItems <br />
Wscript.Echo "-----------------------------------"<br />
Wscript.Echo "Win32_DiskDrive instance"<br />
Wscript.Echo "-----------------------------------"<br />
Wscript.Echo "DeviceID: " & objItem.DeviceID<br />
Next
This is a .vbs script, but the WMI Code Creator will output to VB.NET and C# as well.
Hope this helps...
|
|
|
|
|
i need some help about my stepper motor. it is a philips MB11-4786
and i dont know which circuit i should use.
modified on Wednesday, January 23, 2008 6:42:01 PM
|
|
|
|
|
Does google have anything on it?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
i've just got some information about my step motor.
i think it can be drived uln2803 but i am not sure.
actually i didnt understan what they mean.
i am giving you an adress belove. after that please tell me waht i will do.
by the way thanks for your answer.
http://www.reuk.co.uk/Examining-a-Stepper-Motor.htm[^]
|
|
|
|
|
Don't know what you intend making, but the web page you quoted is straight forward. However, here is a blog that uses the parallel output to drive two stepper motors attached to an etch-a-sketch. http://zedomax.com/blog/tag/uln2803/[^].
modified 1-Aug-19 21:02pm.
|
|
|
|
|
My question is on Intel's New Quad Core Processor Technology
This Quad Core Means - 4 CPU?
And if there is not 4 CPU(Processor) Then How it is Quad Core
It is same applicable for Core 2 Duo?
Actually what are this Terminology Means?
Believe Yourself™ :->™
|
|
|
|
|
|
Hi
Pentium is a technology as Core is both being produced by Intel.
P1,P2...P4 are the series of advancemnts as Core and Core2 are.
So far as Solo, Duo and Quad is concerned they are the number of procesing elemnts(CPU)
present based on Core technology.
Spread wat u Know!
|
|
|
|
|
Quad Core means four CPU cores on a single die.
I believe that AMD's quad-core CPUs are truly four independent cores, where Intel's are actually two dual-cores. AMD claims their's is better. This all happened last year, and I haven't really been paying attention to this stuff since just before the hardware actually hit the street.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote:
I believe that AMD's quad-core CPUs are truly four independent cores, where Intel's are actually two dual-cores. AMD claims their's is better.
In theory it is, in practice you need a 4 threaded app with heavy cross thread communications to realize the benefit. At the same time, Conroe is performing enough better than Phenom that it doesn't matter. They were roughly equal on a per clock basis but Phenom took a 10% hit due to a hardware bug (revision with the fix eta a few months) and Conroe will run at significantly higher clockspeeds.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull
|
|
|
|
|
It's four processors on one chip.
Hopefully, I get my hands on one soon
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Would there be a benefit as far as Visual Studio is concerned? That's the only thing I really do on the box anymore. I used to play games, but I got bored with 'em...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I used to play games, but I got bored with 'em...
John Simmons / outlaw programmer wrote: Would there be a benefit as far as Visual Studio is concerned?
That I wonder, if VS would break up different threads, such as during compiling, and delegating them to the different cores to speed up builds. I'm guessing a faster harddrive, such as a 10K rpm might help, too. Until I get cash for a better machine, I can only wonder.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
As far as I know MSBuild is already parralised (I think that's spelt correctly) so as long as the dependencies allow it then it should be able to utilitise all the cores it can on the processor.
[Maybe I've got this wrong and it's for the next version of MSBuild but I'm pretty sure it's already the case]
|
|
|
|
|
Hi Ed,
Ed.Poore wrote: parralised (I think that's spelt correctly)
may I suggest parallelized as in this article[^], a single r for sure.
BTW I was surprised by spelt, very British according to my dictionary;
actually it said Americans would use spelled; however it does not know a thing about parallelization...
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Meh, it's one of the words I always have trouble with.
Luc Pattyn wrote: spelt, very British
Given where[^] I'm located at the moment and where I am from[^] it'd be a reasonable assumption to make that I'm British :p
|
|
|
|
|
I see, that is after I told Google's satellite to zoom out a bit
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Ed.Poore wrote: MSBuild is already parralised
The default value in Visual C++ 2005 is "2".
[Tools] | [Options]:
[Projects and Solutions] -> [Build and Run]:
maximum number of parallel project builds.
Maxwell Chen
|
|
|
|
|
Presumably that applies to C# as well?
|
|
|
|
|
Ed.Poore wrote: Presumably that applies to C# as well?
I guess so. Mine is Visual Studio 2005. The [tools] | [options] are global settings.
Maxwell Chen
|
|
|
|
|
Does anybody really knows what will happen if SRAM access speeds do not match?
I have two sticks (PC133) - one marked 75 and the other 7.5 and experiencing some strange stuff - locking LCD and messed up display on LCD. I am trying to find out what is the problem. I suspected wireless mouse and USB problem but no luck. However - it runs better with just one memory bank.
And it always fails in IE !
Cheers
Vaclav
|
|
|
|
|
I'm not that familiar with static memory. Your best bet is to run a memory test to determine if the failure is located in the memory module. If you do register an error, swap the modules into different slots and test again. If you return another error, there is a good chance you do have bad stick of memory. If you do not return an error on the second attempt, it is probably a bad socket, not the memory module; in which case you would need to replace the motherboard.
Another thing you want to avoid is "mix-n-match memory". Make sure that the memory installed in the system is nearly exactally the same. You said they are PC133, so make sure both are ECC or neither are ECC, make sure the brands match too - as some brands do not mix well with others. You will also want to check with your BIOS to make sure the voltage output to the modules are correct.
Lastly, if I am not mistaken, SRAM is an old(er) technology. That being the case, you may want to think about upgrading the system entirely.
-David
PS- This is completely unrelated, but try out Opera instead of IE, you might like it...
|
|
|
|
|
I have been thru the swapping into different banks.
So far it runs better with just single module in bank 0.
Of course I do not notice any difference in speed.
I have not tried bank 1 to find out if it is a socket itself.
It would be very unlikely since I have similar failures in two PS's.
I do not believe in upgrading just because it is "older" technology.
When it runs it is OK for my C++ development.
Actually I prefer slower machine - it lets me take a break during compile!
Thanks for your input,
Cheers
Vaclav
PS Technically it is really SDRAM.
What puzzles me that the BIOS memory test always passes.
|
|
|
|
|
ruready511 wrote: Lastly, if I am not mistaken, SRAM is an old(er) technology. That being the case, you may want to think about upgrading the system entirely.
Sram is the design used in CPU caches. It's much faster than dram but is more expensive to make and needs more space on the silicon. IIRC Sram uses several transistors to store a value, Dram charges a capacitor to do the same.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull
|
|
|
|