|
Oooh. I had already found a solution to my problem, but I think I'll go with PJ's class instead, as it's tested and more mature than my single function.
Thank you for the link!
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
|
I don't read Chinese.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
Argh. It was such a sweet idea, but I'm blown to hell by some of the device drivers I'm targetting. They don't seem to provide any information to WMI, so they're invisible to WMI queries, but visible with my SetupDIXXX()-implementation.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
Yeah in my opinion WMI is not suitable for robust hardware enumeration. You are making the right choice by using the SetupDi class of API functions. I probably would have used the PnP Configuration Manager Functions[^] even though it seems Microsoft does not recommend calling them directly.
Best Wishes,
-David Delaune
|
|
|
|
|
WMI is not mandatory!
Actually I never imnplemented it.
Basically you will need to enumerate the serial (GUID) devices from your app. Get the friendly nmame for each device, and if it is the right port (this is the name displayed in device manager) then you go ahead and use it.
OK, I;ll be nice and bung you some code to help:
SetupDiGetClassDevs(); Thiks gives you a kind of handle to an array.
Call SetupDiEnumDeviceInterfaces(); for each device in sdaid 'array'.
With the info from this call SetupDiGetDeviceInterfaceDetail(), then call
SetupDiOpenDeviceInterface();
Then call SetupDiGetDeviceRegistryProperty() SPDRP_FRIENDLYNAME and SPDRP_DEVICEDESC for example.
If you agree that GW is a crock of chit I'll mail you some code.
Morality is indistinguishable from social proscription
|
|
|
|
|
fat_boy wrote: If you agree that GW is a crock of chit I'll mail you some code. Poke tongue
I solved it using SetupDiEnumDeviceInterfaces() et al! So, no, I am not going to admit anything than greaaaaaaaat succeeess!
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
Jörgen Sigvardsson wrote: I solved it using SetupDiEnumDeviceInterfaces() et al!
Yep, I'll bet it felt like giving birth to a water mellon!
Mind you, these funcs get easier to use the more you use them.
Morality is indistinguishable from social proscription
|
|
|
|
|
Well, I'm not going to venture into these territories again, if I don't really have to. My role is somewhere right above driver level all the way up to the UI.
The reason I had to do this was because of poor planning. We have devices running Windows Embedded that have already been deployed with a certain image/OS configuration. The new hardware requirement came after the deployment, so I had to find a way to install the driver in a device update script.
But I must say I've learned a lot about how Windows works. I've read a couple of device driver programming books as well as windows internals books (Russinovich et al). I've also had to figure stuff out on my own. Stuff that can be added to the CV, and mentioned i future job interviews.
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
Its a usefull (!!!) set of functions. You can disable a device for example to cause a power reset, but, as you say, they are a little bizare.
Of course as a kernel expert al this kind of stuff is bread and buter to me. For me to write an app now is just too dull. I guess I have spent so long messing around in the kernel that user mode is just too easy.
Its always uefull to know at least some of this stuff though.
Morality is indistinguishable from social proscription
|
|
|
|
|
Hi, I'm trying to consolidate my servers and decided to virtualize some of the applications that are not that critical in our company. Could anyone tell me what is the best specs for the server when using virtualization. Your help will surely appreciated. Thanks in advance.
|
|
|
|
|
Since you haven't said anything about the number of servers you want to virtualize, what type of servers they are, what those servers are responsible for, what their average and peak loads are, storage requirements for data, future plans for the next 5 years, what expansion capabilities you want, ...yada, yada, yada ... noone can give you any kind of information that would be of any use.
|
|
|
|
|
This guide will show you how to put DVD movies and downloaded/purchased videos on the Sony Walkman with DVD to Walkman Suite.
http://www.aidownloading.com/images/guide/sony-walkman.gif
Part One: How to rip DVD to Walkman supported video/audio
Part Two: How to convert video/audio to Walkman supported video/audio
Make Preparations: Download DVD to Walkman Suite.
http://www.aidownloading.com/images/guide/dvd-to-walkman-suite.jpg
Part One: How to rip DVD to Walkman supported video/audio
First, click "DVD to Walkman Converter" on the main interface to run DVD to Walkman Converter.
http://www.aidownloading.com/images/guide/dvd-to-walkman-converter.gif
Step 1. Open your DVD Drive and put your DVD in it, then click "Load DVD" and choose "Load DVD" to load your DVD into this program.
Step 2. Choose your output format from the "profile" drop-down list.
After you choose your output format, you can adjust your output video's settings, such as "Resolution", "Frame Rate", "Bitrate", "Sample Rate" and so on.
Step 3. Click "Start" now to begin your conversion and you will get your video soon.
Part Two: How to convert video/audio to Walkman supported video/audio
First, click "Walkman Video Converter" on the main interface to run Walkman Video Converter
http://www.aidownloading.com/images/guide/walkman-video-converter.gif
Step 1. Click "Add File" to load the video you want to convert.
Step 2. Choose output format by clicking "profile" and customize your own output video by clicking "settings" to adjust the Resolution, Frame Rate, Bitrate and so on.
Before you click "Start" to begin your conversion, you can do some editing works, such as pick up a part of your video to convert(trim), choose your own play region(crop) and put two or more files into one.(merge into one file).
Step 3. OK, now you can begin your conversion by clicking "Start" button.
Done!
|
|
|
|
|
Why do you insist on posting this crap??
|
|
|
|
|
Hi guys I have research in Operating Systems and it's realted to Clock management.
So,I did some researches but I found it related to hardware I need some explinaations about clock management
either if it related to hardware or to O.S.
Thanx.
|
|
|
|
|
That depends on your point of view. A PC keeps time using a Real Time Clock chip, which traditionally is a function built into the CMOS device on the motherboard that holds the basic settings for the system. I haven't kept up with recent changes in the industry, so that may have changed while I was sleeping. The RTC receives a clock signal directly from the system clock, and maintains a counter to keep track of real time.
Windows reads that clock at startup, but then keeps time internally using software interrupts at a reasonably high priority. But it does not always respond to those interrupts because of the pre-emptive nature of the beast; other processes sometimes have priority and cause updates to be missed. For that reason, a PC running Windows will, over time, lose time and display a time that is inaccurate. Rebooting will cause a reload of the true time and restore the display time.
If you need realtime clock information, you need to query the hardware, not the OS. I have no idea how to do that, unfortunately, since Windows deliberately makes it hard to access hardware directly, but it can be done, I'm sure.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: Windows deliberately makes it hard to access hardware directly
True, but it can usually be handled via windows. For this case one can use WMI[^] scripting.
|
|
|
|
|
Yes, why can't I?
I was stashing away some old photography backup zips last night. I could copy 4 of my ~ 7 GB backup zips to my external USB connected hard-drive when I got the error message "Cannot copy file. Not enough free space." (sort of)
But there are 120 GB free. Why is this?
--
Time you enjoy wasting is not wasted time - Bertrand Russel
|
|
|
|
|
FAT32 has a 4 GB file size limit.
--
Time you enjoy wasting is not wasted time - Bertrand Russel
|
|
|
|
|
Johann Gerell wrote: FAT32 has a 4 GB file size limit.
No, as far as I know FAT32 only support 2Gb maximum file size. NTFS is maximum support 4Gb.
|
|
|
|
|
Mekong River wrote: FAT32 only support 2Gb maximum file size
Not correct; it is 4GB-1 (see here[^]), however some tools can't get beyond 2GB-1 because they used int instead of unsigned int for dealing with file offsets and sizes.
Mekong River wrote: NTFS is maximum support 4Gb
Not correct; supporting much larger files was a primary reason to launch a new file system; see here[^].
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Dear Luc, I'm sorry for my mistake. I also review my book Windows XP resource kit[^] again and found that I made a mistake. I'm sorry again for this technical error.
Thank,
Mekong
|
|
|
|
|
Yep, 32 bits, 4 gig adressing.
Morality is indistinguishable from social proscription
|
|
|
|
|
Windows 2k?
Morality is indistinguishable from social proscription
|
|
|
|
|
Hi, if I turn on desktop computer for one hours and turn on laptop for one hour, which one is consume more electricy? (I just turn on, not running any program).
Thank in advance!!!
|
|
|
|