Removed calls to ConvertToGlobalHandle and MakeCriticalSectionGlobal.
This commit is contained in:
parent
f9087e2bfa
commit
7bbba4f9ce
|
@ -816,6 +816,7 @@ int DEBUG_main(int argc, char** argv)
|
||||||
BOOL ret = DEBUG_Attach(pid, TRUE);
|
BOOL ret = DEBUG_Attach(pid, TRUE);
|
||||||
|
|
||||||
SetEvent(hEvent);
|
SetEvent(hEvent);
|
||||||
|
CloseHandle(hEvent);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
DEBUG_Printf(DBG_CHN_ERR, "Can't attach process %ld: %ld\n",
|
DEBUG_Printf(DBG_CHN_ERR, "Can't attach process %ld: %ld\n",
|
||||||
DEBUG_CurrPid, GetLastError());
|
DEBUG_CurrPid, GetLastError());
|
||||||
|
|
|
@ -611,7 +611,6 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
|
||||||
newDevice->ref = 1;
|
newDevice->ref = 1;
|
||||||
ICOM_VTBL(newDevice) = &SysMouseAvt;
|
ICOM_VTBL(newDevice) = &SysMouseAvt;
|
||||||
InitializeCriticalSection(&(newDevice->crit));
|
InitializeCriticalSection(&(newDevice->crit));
|
||||||
MakeCriticalSectionGlobal(&(newDevice->crit));
|
|
||||||
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
|
memcpy(&(newDevice->guid),rguid,sizeof(*rguid));
|
||||||
*pdev=(IDirectInputDeviceA*)newDevice;
|
*pdev=(IDirectInputDeviceA*)newDevice;
|
||||||
|
|
||||||
|
|
|
@ -1137,7 +1137,7 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
|
||||||
LPHANDLE lphRead )
|
LPHANDLE lphRead )
|
||||||
{
|
{
|
||||||
/* These are the handles for the created process */
|
/* These are the handles for the created process */
|
||||||
HANDLE hAppStart, hAppDeath, hAppRead, hTemp;
|
HANDLE hAppStart, hAppDeath, hAppRead;
|
||||||
SECURITY_ATTRIBUTES s_attrib;
|
SECURITY_ATTRIBUTES s_attrib;
|
||||||
|
|
||||||
s_attrib.nLength = sizeof( s_attrib );
|
s_attrib.nLength = sizeof( s_attrib );
|
||||||
|
@ -1145,14 +1145,9 @@ BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess,
|
||||||
s_attrib.bInheritHandle = TRUE;
|
s_attrib.bInheritHandle = TRUE;
|
||||||
|
|
||||||
/* FIXME: Is there a handle leak here? */
|
/* FIXME: Is there a handle leak here? */
|
||||||
hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
|
*lphStart = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
|
||||||
*lphStart = ConvertToGlobalHandle( hTemp );
|
*lphDeath = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
|
||||||
|
*lphRead = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
|
||||||
hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
|
|
||||||
*lphDeath = ConvertToGlobalHandle( hTemp );
|
|
||||||
|
|
||||||
hTemp = CreateEventA( &s_attrib, TRUE, FALSE, NULL );
|
|
||||||
*lphRead = ConvertToGlobalHandle( hTemp );
|
|
||||||
|
|
||||||
if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart,
|
if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart,
|
||||||
hDestProcess, &hAppStart,
|
hDestProcess, &hAppStart,
|
||||||
|
|
|
@ -328,10 +328,7 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cmdline,
|
||||||
/* Create scheduler event for 16-bit tasks */
|
/* Create scheduler event for 16-bit tasks */
|
||||||
|
|
||||||
if ( !(pTask->flags & TDBF_WIN32) )
|
if ( !(pTask->flags & TDBF_WIN32) )
|
||||||
{
|
|
||||||
pTask->hEvent = CreateEventA( NULL, TRUE, FALSE, NULL );
|
pTask->hEvent = CreateEventA( NULL, TRUE, FALSE, NULL );
|
||||||
pTask->hEvent = ConvertToGlobalHandle( pTask->hEvent );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Enter task handle into thread and process */
|
/* Enter task handle into thread and process */
|
||||||
|
|
||||||
|
|
|
@ -137,9 +137,14 @@ DWORD WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS epointers)
|
||||||
HANDLE hEvent;
|
HANDLE hEvent;
|
||||||
PROCESS_INFORMATION info;
|
PROCESS_INFORMATION info;
|
||||||
STARTUPINFOA startup;
|
STARTUPINFOA startup;
|
||||||
|
SECURITY_ATTRIBUTES attr;
|
||||||
|
|
||||||
|
attr.nLength = sizeof(attr);
|
||||||
|
attr.lpSecurityDescriptor = NULL;
|
||||||
|
attr.bInheritHandle = TRUE;
|
||||||
|
|
||||||
TRACE("Starting debugger (fmt=%s)\n", format);
|
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);
|
sprintf(buffer, format, GetCurrentProcessId(), hEvent);
|
||||||
memset(&startup, 0, sizeof(startup));
|
memset(&startup, 0, sizeof(startup));
|
||||||
startup.cb = sizeof(startup);
|
startup.cb = sizeof(startup);
|
||||||
|
|
Loading…
Reference in New Issue