View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015137FPCRTLpublic2009-11-18 21:582011-05-01 21:19
ReporterChristian Grau 
Assigned ToMarco van de Voort 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWin32OSAll Windows OSOS Version
Product Version2.2.4Product Build[2009/04/10] for i386 
Target VersionFixed in Version2.4.2 
Summary0015137: Wrong PARTITION_INFORMATION record definition in struct.ini
DescriptionC:\FPC\2.2.4\fpcsrc\rtl\win\wininc\struct.inc:
     PARTITION_INFORMATION = record
          PartitionType : BYTE;
          BootIndicator : BOOLEAN;
          RecognizedPartition : BOOLEAN;
          RewritePartition : BOOLEAN;
          StartingOffset : LARGE_INTEGER;
          PartitionLength : LARGE_INTEGER;
          HiddenSectors : LARGE_INTEGER;
       end;
THIS STRUC IS TOTALLY DEPRECATED!!!
Steps To ReproduceTake a look at
http://msdn.microsoft.com/en-us/library/aa365451%28VS.85%29.aspx [^]

or the original C definition from Windows SDKs. Right is:

  PARTITION_INFORMATION = record
      StartingOffset : LARGE_INTEGER;
      PartitionLength : LARGE_INTEGER;
      HiddenSectors : DWORD;
      PartitionNumber : DWORD;
      PartitionType : BYTE;
      BootIndicator : BOOLEAN;
      RecognizedPartition : BOOLEAN;
      RewritePartition : BOOLEAN;
  end;
Additional InformationBest regards, Christian Grau!
TagsNo tags attached.
FPCOldBugId0
Fixed in Revision14698
Attached Files

- Relationships

-  Notes
(0032283)
Christian Grau (reporter)
2009-11-18 22:53

This is the proper with DeviceIOControl (Control code IOCTL_DISK_GET_PARTITION_INFO) working structure:

ATTENTION: The booleans in this struct are BYTE !

 PPARTITION_INFORMATION = ^PARTITION_INFORMATION;
  {$EXTERNALSYM PPARTITION_INFORMATION}
  _PARTITION_INFORMATION = record
    StartingOffset: LARGE_INTEGER;
    PartitionLength: LARGE_INTEGER;
    HiddenSectors: DWORD;
    PartitionNumber: DWORD;
    PartitionType: BYTE;
    BootIndicator: ByteBool;
    RecognizedPartition: ByteBool;
    RewritePartition: ByteBool;
  end;
(0032291)
Marco van de Voort (manager)
2009-11-19 12:51

Converted a handfull types from winioctl.h

If more is needed I expect a proper patch :-)

- Issue History
Date Modified Username Field Change
2009-11-18 21:58 Christian Grau New Issue
2009-11-18 22:53 Christian Grau Note Added: 0032283
2009-11-19 12:51 Marco van de Voort Fixed in Revision => 14216
2009-11-19 12:51 Marco van de Voort Status new => resolved
2009-11-19 12:51 Marco van de Voort Resolution open => fixed
2009-11-19 12:51 Marco van de Voort Assigned To => Marco van de Voort
2009-11-19 12:51 Marco van de Voort Note Added: 0032291
2009-11-19 12:51 Marco van de Voort Target Version => 2.5.1
2010-11-13 20:21 Jonas Maebe FPCOldBugId => 0
2010-11-13 20:21 Jonas Maebe Fixed in Version => 2.5.1
2010-11-13 20:21 Jonas Maebe Target Version 2.5.1 =>
2010-11-13 20:21 Jonas Maebe Fixed in Revision 14216 => 14698
2010-11-13 20:21 Jonas Maebe Fixed in Version 2.5.1 => 2.4.2
2011-05-01 21:19 Marco van de Voort Status resolved => closed



MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker