122 if (BcdOption->DataOffset)
125 Size = BcdOption->DataOffset + BcdOption->DataSize;
130 Size =
sizeof(*BcdOption);
134 Offset = BcdOption->ListOffset;
195 Status = RtlULongAdd(StringLength, 1, &StringLength);
199 Status = RtlULongMult(StringLength,
sizeof(
WCHAR), &StringLength);
331 ULONG DeviceSize, ListOffset, ListSize;
395 if (BlpBootOptionCallbacks)
397 DeviceCallback = BlpBootOptionCallbacks->Device;
400 Status = DeviceCallback(BlpBootOptionCallbackCookie,
412 SecureListData = ListCopy;
429 if (SecureListData != ListCopy)
608 *CopiedOptions =
NULL;
644 Option->
Type = OptionId;
676 Option->
Type = OptionId;
724 Option->
Type = OptionId;
742 ULONG OptionsSize, CurrentSize;
748 CurrentOptions = AppEntry->BcdData;
776 }
while (CurrentOffset);
792 AppEntry->BcdData = NewOptions;
795 AppEntry->Flags &= ~BL_APPLICATION_ENTRY_BCD_OPTIONS_EXTERNAL;
852 AppEntry->BcdData =
NULL;
869 AppEntry->BcdData = NewOptions;
struct _BCD_DEVICE_OPTION * PBCD_DEVICE_OPTION
#define BCD_TYPE_INTEGER_LIST
#define BCD_TYPE_OBJECT_LIST
NTSTATUS BlGetBootOptionBoolean(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBOOLEAN Value)
NTSTATUS BlGetBootOptionGuidList(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PGUID *Value, _In_ PULONG Count)
NTSTATUS BlGetBootOptionDevice(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBL_DEVICE_DESCRIPTOR *Value, _In_opt_ PBL_BCD_OPTION *ExtraOptions)
ULONG BlGetBootOptionSize(_In_ PBL_BCD_OPTION BcdOption)
NTSTATUS BlReplaceBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ PBL_BCD_OPTION OldOptions)
NTSTATUS BlAppendBootOptionInteger(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ ULONGLONG Value)
NTSTATUS BlGetBootOptionGuid(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PGUID Value)
NTSTATUS BlAppendBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ PBL_BCD_OPTION Options)
VOID BlRemoveBootOption(_In_ PBL_BCD_OPTION List, _In_ ULONG Type)
NTSTATUS BlCopyBootOptions(_In_ PBL_BCD_OPTION OptionList, _Out_ PBL_BCD_OPTION *CopiedOptions)
NTSTATUS BlAppendBootOptionString(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ PWCHAR OptionString)
NTSTATUS BlpGetBootOptionIntegerList(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG *Value, _Out_ PULONGLONG Count, _In_ BOOLEAN NoCopy)
NTSTATUS BlGetBootOptionString(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PWCHAR *Value)
PBL_BCD_OPTION MiscGetBootOption(_In_ PBL_BCD_OPTION List, _In_ ULONG Type)
NTSTATUS BlAppendBootOptionBoolean(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ BOOLEAN Value)
NTSTATUS BlGetBootOptionInteger(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG Value)
ULONG BlGetBootOptionListSize(_In_ PBL_BCD_OPTION BcdOption)
struct _BL_BCD_OPTION * PBL_BCD_OPTION
PVOID BlMmAllocateHeap(_In_ SIZE_T Size)
PGUID BlGetApplicationIdentifier(VOID)
#define BL_APPLICATION_ENTRY_BCD_OPTIONS_INTERNAL
NTSTATUS BlMmFreeHeap(_In_ PVOID Buffer)
#define BL_APPLICATION_ENTRY_BCD_OPTIONS_EXTERNAL
#define NT_SUCCESS(StatCode)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static char * NextOption(const char *const ostr)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
_In_ ULONG _In_ ULONG Offset
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
const KSDEVICE_DESCRIPTOR DeviceDescriptor
BL_DEVICE_DESCRIPTOR DeviceDescriptor
static PCWSTR OptionList[]
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_ WDFCMRESLIST List