Mike Hearn mike@theoretic.com writes:
- working_mem = GlobalAlloc(0, size);
- assert( working_mem != NULL );
- hr = CreateStreamOnHGlobal(working_mem, FALSE, &working);
- assert( hr == S_OK );
- hr = CoMarshalInterface(working, &IID_IDispatch, (IUnknown*)V_DISPATCH(pvar), LOWORD(*pFlags), NULL, MSHLFLAGS_NORMAL);
- assert( hr == S_OK );
Please don't use assert for error checking. Errors should be either handled properly or propagated to the caller.