我在写UEFI APP时,想要调用gEfiShellProtocol的getEnv和setEnv的成员函数,
但是发现gEfiShellProtocol一直为NULL,请问这个要怎么解决?
if (gEfiShellProtocol == NULL) {
//
// Search for the shell protocol
//
Status = gBS->LocateProtocol (
&gEfiShellProtocolGuid,
NULL,
(VOID **)&gEfiShellProtocol
);
if (EFI_ERROR (Status)) {
gEfiShellProtocol = NULL;
}
}