protect DirectDrawCreateEx with seh no more crash

svn path=/trunk/; revision=26965
This commit is contained in:
Magnus Olsen 2007-06-02 13:26:33 +00:00
parent 576e0fdc97
commit c5832b0f71

View file

@ -12,6 +12,9 @@
#include "rosdraw.h"
/* PSEH for SEH Support */
#include <pseh/pseh.h>
CRITICAL_SECTION ddcs;
// This function is exported by the dll
@ -55,12 +58,15 @@ DirectDrawCreateEx(LPGUID lpGUID,
REFIID id,
LPUNKNOWN pUnkOuter)
{
HRESULT retVal = DDERR_GENERIC;
/*
remove this when UML digram are in place
this api is finish and is working as it should
*/
DX_WINDBG_trace();
_SEH_TRY
{
/* check see if pUnkOuter is null or not */
if (pUnkOuter)
{
@ -74,8 +80,16 @@ DirectDrawCreateEx(LPGUID lpGUID,
return DDERR_INVALIDPARAMS;
}
retVal = Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, id, TRUE);
/* Create our DirectDraw interface */
return Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, id, TRUE);
}
_SEH_HANDLE
{
}
_SEH_END;
return retVal;
}
/*