Added ExitKernel16 (replacing USER_ExitWindows), ExitProcess16, and

MapProcessHandle; stub for BUNNY_351.
This commit is contained in:
Ulrich Weigand 1999-05-22 16:18:36 +00:00 committed by Alexandre Julliard
parent 733145f726
commit c319c669fb
7 changed files with 42 additions and 26 deletions

View File

@ -6,7 +6,7 @@ file krnl386.exe
# present in win31, win95 and nt351
1 stub FatalExit
2 stub ExitKernel
2 pascal16 ExitKernel() ExitKernel16
3 pascal GetVersion() GetVersion16
4 pascal16 LocalInit(word word word) LocalInit16
5 register LocalAlloc(word word) WIN16_LocalAlloc
@ -289,7 +289,7 @@ file krnl386.exe
348 pascal16 hmemcpy(ptr ptr long) hmemcpy16
349 pascal _hread(word segptr long) WIN16_hread
350 pascal _hwrite(word ptr long) _hwrite16
351 stub BUNNY_351
351 return BUNNY_351 0 0
352 pascal lstrcatn(segstr str word) lstrcatn16
353 pascal lstrcpyn(segptr str word) lstrcpyn16
354 pascal GetAppCompatFlags(word) GetAppCompatFlags16
@ -370,7 +370,7 @@ file krnl386.exe
463 pascal SetThreadQueue(long word) SetThreadQueue16
464 pascal GetThreadQueue(long) GetThreadQueue16
465 stub NukeProcess
466 stub ExitProcess
466 pascal16 ExitProcess(word) ExitProcess16
467 stub WOACreateConsole
468 stub WOASpawnConApp
469 stub WOAGimmeTitle
@ -387,7 +387,7 @@ file krnl386.exe
480 pascal16 _EnterWin16Lock() SYSLEVEL_EnterWin16Lock
481 pascal16 _LeaveWin16Lock() SYSLEVEL_LeaveWin16Lock
482 pascal LoadSystemLibrary32(str) LoadLibrary32_16 # FIXME!
483 stub MapProcessHandle
483 pascal MapProcessHandle(long) MapProcessHandle
484 pascal SetProcessDWORD(long s_word long) SetProcessDword
485 pascal GetProcessDWORD(long s_word) GetProcessDword
486 pascal FreeLibrary32(long) FreeLibrary

View File

@ -38,7 +38,6 @@ typedef struct tagUSER_DRIVER {
extern USER_DRIVER *USER_Driver;
void USER_ExitWindows(void);
WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
DWORD dwFlags, HMODULE16 hModule );

View File

@ -112,6 +112,7 @@ BOOL16 WINAPI CreateDirectory16(LPCSTR,LPVOID);
BOOL16 WINAPI DefineHandleTable16(WORD);
ATOM WINAPI DeleteAtom16(ATOM);
BOOL16 WINAPI DeleteFile16(LPCSTR);
void WINAPI ExitKernel16(void);
void WINAPI FatalAppExit16(UINT16,LPCSTR);
ATOM WINAPI FindAtom16(SEGPTR);
BOOL16 WINAPI FindClose16(HANDLE16);

View File

@ -315,3 +315,21 @@ HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] )
return wm->module;
}
/***********************************************************************
* ExitKernel16 (KERNEL.2)
*
* Clean-up everything and exit the Wine process.
*
*/
void WINAPI ExitKernel16( void )
{
/* Do the clean-up stuff */
WriteOutProfiles16();
SHELL_SaveRegistry();
SERVICE_Exit();
exit(0);
}

View File

@ -583,8 +583,7 @@ void TASK_KillTask( HTASK16 hTask )
if (nTaskCount <= 1)
{
TRACE_(task)("this is the last task, exiting\n" );
SERVICE_Exit();
USER_ExitWindows();
ExitKernel16();
}
/* FIXME: Hack! Send a message to the initial task so that

View File

@ -673,6 +673,14 @@ void WINAPI ExitProcess( DWORD status )
TerminateProcess( GetCurrentProcess(), status );
}
/***********************************************************************
* ExitProcess16 (KERNEL.466)
*/
void WINAPI ExitProcess16( WORD status )
{
SYSLEVEL_ReleaseWin16Lock();
ExitProcess( status );
}
/******************************************************************************
* TerminateProcess (KERNEL32.684)
@ -831,6 +839,15 @@ HANDLE WINAPI OpenProcess( DWORD access, BOOL inherit, DWORD id )
return reply.handle;
}
/*********************************************************************
* MapProcessHandle (KERNEL.483)
*/
DWORD WINAPI MapProcessHandle( HANDLE handle )
{
struct get_process_info_reply reply;
if ( !PROCESS_QueryInfo( handle, &reply ) ) return 0;
return (DWORD)reply.pid;
}
/***********************************************************************
* GetCurrentProcessId (KERNEL32.199)

View File

@ -181,24 +181,6 @@ static void USER_AppExit( HINSTANCE16 hInstance )
}
/***********************************************************************
* USER_ExitWindows
*
* Clean-up everything and exit the Wine process.
* This is the back-end of ExitWindows(), called when all windows
* have agreed to be terminated.
*/
void USER_ExitWindows(void)
{
/* Do the clean-up stuff */
WriteOutProfiles16();
SHELL_SaveRegistry();
exit(0);
}
/***********************************************************************
* USER_SignalProc (USER.314)
*/
@ -329,7 +311,7 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
}
WIN_ReleaseWinArray(list);
if (result) USER_ExitWindows();
if (result) ExitKernel16();
WIN_ReleaseDesktop();
return FALSE;
}