GithubHelp home page GithubHelp logo

libwindevblk's People

Contributors

vricosti avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mezstd

libwindevblk's Issues

Wrong PartitionCount output in windevblk_test.exe

Environment

  • Windows 10 LTSC 21H2 64bit on VirtualBox
  • Microsoft Visual Studio Community 2019 Version 16.11.16
  • 3 Disks attached

Problem

Drive 2 (\.\PhysicalDrive2) is a newly initialized disk, which doesn't contain any partition at all, but the test exe reports that disk has 4 partitions.

Disk list

PS C:\Users\Administrator> get-disk

Number Friendly Name Serial Number                    HealthStatus         OperationalStatus      Total Size Partition
                                                                                                             Style
------ ------------- -------------                    ------------         -----------------      ---------- ----------
0      VBOX HARDDISK VB0fd0b492-e16ac651              Healthy              Online                      50 GB GPT
1      VBOX HARDDISK VB5d6967dd-87d0fa5b              Healthy              Online                      25 GB RAW
2      VBOX HARDDISK VB4dd4fce2-2c11a706              Healthy              Online                      15 GB MBR

PS C:\Users\Administrator> get-partition -DiskNumber 2
Get-Partition : No MSFT_Partition objects found with property 'DiskNumber' equal to '2'. Verify the value of the property and retry.
At line:1 char:1
+ get-partition -DiskNumber 2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (2:UInt32) [Get-Partition], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_DiskNumber,Get-Partition

Windevblk_test.exe output

Drive 0:
   SerialNumber: VB0fd0b492-e16ac651
   ModelNumber: VBOX HARDDISK
   VendorId:
   ProductRevision: 1.0
   DevicePath: \\?\scsi#disk&ven_vbox&prod_harddisk#4&2617aeae&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
   ShortDevicePath: \\.\PhysicalDrive0
   canBePartitioned: 1
   PartitionStyle: 1
   PartitionCount: 4
   Gpt.DiskId: {FF508A7C-71A2-4268-9F4C-CEB9AACE6D68}
   Gpt.StartingUsableOffset: 17408
   Gpt.UsableLength: 53687056896
   Gpt.MaxPartitionCount: 128
   *Partition 0 (PosixPath = /dev/sda):
      PartitionLength: 53687091200
      StartingOffset: 0
      EndingOffset: 53687091200
      szFileSystemName:
      szRootPathName:
      szVolumeName:
      szVolumePathName:
   *Partition 1 (PosixPath = /dev/sda1):
      PartitionLength: 104857600
      StartingOffset: 1048576
      EndingOffset: 105906176
      Gpt.PartitionType: {C12A7328-F81F-11D2-BA4B-00A0C93EC93B}
      Gpt.PartitionId: {D297DA11-75C0-4D9A-A08B-EA426FF98DB1}
      szFileSystemName: FAT32
      szRootPathName: \\?\Volume{d297da11-75c0-4d9a-a08b-ea426ff98db1}\
      szVolumeName:
      szVolumePathName:
   *Partition 2 (PosixPath = /dev/sda2):
      PartitionLength: 16777216
      StartingOffset: 105906176
      EndingOffset: 122683392
      Gpt.PartitionType: {E3C9E316-0B5C-4DB8-817D-F92DF00215AE}
      Gpt.PartitionId: {F4E82308-4691-4E74-BE49-44B8205D063B}
      szFileSystemName:
      szRootPathName:
      szVolumeName:
      szVolumePathName:
   *Partition 3 (PosixPath = /dev/sda3):
      PartitionLength: 52963463168
      StartingOffset: 122683392
      EndingOffset: 53086146560
      Gpt.PartitionType: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
      Gpt.PartitionId: {B6472378-6D6F-4934-9D97-5796A8B39145}
      szFileSystemName: NTFS
      szRootPathName: \\?\Volume{b6472378-6d6f-4934-9d97-5796a8b39145}\
      szVolumeName:
      szVolumePathName: C:\
   *Partition 4 (PosixPath = /dev/sda4):
      PartitionLength: 598736896
      StartingOffset: 53086257152
      EndingOffset: 53684994048
      Gpt.PartitionType: {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}
      Gpt.PartitionId: {62D027E5-5D0A-4AE1-8797-7254990BC06D}
      szFileSystemName: NTFS
      szRootPathName: \\?\Volume{62d027e5-5d0a-4ae1-8797-7254990bc06d}\
      szVolumeName:
      szVolumePathName:
Drive 1:
   SerialNumber: VB5d6967dd-87d0fa5b
   ModelNumber: VBOX HARDDISK
   VendorId:
   ProductRevision: 1.0
   DevicePath: \\?\scsi#disk&ven_vbox&prod_harddisk#4&2617aeae&0&020000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
   ShortDevicePath: \\.\PhysicalDrive1
   canBePartitioned: 1
   PartitionStyle: 0
   PartitionCount: 0
   Mbr.CheckSum: 0x0
   Mbr.Signature: 0x0
   *Partition 0 (PosixPath = /dev/sdb):
      PartitionLength: 26843545600
      StartingOffset: 0
      EndingOffset: 26843545600
      szFileSystemName:
      szRootPathName:
      szVolumeName:
      szVolumePathName:
Drive 2:
   SerialNumber: VB4dd4fce2-2c11a706
   ModelNumber: VBOX HARDDISK
   VendorId:
   ProductRevision: 1.0
   DevicePath: \\?\scsi#disk&ven_vbox&prod_harddisk#4&2617aeae&0&030000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
   ShortDevicePath: \\.\PhysicalDrive2
   canBePartitioned: 1
   PartitionStyle: 0
   PartitionCount: 4
   Mbr.CheckSum: 0xcdd8e482
   Mbr.Signature: 0x87d21b7e
   *Partition 0 (PosixPath = /dev/sdc):
      PartitionLength: 16106127360
      StartingOffset: 0
      EndingOffset: 16106127360
      szFileSystemName:
      szRootPathName:
      szVolumeName:
      szVolumePathName:

Press a key to exit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.