hard-drive

Read bytes of hard drive

橙三吉。 提交于 2021-02-08 10:37:25
问题 Using the hex editor HxDen one can read (and edit) the bytes on the hard drive or a USB key or the RAM. That is, one can read/change the first byte on the hard disk. I understand how to read the bytes from a file using C++, but I was wondering how one might do this for the hard disk. To make it simple, given a positive integer n, how can I read byte number n on the hard drive using C++? (I would like to do C++, but if there is an easier way, I would like to hear about that.) I am using MinGW

Read bytes of hard drive

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 10:37:22
问题 Using the hex editor HxDen one can read (and edit) the bytes on the hard drive or a USB key or the RAM. That is, one can read/change the first byte on the hard disk. I understand how to read the bytes from a file using C++, but I was wondering how one might do this for the hard disk. To make it simple, given a positive integer n, how can I read byte number n on the hard drive using C++? (I would like to do C++, but if there is an easier way, I would like to hear about that.) I am using MinGW

Get Hard disk serial Number

让人想犯罪 __ 提交于 2020-01-26 09:43:51
问题 I want to get hard disk serial number. How I can I do that? I tried with two code but I am not getting StringCollection propNames = new StringCollection(); ManagementClass driveClass = new ManagementClass("Win32_DiskDrive"); PropertyDataCollection props = driveClass.Properties; foreach (PropertyData driveProperty in props) { propNames.Add(driveProperty.Name); } int idx = 0; ManagementObjectCollection drives = driveClass.GetInstances(); foreach (ManagementObject drv in drives) { Label2.Text+=

Get Hard disk serial Number

对着背影说爱祢 提交于 2020-01-26 09:43:23
问题 I want to get hard disk serial number. How I can I do that? I tried with two code but I am not getting StringCollection propNames = new StringCollection(); ManagementClass driveClass = new ManagementClass("Win32_DiskDrive"); PropertyDataCollection props = driveClass.Properties; foreach (PropertyData driveProperty in props) { propNames.Add(driveProperty.Name); } int idx = 0; ManagementObjectCollection drives = driveClass.GetInstances(); foreach (ManagementObject drv in drives) { Label2.Text+=

Storage devices, file transfer and copy operation logic

删除回忆录丶 提交于 2020-01-17 02:41:13
问题 I am trying to create a file copy utility which should work as a replacement of the standard windows file copying process. The main reason to do so is to add copy/move queue support and hopefully some sort of optimisation by enabling multiple file transfers only when the file transfers would not involve the same destination physical media(You know how the overall transfer rate drops when there are multiple transfers going on with the same destination media?) I would like to clarify that I

SMART Hard Drive INFO Powershell [duplicate]

こ雲淡風輕ζ 提交于 2020-01-16 14:35:12
问题 This question already has answers here : How to read HDD S.M.A.R.T. attributes? (4 answers) Closed 5 days ago . I am looking for a way through possibly powershell to obtain the SMART data for a hard drive on any given device. I have tried the WMI commands both through CMD and powershell that I have seen but have not been able to get the appropriate data I am looking for. Get-WmiObject -list I hoped to find something for SMART or REallocated space in this list but nothing related is found.

CHS to LBA mapping - (Disk Storage)

末鹿安然 提交于 2020-01-16 01:09:10
问题 Before LBA you simply had the physical mapping of a disk, which on originally on an old a IBM-PC compatible machine would look something like this the following: Cylinder Number : (10-bits) 0-1024 (1024 = 2^10) Head Number : (8-bits) 0-256 (256 = 2^8) Sector Number : (6-bits) 0 is reserved typically for the " boot sector " ( c -0, h -0, s -0) 1-64 (63 = 2^6 - 1) *0 is reserved Total CHS address bits : 24-Bits Back in day the average (file|block|sector) size was 512B. Example from wikipedia:

Need libc APIs to access disk geometry and partitioning related info

强颜欢笑 提交于 2020-01-06 15:12:40
问题 I am working on a new project, which relates to creating drive images for backup. As a part of it, i need to write code which can give much useful information related to disk geometry - cylinders, no. of sectors, partitions, and file systems and even drive specific info, like which partition is present on which drive. i need some APIs. If you can post a code too in addition to APIs that will be great. P.S: Something similar to what Novell - Zenworks (Imaging) does 回答1: There is no glibc

How can I read HDD volume serial number using VB.NET?

孤人 提交于 2020-01-05 10:57:35
问题 How can I read HDD volume serial number using VB.NET but without any third party addons for Visual Studio or any external libraries - I neeed native VB.NET code for this if possible. 回答1: Not sure if this is what you're looking for but a quick google search lead me to this website: http://www.vbgold.com/vb-projects/disk-serial-number.shtml 回答2: Public Function GetDriveSerialNumber() As String Dim DriveSerial As Long Dim fso As Object, Drv As Object 'Create a FileSystemObject object fso =

Is it possible to determine the Win32_DiskDrive SerialNumber of the Environment.SpecialFolder.System drive?

一笑奈何 提交于 2020-01-02 17:36:01
问题 I've been going around in circles for a bit now, can't seem to find the answer on google either. As the title says, if i get the current drive letter windows is running on, let's say like this: Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System)); Can i then determine its Win32_DiskDrive SerialNumber? I cannot find a way to link them. That is the manufacturer's S/N not the VolumeSerialNumber. Thanks in advance 回答1: You can use ManagmentObjectSearch combined with