This topic has not yet been rated - Rate this topic

HalExamineMBR routine

The HalExamineMBR routine reads the master boot record (MBR) of a disk and returns data from the MBR if the MBR is of the type specified by the caller.

Syntax


VOID HalExamineMBR(
  _In_   PDEVICE_OBJECT DeviceObject,
  _In_   ULONG SectorSize,
  _In_   ULONG MBRTypeIdentifier,
  _Out_  PVOID *Buffer
);

Parameters

DeviceObject [in]

Pointer to the device object for the device being examined.

SectorSize [in]

Specifies the minimum number of bytes that an I/O operation can fetch from the device being examined. If this value is less than 512, HalExamineMBR reads 512 bytes to ensure that it reads an entire partition table.

MBRTypeIdentifier [in]

Specifies the type of MBR that may be on the disk.

Buffer [out]

Pointer to a buffer that returns data from the MBR. The layout of the buffer depends on the MBRTypeIdentifier. The caller must deallocate this buffer as soon as possible with ExFreePool. This routine returns NULL in Buffer if the MBRTypeIdentifier of the disk does not match that specified by the caller or if there is an error.

Return value

None

Requirements

Version

Available in Windows XP and later versions of Windows.

Header

Ntddk.h (include Ntddk.h)

Library

Contained in Ntoskrnl.lib.

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

ExFreePool

 

 

Send comments about this topic to Microsoft

Build date: 5/2/2013

© 2013 Microsoft. All rights reserved.