ole32: Add a test for OleLoad.

This commit is contained in:
Robert Shearman 2006-08-31 17:19:34 +01:00 committed by Alexandre Julliard
parent d0b4717cdb
commit 03510be55b

View file

@ -759,6 +759,37 @@ static void test_OleCreate(IStorage *pStorage)
trace("end\n"); trace("end\n");
} }
static void test_OleLoad(IStorage *pStorage)
{
HRESULT hr;
IOleObject *pObject;
static const char *methods_oleload[] =
{
"OleObject_QueryInterface",
"OleObject_AddRef",
"OleObject_QueryInterface",
"OleObject_AddRef",
"OleObject_GetMiscStatus",
"OleObject_QueryInterface",
"OleObjectPersistStg_AddRef",
"OleObjectPersistStg_Load",
"OleObjectPersistStg_Release",
"OleObject_SetClientSite",
"OleObject_Release",
"OleObject_QueryInterface",
"OleObject_Release",
NULL
};
expected_method_list = methods_oleload;
trace("OleLoad:\n");
hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject);
ok_ole_success(hr, "OleLoad");
IOleObject_Release(pObject);
ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list);
}
START_TEST(ole2) START_TEST(ole2)
{ {
DWORD dwRegister; DWORD dwRegister;
@ -780,6 +811,8 @@ START_TEST(ole2)
ok_ole_success(hr, "IStorage_Stat"); ok_ole_success(hr, "IStorage_Stat");
ok(IsEqualCLSID(&CLSID_Equation3, &statstg.clsid), "Wrong CLSID in storage\n"); ok(IsEqualCLSID(&CLSID_Equation3, &statstg.clsid), "Wrong CLSID in storage\n");
test_OleLoad(pStorage);
IStorage_Release(pStorage); IStorage_Release(pStorage);
hr = CoRevokeClassObject(dwRegister); hr = CoRevokeClassObject(dwRegister);