Mike Hearn wrote:
On Tue, 2005-01-04 at 12:21 -0600, Robert Shearman wrote:
I believe the function does everything that is required of it - the only problem is that we don't currently do anything with the state. I'm not sure if we should though.HRESULT WINAPI CoGetState(IUnknown ** ppv) { - APARTMENT * apt = COM_CurrentInfo(); + HRESULT hr = E_FAIL;
- FIXME("\n"); + FIXME("possible stub\n");
Do we actually have any docs on this function? I agree the "possible
stub" fixme is annoying though so I'll remove it.
No. All I know is that native oleaut32 uses it for some purpose.
This should be moved into the TLS struct, not removed entirely.
inits has been subsumed into the refcount, each CoInitialize adds a ref.
Why is it still needed?
Because inits should be thread-local, not apartment scoped. NtCurrentTeb()->ReservedForOle should be set to NULL when the matching CoUninitialize is called, not when the apartment is destroyed.
Here's the updated patch.
Mike Hearn <[EMAIL PROTECTED]>
- Make apartment access thread-safe by introducing refcounting and wider
usage of the apartment lock
- Rework OLE TLS management to eliminate uninitialised apartments and
parent chaining
Rob
