本文整理汇总了C++中EFI_PXE_BASE_CODE_PROTOCOL::SetParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ EFI_PXE_BASE_CODE_PROTOCOL::SetParameters方法的具体用法?C++ EFI_PXE_BASE_CODE_PROTOCOL::SetParameters怎么用?C++ EFI_PXE_BASE_CODE_PROTOCOL::SetParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EFI_PXE_BASE_CODE_PROTOCOL
的用法示例。
在下文中一共展示了EFI_PXE_BASE_CODE_PROTOCOL::SetParameters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CopyMem
/**
Install PxeBaseCodeCallbackProtocol if not installed before.
@param[in, out] Private Pointer to PxeBc private data.
@param[out] NewMakeCallback If TRUE, it is a new callback.
Otherwise, it is not new callback.
@retval EFI_SUCCESS PxeBaseCodeCallbackProtocol installed succesfully.
@retval Others Failed to install PxeBaseCodeCallbackProtocol.
**/
EFI_STATUS
PxeBcInstallCallback (
IN OUT PXEBC_PRIVATE_DATA *Private,
OUT BOOLEAN *NewMakeCallback
)
{
EFI_PXE_BASE_CODE_PROTOCOL *PxeBc;
EFI_STATUS Status;
//
// Check whether PxeBaseCodeCallbackProtocol already installed.
//
PxeBc = &Private->PxeBc;
Status = gBS->HandleProtocol (
Private->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
(VOID **) &Private->PxeBcCallback
);
if (Status == EFI_UNSUPPORTED) {
CopyMem (
&Private->LoadFileCallback,
&gPxeBcCallBackTemplate,
sizeof (EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL)
);
//
// Install a default callback if user didn't offer one.
//
Status = gBS->InstallProtocolInterface (
&Private->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
EFI_NATIVE_INTERFACE,
&Private->LoadFileCallback
);
(*NewMakeCallback) = (BOOLEAN) (Status == EFI_SUCCESS);
Status = PxeBc->SetParameters (PxeBc, NULL, NULL, NULL, NULL, NewMakeCallback);
if (EFI_ERROR (Status)) {
PxeBc->Stop (PxeBc);
return Status;
}
}
return EFI_SUCCESS;
}
示例2:
/**
Uninstall PxeBaseCodeCallbackProtocol.
@param[in] Private Pointer to PxeBc private data.
@param[in] NewMakeCallback If TRUE, it is a new callback.
Otherwise, it is not new callback.
**/
VOID
PxeBcUninstallCallback (
IN PXEBC_PRIVATE_DATA *Private,
IN BOOLEAN NewMakeCallback
)
{
EFI_PXE_BASE_CODE_PROTOCOL *PxeBc;
PxeBc = &Private->PxeBc;
if (NewMakeCallback) {
NewMakeCallback = FALSE;
PxeBc->SetParameters (PxeBc, NULL, NULL, NULL, NULL, &NewMakeCallback);
gBS->UninstallProtocolInterface (
Private->Controller,
&gEfiPxeBaseCodeCallbackProtocolGuid,
&Private->LoadFileCallback
);
}
}