Removed calls to ConvertToGlobalHandle and MakeCriticalSectionGlobal.

This commit is contained in:
Alexandre Julliard 2000-08-26 21:18:36 +00:00
parent f9087e2bfa
commit 7bbba4f9ce
5 changed files with 12 additions and 15 deletions

View file

@ -816,6 +816,7 @@ int DEBUG_main(int argc, char** argv)
BOOL ret = DEBUG_Attach(pid, TRUE);
SetEvent(hEvent);
CloseHandle(hEvent);
if (!ret) {
DEBUG_Printf(DBG_CHN_ERR, "Can't attach process %ld: %ld\n",
DEBUG_CurrPid, GetLastError());

View file

@ -611,7 +611,6 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
newDevice->ref = 1;
ICOM_VTBL(newDevice) = &SysMouseAvt;
InitializeCriticalSection(&(newDevice->crit));
MakeCriticalSectionGlobal(&(newDevice->crit));
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
*pdev=(IDirectInputDeviceA*)newDevice;

View file

@ -1137,7 +1137,7 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
LPHANDLE lphRead )
{
/* These are the handles for the created process */
HANDLE hAppStart, hAppDeath, hAppRead, hTemp;
HANDLE hAppStart, hAppDeath, hAppRead;
SECURITY_ATTRIBUTES s_attrib;
s_attrib.nLength = sizeof( s_attrib );
@ -1145,14 +1145,9 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
s_attrib.bInheritHandle = TRUE;
/* FIXME: Is there a handle leak here? */
hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
*lphStart = ConvertToGlobalHandle( hTemp );
hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
*lphDeath = ConvertToGlobalHandle( hTemp );
hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
*lphRead = ConvertToGlobalHandle( hTemp );
*lphStart = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
*lphDeath = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
*lphRead = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart,
hDestProcess, &hAppStart,

View file

@ -328,13 +328,10 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cmdline,
/* Create scheduler event for 16-bit tasks */
if ( !(pTask->flags & TDBF_WIN32) )
{
pTask->hEvent = CreateEventA( NULL, TRUE, FALSE, NULL );
pTask->hEvent = ConvertToGlobalHandle( pTask->hEvent );
}
/* Enter task handle into thread and process */
teb->htask16 = hTask;
if (!initial_task) initial_task = hTask;

View file

@ -137,9 +137,14 @@ DWORD WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS epointers)
HANDLE hEvent;
PROCESS_INFORMATION info;
STARTUPINFOA startup;
SECURITY_ATTRIBUTES attr;
attr.nLength = sizeof(attr);
attr.lpSecurityDescriptor = NULL;
attr.bInheritHandle = TRUE;
TRACE("Starting debugger (fmt=%s)\n", format);
hEvent = ConvertToGlobalHandle(CreateEventA(NULL, FALSE, FALSE, NULL));
hEvent = CreateEventA(&attr, FALSE, FALSE, NULL);
sprintf(buffer, format, GetCurrentProcessId(), hEvent);
memset(&startup, 0, sizeof(startup));
startup.cb = sizeof(startup);