2009/6/23 Hans Leidekker hans@codeweavers.com:
@@ -228,6 +232,7 @@ static void COM_TlsDestroy(void) if (info->errorinfo) IErrorInfo_Release(info->errorinfo); if (info->state) IUnknown_Release(info->state); if (info->spy) IUnknown_Release(info->spy);
- if (info->context_token) IUnknown_Release((IUnknown *)info->context_token);
HeapFree(GetProcessHeap(), 0, info); NtCurrentTeb()->ReservedForOle = NULL; }
Why not change the type of info->context_token to be IObjContext* or IUnknown* instead of ULONG_PTR? It shouldn't change the memory layout of the oletls structure and it will eliminate the need of these types of casts.