Remove the fixme printed if CoGetClassObject fails in
CoCreateInstance, because we already print an error in all cases and
the error more accurately pin-points the source of the problem.
Copy the mode flags into the STATSTG structure in IStorage::Stat. Don't
store the STGM_CREATE flag in openFlags, since it is only relevant when
opening the stream and the tests show that it isn't returned in the
STATSTG structure.
Check the access mode for opening and creating streams and storages
doesn't exceed the access rights the current storage was opened with,
not the parent storage.
Replace a test that fails on NT and with DCOM95 DLLs with a test that
ensures access permissions are checked correctly for sub-storages and
creating streams.
Fix apparent typo in FileMonikerImpl_BindToObject, where ppf was
incorrectly passed into IClassFactory_CreateInstance instead of &ppf
(found by Coverity).
As per MSDN, if the object has no connections then
IOleObject::EnumAdvises should return a NULL enumerator and S_OK. This
is the case when This->oleAdviseHolder is NULL, so do this and avert a
potential NULL dereference of This->oleAdviseHolder (found by
Coverity).
Use ncalrpc instead of ncacn_np as the transport as this is more similar
to how ole32 from NT works and should also be compatible with rpcrt4
from Win9x, allowing more combinations of dlls to work.
Tests with native show that during COM calls posted messages aren't
retrieved other than COM calls so change the PeekMessage parameters in
CoWaitForMultipleHandles to duplicate this.
Put the PeekMessage call of CoWaitForMultipleHandles into a separate
function so that the order and type of the messages retrieved can be
customised in the future.
Stream methods called after parent object has been closed correctly
return STG_E_REVERTED.
Stream refcounting fixed. Now can safely call IStorage destructor
before IStream destructor and guarantee file will be closed.
Change the apartment model field to a boolean that just specifies
whether the apartment is multi-threaded or not and fix up all the
places where this is used.
Fixes a bug where we would return an error if the previous apartment
model passed into CoInitializeEx matches the new apartment model, but
additional optimisation flags are specified.