HRESULT hr = Ole32.INSTANCE.CoCreateInstance(guid, null, // pOuter =
// null, no
// aggregation
WTypes.CLSCTX_LOCAL_SERVER, riid, pDispatch);
assertTrue(W32Errors.SUCCEEDED(hr.intValue()));
assertTrue(!pDispatch.equals(Pointer.NULL));
// We leak this iUnknown reference because we don't have the JNACOM lib
// here to wrap the native iUnknown pointer and call iUnknown.release()
if (W32Errors.SUCCEEDED(hrCI.intValue()))
Ole32.INSTANCE.CoUninitialize();