C++/VB - Drive to Interface

Asked By Zarir.Karbhar
17-Nov-07 01:08 PM
Hi



Is there a way for me to figure out the type of storage device given
the drive letter using win32 API



ie given the drive letter , I need to find out whether it interface
is  USB storage device or IDE or iSCSI or SCSI or serial or parallel
etc.



Thanks

Karbhari
XP
(1)
ISCSI
(1)
DeviceIoControl
(1)
StopSpam
(1)
WinDrvr
(1)
KHash
(1)
Filesystem
(1)
Englisch
(1)
  Don Burn replied...
17-Nov-07 08:33 AM
Use IOCTL_STORAGE_QUERY_PROPERTY to get the drives bus type.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
  Kerem Gümrükcü replied...
17-Nov-07 11:30 PM
Hi Karbhari,

maybe this is what you are looking for:

[GetVolumeInformation Function]
http://msdn2.microsoft.com/en-us/library/aa364993.aspx

[DeviceIoControl Function]
http://msdn2.microsoft.com/en-us/library/aa363216.aspx

See remarks Section for the Control Codes that you will need
to get the desired information,...


Regards

Kerem


---------
New Open Source Tools from me:
Calculate MD5 or SHA1 Hash for Files!
KHash Tools 1.0 Englisch:
http://download.chip.eu/de/KHash-Tools-1.0_1317168.html
http://entwicklung.junetz.de/projects/opensource/khashtools/khashtools%20v.1.0.zip
---------

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
kerem.g@arcor.de

Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2

Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
Sign my guestbook: http://entwicklung.junetz.de/guestbook/

