/*1* Default entry point for a 16-bit exe2*3* Copyright 2009 Alexandre Julliard4*5* This library is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public7* License as published by the Free Software Foundation; either8* version 2.1 of the License, or (at your option) any later version.9*10* This library is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* Lesser General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public16* License along with this library; if not, write to the Free Software17* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA18*/1920#ifdef __i386__2122#include <stdarg.h>23#include "windef.h"24#include "winbase.h"25#include "wownt32.h"26#include "wine/winbase16.h"2728extern WORD WINAPI WinMain16( HINSTANCE16 inst, HINSTANCE16 prev, LPSTR cmdline, WORD show );2930void WINAPI __wine_spec_exe16_entry( CONTEXT *context )31{32PDB16 *psp;33WORD len;34LPSTR cmdline;3536InitTask16( context );3738psp = MapSL( WOWGlobalLock16( context->SegEs ));39len = psp->cmdLine[0];40cmdline = HeapAlloc( GetProcessHeap(), 0, len + 1 );41memcpy( cmdline, psp->cmdLine + 1, len );42cmdline[len] = 0;4344ExitThread( WinMain16( context->Edi, context->Esi, cmdline, context->Edx ));45}4647#endif /* __i386__ */484950