From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7BB3F822B9 for ; Tue, 20 Dec 2016 23:32:20 -0800 (PST) Received: by mail-lf0-x232.google.com with SMTP id t196so92088059lff.3 for ; Tue, 20 Dec 2016 23:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=SbkpGblWeGa09zx+HjCGc2NggguhHv3kQOpfne7c3hg=; b=VqMPA/l9KzcOWaAP7DSNyshphyC1DnnYIPnDmqW922iqfW5oXNvba1D6uWiDyY0Lch H9wR0Zmwfesult1ucxKLbTw0Jjsig4Sa8TMWNpjKz9iJ77ZEpXVDSf4r8JTadyBOaGQl Fz3j0pq8iGMuOCzyWnsevZwlHIfDvSHrWrqG/7ZLeVU+ACpH9GC26GENa2rkOTlD6BJd 51Ynb/Dr23P4pUVN/TAmtvfnDyX3RgxQZZ2BaA879iSJwKZZ8kTncyEmZVhNFRkhQjXr v1ux3Owo0bRvXPubjVsbpnxIBf5BMdhWXQ1kAKb/L550/0nCC8oGs7383598Oy+LUtFo t0cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SbkpGblWeGa09zx+HjCGc2NggguhHv3kQOpfne7c3hg=; b=a6h1XS2DtW4yUJTz7XQY9crpgaoF6xqzuAheZDZJLLtRCmPDSWFudokVEtQjs/LmBd RjoROcouxybM8RYnM9kJpYsAKUgmSArfKsl20DwxrHZEJ+m7UBNvdObxhavXowxwTOVf 2Ej3U8GtiTFklTDvmVAVm8zGoA4iv2mqwu58JfrXLBzaTxZKr3TXQmIMgXVogoY8WZTn zAE9zOT0DKe75wk5qhj4yUv3MQDvNTryU3GIVV9frDB4o4bdrQDINb5Cu0vAch35yqg+ 1gekDTf99oWsG43UkuQkNTpSxVCqflZYwt5KqbT9Vs6er5me8+rv2Sb+vXq783e24G6x lJYw== X-Gm-Message-State: AIkVDXKLA1LCxmzdAUZ6BwTZZ8GGMrA4j45XYasQrRedTz/WmOUcoY4kVfbvVDtebh3jxJuDtzAzdRo87T5SvA== X-Received: by 10.25.211.134 with SMTP id k128mr1201485lfg.118.1482305536915; Tue, 20 Dec 2016 23:32:16 -0800 (PST) MIME-Version: 1.0 From: GN Keshava Date: Wed, 21 Dec 2016 07:32:05 +0000 Message-ID: To: "edk2-devel@lists.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: LocateHandle for gEfiShellProtocolGuid is failing in my application X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2016 07:32:20 -0000 Content-Type: text/plain; charset=UTF-8 Hi, I'm developing a shell application. A call to LocateHandle for gEfiShellProtocolGuid is failing with Status 0x0E. Below is my code. Please let me know what I'm doing wrong. Status = gBS->LocateHandle(ByProtocol, &gEfiShellProtocolGuid, NULL, &BufferSize, Buffer); // Get BufferSize if (EFI_ERROR(Status)) Print(L"LocateHandle Status 0x%x\n",Status); Status = gBS->AllocatePool(EfiBootServicesData, BufferSize, (void**)&Buffer); if (EFI_ERROR(Status)) Print(L"AllocatePool Status 0x%x\n",Status); Status = gBS->LocateHandle(ByProtocol, &gEfiShellProtocolGuid, NULL, &BufferSize, Buffer); if (EFI_ERROR(Status)) Print(L"LocateHandle Status 0x%x\n",Status); All calls failing with Status being 0x0E. Please help me to solve this. Is there any special requirement for using this protocol? Thanks. Regards, Keshava