Pass CreateProcess() SECURITY_ATTRIBUTES through to PROCESS_Create().

This commit is contained in:
Ulrich Weigand 1999-03-16 16:29:26 +00:00 committed by Alexandre Julliard
parent 4526f2ec66
commit 892627b12b
7 changed files with 32 additions and 22 deletions

View File

@ -40,8 +40,9 @@ extern LPDOSTASK MZ_AllocDPMITask( HMODULE16 hModule );
extern void MZ_Tick( WORD handle );
extern BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
extern BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info );
extern int DOSVM_Enter( PCONTEXT context );
extern void DOSVM_SetTimer( unsigned ticks );

View File

@ -167,8 +167,9 @@ extern FARPROC16 NE_GetEntryPointEx( HMODULE16 hModule, WORD ordinal, BOOL16 sno
extern BOOL16 NE_SetEntryPoint( HMODULE16 hModule, WORD ordinal, WORD offset );
extern HANDLE NE_OpenFile( NE_MODULE *pModule );
extern HINSTANCE16 NE_LoadModule( LPCSTR name, BOOL implicit );
extern BOOL NE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
extern BOOL NE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info );
/* loader/ne/resource.c */

View File

@ -36,8 +36,9 @@ extern HGLOBAL PE_LoadResource(struct _wine_modref *wm,HRSRC);
extern HMODULE PE_LoadImage( HFILE hFile, OFSTRUCT *ofs, LPCSTR *modName );
extern struct _wine_modref *PE_CreateModule( HMODULE hModule, OFSTRUCT *ofs,
DWORD flags, BOOL builtin );
extern BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
extern BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info );
struct _THDB; /* forward definition */

View File

@ -415,8 +415,9 @@ BOOL MZ_InitTask( LPDOSTASK lpDosTask )
return TRUE;
}
BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info )
{
LPDOSTASK lpDosTask = NULL; /* keep gcc from complaining */
@ -463,7 +464,8 @@ BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline,
SetLastError(ERROR_GEN_FAILURE);
return FALSE;
}
if (!PROCESS_Create( pModule, cmdline, env, 0, 0, inherit, startup, info ))
if (!PROCESS_Create( pModule, cmdline, env, 0, 0,
psa, tsa, inherit, startup, info ))
return FALSE;
}
return TRUE;
@ -491,8 +493,9 @@ void MZ_KillModule( LPDOSTASK lpDosTask )
#else /* !MZ_SUPPORTED */
BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info )
{
WARN(module,"DOS executables not supported on this architecture\n");

View File

@ -847,10 +847,6 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
/* Warn if unsupported features are used */
if (lpProcessAttributes)
FIXME(module, "(%s,...): lpProcessAttributes ignored\n", name);
if (lpThreadAttributes)
FIXME(module, "(%s,...): lpThreadAttributes ignored\n", name);
if (dwCreationFlags & DEBUG_PROCESS)
FIXME(module, "(%s,...): DEBUG_PROCESS ignored\n", name);
if (dwCreationFlags & DEBUG_ONLY_THIS_PROCESS)
@ -922,6 +918,7 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
lstrcpynA( ofs.szPathName, name, sizeof( ofs.szPathName ) );
retv = NE_CreateProcess( HFILE_ERROR, &ofs, cmdline, lpEnvironment,
lpProcessAttributes, lpThreadAttributes,
bInheritHandles, lpStartupInfo, lpProcessInfo );
/* Load file and create process */
@ -956,16 +953,19 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
{
case SCS_32BIT_BINARY:
retv = PE_CreateProcess( hFile, &ofs, cmdline, lpEnvironment,
lpProcessAttributes, lpThreadAttributes,
bInheritHandles, lpStartupInfo, lpProcessInfo );
break;
case SCS_DOS_BINARY:
retv = MZ_CreateProcess( hFile, &ofs, cmdline, lpEnvironment,
lpProcessAttributes, lpThreadAttributes,
bInheritHandles, lpStartupInfo, lpProcessInfo );
break;
case SCS_WOW_BINARY:
retv = NE_CreateProcess( hFile, &ofs, cmdline, lpEnvironment,
lpProcessAttributes, lpThreadAttributes,
bInheritHandles, lpStartupInfo, lpProcessInfo );
break;

View File

@ -914,7 +914,8 @@ HINSTANCE16 WINAPI LoadModule16( LPCSTR name, LPVOID paramBlock )
}
pdb = PROCESS_Create( pModule, new_cmd_line, env,
hInstance, hPrevInstance, TRUE, &startup, &info );
hInstance, hPrevInstance,
NULL, NULL, TRUE, &startup, &info );
CloseHandle( info.hThread );
CloseHandle( info.hProcess );
@ -932,8 +933,9 @@ HINSTANCE16 WINAPI LoadModule16( LPCSTR name, LPVOID paramBlock )
/**********************************************************************
* NE_CreateProcess
*/
BOOL NE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
BOOL NE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info )
{
HINSTANCE16 hInstance, hPrevInstance = 0;
@ -1004,7 +1006,8 @@ BOOL NE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line,
pModule->flags |= NE_FFLAGS_GUI; /* FIXME: is this necessary? */
if ( !PROCESS_Create( pModule, cmd_line, env,
hInstance, hPrevInstance, inherit, startup, info ) )
hInstance, hPrevInstance,
psa, tsa, inherit, startup, info ) )
return FALSE;
return TRUE;

View File

@ -879,8 +879,9 @@ HMODULE PE_LoadLibraryExA (LPCSTR name,
* FIXME: this function should use PE_LoadLibraryExA, but currently can't
* due to the PROCESS_Create stuff.
*/
BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line,
LPCSTR env, BOOL inherit, LPSTARTUPINFOA startup,
BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line, LPCSTR env,
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
BOOL inherit, LPSTARTUPINFOA startup,
LPPROCESS_INFORMATION info )
{
LPCSTR modName = NULL;
@ -914,7 +915,7 @@ BOOL PE_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmd_line,
/* Create new process */
if ( !PROCESS_Create( pModule, cmd_line, env,
0, 0, inherit, startup, info ) )
0, 0, psa, tsa, inherit, startup, info ) )
return FALSE;
/* Note: PE_CreateModule and the remaining process initialization will