In the past iv see users asking how to get the hardware serial of a HDD, so heres a dll that will retrieve the Vendor Model, Hardware Serial and Firmware Version of the target hard disk...... Enjoy !
Professional Software Development Tools
In the past iv see users asking how to get the hardware serial of a HDD, so heres a dll that will retrieve the Vendor Model, Hardware Serial and Firmware Version of the target hard disk...... Enjoy !
Last edited by RizlaUK; 02-01-2009 at 11:34 AM.
Open your eyes to Narcissism, Don't let her destroy your life!!
RizlaUK...
Thank you very much for HDDInfo!
Great and nice job!
Very usefull!
thanx m8,
that is really very helpfull.
Very nice. Does it work on all versions of Windows? I know that there can be problems on a clean install of Windows 98 and ME I beleive because MS mistakenly left out a file. A while back I purchased a dll for this that guaranteed it would return the HD serial but it was far from reliable. It would only work on Vista if you were logged on as an admin.
Dermot
I am so out of here
unfortunately, the API command (DeviceIoControl_) in this dll is not available on win 98 and ME, but it should work ok on vista (but i think the calling program require admin) although this is untested so any feedback would be nice
heres the official word from MS
http://msdn2.microsoft.com/en-us/library/aa363216.aspxRequirements
Client Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Server Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Header
Declared in Winbase.h; include Windows.h.
Library
Use Kernel32.lib.
DLL
Requires Kernel32.dll.
Open your eyes to Narcissism, Don't let her destroy your life!!
thanks man... here's a test crypto mod
(btw: dll can use drive\partition letter as parameter)
i have a problem i have tryed making it so no matter what drive i added it to
it will tell me that drives info but no look
i am unable to do this even if i get it read the right drive still comes back with
C drives info Drive 4 is my D drive so i tryed to change it just for the d
drive and no look gave me on click error
i tested this on 3 systems all with multiple harddrives and all worked as expected, whats your setup and what code you using
Open your eyes to Narcissism, Don't let her destroy your life!!
to raw test this DLL, try this standalone code:
Code:-- to test dll reliability based on a number paramater for the DLL (as intended) -- 0, "1",2, etc for Hard Drives(not partitions of 1 or more drives) for n=0,10 do -- 0 for first HD, 1 for next HD(not a partition) in PC..if exists , etc local tHD = {}; tHD.VendorModel = DLL.CallFunction("AutoPlay\\Docs\\HDInfo.dll", "GetHDDVendorModel", n, 2, 1); tHD.HardwareSerial = DLL.CallFunction("AutoPlay\\Docs\\HDInfo.dll", "GetHDDHardwareSerial", n, 2, 1); tHD.FirmwareVersion = DLL.CallFunction("AutoPlay\\Docs\\HDInfo.dll", "GetHDDFirmwareVersion", n, 2, 1); local stxt; if String.Length(tHD.HardwareSerial) < 2 then --errors stxt = "Not Found\\Dll Error Returns\r\n\r\nHD-VendorModel: "..tHD.VendorModel.."\r\nHD-HardwareSerial: "..tHD.HardwareSerial.."\r\n\r\nHD-FirmwareVersion: "..tHD.FirmwareVersion; else stxt = "Raw Results for Target: "..n.."\r\n\r\nHD-VendorModel: "..tHD.VendorModel.."\r\nHD-HardwareSerial: "..tHD.HardwareSerial.."\r\n\r\nHD-FirmwareVersion: "..tHD.FirmwareVersion; end Dialog.Message("Physical Disk no: "..n, stxt); end
i am using the example and it just wont pick up the drive
the drive is a 500 Sammson drive keeps saying its my c drive
i have tryed adding web exe so it is able to find the apps main
file and get that drives letter but the code states 3 i have changes this to 4
as thats the d drive and it don't work.
you have 4 drive or is it 5 on the demo and i have changed C: to D: still
no luck
i might be just editing something whats not needed are you able to make another demo ?
i did change to from a dialog to a lable but thats is.
OK with that code i am now able to fine my drive i am unable
to get it to work with just adding a letter like D:\
but i guess i have to work some of this out of somehow lol
thanks Eagle and RizlaUK
Mirrored
Link:
http://jonny6.pap3rback.net/AMS/?page=RizlaUK#2
Note: Full Admin Privs on NT Oss required for this dll![]()
Ignore this message, wrong thread
Last edited by AlexSugarRC; 11-17-2010 at 08:49 AM. Reason: wrong thread