Partager via


DetectBootSector function

Validates the correctness of the volume boot sector and provides data that is used to access the internal on-disk structures of the file system.

Note

FMAPI can only be used in the Windows Preinstallation Environment (WinPE) for Windows Vista, Windows Server 2008, and later. Applications that use FMAPI must license WinPE.

Syntax

BOOL WINAPI DetectBootSector(
  _In_  CONST UCHAR*      BootSector,
  _Out_ PBOOT_SECTOR_INFO BootSectorParams
);

Parameters

BootSector [in]

A pointer to the first 512 bytes of the boot sector. The size of this buffer should always be 512 bytes, even if the sector size of the drive is not 512 bytes.

BootSectorParams [out]

A pointer to a BOOT_SECTOR_INFO structure that receives the boot sector information if a boot sector is detected.

Return value

If a boot sector is detected, the return value is nonzero.

If a boot sector is not detected, the return value is zero.

Remarks

This function has no associated header file or import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to fmapi.dll.

The DetectBootSector function supports FAT and NTFS file systems.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
DLL
Fmapi.dll

See also

BOOT_SECTOR_INFO