oledb32/tests: Simplify IMalloc handling.
This commit is contained in:
parent
3804423f8c
commit
51a4fce54d
@ -1,5 +1,5 @@
|
|||||||
TESTDLL = oledb32.dll
|
TESTDLL = oledb32.dll
|
||||||
IMPORTS = uuid shell32 oleaut32 ole32 user32 gdi32 advapi32
|
IMPORTS = uuid oleaut32 ole32 user32 gdi32 advapi32
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
convert.c \
|
convert.c \
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
#include "msdadc.h"
|
#include "msdadc.h"
|
||||||
#include "msdasc.h"
|
#include "msdasc.h"
|
||||||
#include "shlobj.h"
|
|
||||||
#include "msdaguid.h"
|
#include "msdaguid.h"
|
||||||
#include "initguid.h"
|
#include "initguid.h"
|
||||||
#include "oledberr.h"
|
#include "oledberr.h"
|
||||||
@ -56,14 +55,6 @@ static void test_GetDataSource(WCHAR *initstring)
|
|||||||
if(SUCCEEDED(hr))
|
if(SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
IDBProperties *props = NULL;
|
IDBProperties *props = NULL;
|
||||||
IMalloc *ppM = NULL;
|
|
||||||
|
|
||||||
hr = SHGetMalloc(&ppM);
|
|
||||||
if (FAILED(hr))
|
|
||||||
{
|
|
||||||
ok(0, "Couldn't get IMalloc object.\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = IDBInitialize_QueryInterface(dbinit, &IID_IDBProperties, (void**)&props);
|
hr = IDBInitialize_QueryInterface(dbinit, &IID_IDBProperties, (void**)&props);
|
||||||
ok(hr == S_OK, "got %08x\n", hr);
|
ok(hr == S_OK, "got %08x\n", hr);
|
||||||
@ -84,15 +75,12 @@ static void test_GetDataSource(WCHAR *initstring)
|
|||||||
pInfoset->rgPropertyInfos[i].vtType);
|
pInfoset->rgPropertyInfos[i].vtType);
|
||||||
}
|
}
|
||||||
|
|
||||||
IMalloc_Free(ppM, ary);
|
CoTaskMemFree(ary);
|
||||||
}
|
}
|
||||||
|
|
||||||
IDBProperties_Release(props);
|
IDBProperties_Release(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
IMalloc_Release(ppM);
|
|
||||||
|
|
||||||
end:
|
|
||||||
IDBInitialize_Release(dbinit);
|
IDBInitialize_Release(dbinit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user