Actually EDK2 has provision for sending ARGC, ARGV to main function using
LIBC and SHELLPKG for applications. Refer
https://svn.code.sf.net/p/edk2/code/trunk/edk2/AppPkg/Applications/Main/ ,
you would find sample code(main.c) and Main.inf.

Krishna.


On Thu, Nov 28, 2013 at 5:36 PM, s.v.krishna reddy <svkr...@gmail.com>wrote:

> ENTRYPOINT must of below type
> EFI_STATUS
> EFIAPI
> _ModuleEntryPoint (
>   IN EFI_HANDLE        ImageHandle,
>   IN EFI_SYSTEM_TABLE  *SystemTable
>   )
>
> If you want to share some data to application, you can share through
> environment variable. You can use run time service RT-> GetVaraiable to
> retrieve it.
>
> Krishna.
>
>
> On Thu, Nov 28, 2013 at 5:24 PM, Nishit Patira <nishitpat...@gmail.com>wrote:
>
>> Hi,
>>
>> I am writing the code in my uefi application file (gigo.c). The code
>> starts with
>>
>> int main (int argc, char **argv)
>> {
>>     UINT64  PhyAddress = 0;
>>     FILE    *infile;
>> .
>> .
>> .
>> .
>>
>>
>> Now, what should I write in my .inf file for ENTRY_POINT.
>> This is my [defines] section
>> INF_VERSION          = 0x00010015
>> BASE_NAME            = gigo
>> FILE_GUID            = ECEE8016-615E-452c-A7E5-F773E7421F91
>> MODULE_TYPE          = UEFI_APPLICATION
>> ENTRY_POINT          = main
>>
>> It gives the following error,
>> error C2371: 'main' : redefinition; different basic types
>>
>>
>> Help me out!!!
>>
>>
>> Regards,
>> Nishit H Patira
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to