-----------------------
Create New Account
help
0f, &mesh, NULL); Win32 DirectX Graphics Discussions D3DXMatrixLookAtLH (1) D3DXMatrixRotationY (1) D3DXCreateCylinder (1) OnD3D9FrameRender (1) XP (1) IDirect3DDevice9 (1) DrawIndexedPrimitive (1) UnlockVertexBuffer (1) [Please do not mail me a copy of M, T1836%T<FEX5')A;G-L871I;VXH)FUA = % = O<FQD+#$P+C!F+# N, &8L, "XP M9BD[#0H)<&0S9$1E = FEC92T^4V5T5')A;G-F;W)M*"!$, T144U]73U), 1"PF C P, # P, #LL"B @.38N, S Y.38W.RTW, 2XR, 3<W, 3([ M, "XP, # P, # [+ H@("TY-BXS, #DY-C<[-S$N, C$W-S$R.S N, # P Y, 3$W.RP*(" M M.38N, S Y.38W.RTW, 2XR, 3<W, 3([, "XP, # P, # [+ H@(#DV+C, P.3DV-SLM M-S$N, C$W-S$R.S CLP+C P, # P, #LL"B @+3DV+C, P.3DV-SLW, 2XR, 3<W, 3([, "XP, # P M, # [+ H@("TY-BXS, #DY-C<[-S$N, C$W-S$R.S$Q C0S.3$Q-SLL"B @+3DV+C, P.3DV-SLW M, 2XR, 3<W, 3([, "XP, # P, # [+ H@("TY-BXS, #DY-C<[+3<Q+C(Q-S<Q, CLQ M, 3 3@L, "PQ.3LL"B @, SLQ.2PV+#$X.SL*"B @ M365S:$YO<FUA;', @('L*(" @-CL*(" @, "XP, # P, # [, "XP, # P, # [+3$N M, # P, # P.RP*(" @, "XP, # P, # [, "XP, # P, # [, 2XP, # P, # [+ H@(" P
Problem with XP scheduler? C++ / VB I am having firefox 3.5.5 and 3.5.6 freeze my box when I update several tabs in a rapid succession on Win XP SP3. What happens is box totally freezes. Task manager -> Performance tab shows one of cores ctl-alt-del) and disk stops flashing every few seconds as it normally does under XP. Interestingly enough, it does not happen under Windows 7 on the same box no matter how hard I try. Some say it is a problem with crappy XP scheduler. Is there anything I can do under XP to fix this issue? Hardware: Asus M4A78 motherboard, Athlon 2, X4 620 CPU, 4 Gigs of DDR2 ram by Team Extreme. Running on Windows XP SP3. - - Programmer's Goldmine collections: http: / / preciseinfo.org Win32 Kernel Discussions Windows NT 3.51 (1) Windows XP (1) Windows 7 (1) Python (1) Linux (1) SystemTimeToFileTime (1) UNIX (1 XP (1) I'd say it is a problem with Firefox. Send a bug to them
for including a vbs file in this scenario? Jake VBScript Discussions FSO1.OpenTextFile (1) Windows XP (1) Active Directory (1) Scripting.FileSystemObject (1) Office (1) Vista (1) XP (1) PCHealth (1) This link might help: http: / / www.naterice.com / blog / template_permalink.asp?id a "testy mood" at startup, having waited for a relatively lengthy period for their systems (xp or vista) to load. It is frankly surprising to me to see a much more every 3 years, but I still do any serious work on 98.) I find that XP is capable of being quite zippy and of starting up nearly as fast as 98 risky as well as unnecessary!), and also turning off all of the kiddie GUI elements, XP is as fast as 98 and better at handling a load. (I still haven't decided whether I can get XP to where it's safe enough to go online.) One of the worst things I ve found about XP is that MS has got into some rather dubious design ideas. Windows File Protection (PCHealth on a regular basis and both are bad ideas for most people. In a sense, XP is designed to cause people to buy new PCs more often. After all, very few
Maintainence C++ / VB Hi All We have a mixture of Windows 200 SP4 and Windows XP SP3 Domain Workstations on our network. Currently a lot of them are experiencing slow performance via VBScript. Does anybody have thoughts or ideas about this. Regards D VBScript Discussions Windows XP (1) Windows Update (1) Windows 7 (1) Vista (1) VBScript (1) SOHo (1) Maintainence (1 am not sure about automating defrag, but that is unlikely to have an effect, anyway. XP, especially, is prone to sluggishness. But it does not have to be if you clean it is free, VBScript-based): www.jsware.net / jsware / xpfix.php5 I find that once XP is cleaned up it runs better than Win9x on the same hardware. But a default when provided with extra RAM. Workstations have Read here: "How To Schedule Tasks in Windows XP" at http: / / support.microsoft.com / kb / 308569 However I doubt very much that running Disk other than services), with options to toggle the setting. The link above is for an XP+ version, but I would guess there are still copies of a 2000-compatible version around Microsoft MVP - Windows Desktop Experience Please Reply to the Newsgroup Interesting. . .My copy of Windows XP is more than seven years old, and it is fast and reliable. - -- Leonard Grey Errare those things can slow it down substantially. Although both of those problems are common, Windows XP should not be blamed for the sluggishness that results from them. - - Ken Blake, Microsoft MVP
XP increased processor utilization C++ / VB I am working on a multi-threaded, statically linked MFC is two fold. The first is that in general running the same application under Windows XP SP2 uses more processing power than when running under Windows 2K SP4(about 8% or an increase of CPU utilization (according to Task Manager & Perfmon) that is significantly higher under XP. Under 2K, similar movement of the mouse results in a 1-3% increase of processor utilization. Under XP, the processor utilization jumps 10-25%. I'm fairly confident that the problem is not could be related to MFC, Win32, or potentially something else. Shaun VC MFC Discussions Windows XP (1) Windows Server (1) Vista (1) XP (1) SendMessageToDescendents (1) SendMessageToDescendants (1) AfxCallWndProc (1) AfxGetMainWnd (1) Well, 8% is within error bounds though it appears his analysis is fairly accurate. Anyone here have any thoughts on why XP would handle the SendMessageToDescendants of the WM_IDLEUPDATECMDUI message so poorly compared to 2K? Also, any deleting or the frequency of those objects well enough to make an informed decision. Shaun XP itself is probably part of the culprit. Somewhere under the Start menu is a command