- Remove ASSERT && add param checks

svn path=/trunk/; revision=44075
This commit is contained in:
Johannes Anderwald 2009-11-10 10:04:33 +00:00
parent dcb1336203
commit c3eaa577c4
3 changed files with 12 additions and 3 deletions

View file

@ -86,6 +86,9 @@ IClassFactory_fnCreateInstance(
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
if (!ppvObject)
return E_INVALIDARG;
*ppvObject = NULL;
if ( This->riidInst==NULL || IsEqualCLSID(riid, This->riidInst) || IsEqualCLSID(riid, &IID_IUnknown) )

View file

@ -442,6 +442,13 @@ NewDirectSound(
LPOLESTR pStr;
LPCDirectSoundImpl This;
/* check param */
if (!ppvObject)
{
/* invalid param */
return E_INVALIDARG;
}
/* check requested interface */
if (!IsEqualIID(riid, &IID_IUnknown) && !IsEqualIID(riid, &IID_IDirectSound) && !IsEqualIID(riid, &IID_IDirectSound8))
{

View file

@ -124,8 +124,7 @@ WINAPI
DllGetClassObject(
REFCLSID rclsid,
REFIID riid,
LPVOID* ppv
)
LPVOID* ppv)
{
LPOLESTR pStr, pStr2;
UINT i;
@ -153,7 +152,7 @@ DllGetClassObject(
DPRINT("No Class Available for %ws IID %ws\n", pStr, pStr2);
CoTaskMemFree(pStr);
CoTaskMemFree(pStr2);
ASSERT(0);
//ASSERT(0);
return CLASS_E_CLASSNOTAVAILABLE;
}