Commit ffcced0f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/tests: Handle context generation failure better.

parent eb19c391
......@@ -192,7 +192,13 @@ static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie)
actctx.lpSource = path;
handle = pCreateActCtxW(&actctx);
ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
ok(handle != INVALID_HANDLE_VALUE || broken(handle == INVALID_HANDLE_VALUE) /* some old XP/2k3 versions */,
"handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
if (handle == INVALID_HANDLE_VALUE)
{
win_skip("activation context generation failed, some tests will be skipped\n");
handle = NULL;
}
ok(actctx.cbSize == sizeof(ACTCTXW), "actctx.cbSize=%d\n", actctx.cbSize);
ok(actctx.dwFlags == 0, "actctx.dwFlags=%d\n", actctx.dwFlags);
......@@ -206,8 +212,11 @@ static HANDLE activate_context(const char *manifest, ULONG_PTR *cookie)
DeleteFileA("file.manifest");
ret = pActivateActCtx(handle, cookie);
ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
if (handle)
{
ret = pActivateActCtx(handle, cookie);
ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
}
return handle;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment