VOID APIENTRY IntWinStaObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters) { PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)Parameters->Object; TRACE("Deleting window station (0x%X)\n", WinSta); UserEmptyClipboardData(WinSta); RtlDestroyAtomTable(WinSta->AtomTable); RtlFreeUnicodeString(&WinSta->Name); }
/****************************************************************** * get_local_table * * Returns the local atom table for this process (and create it if doesn't * exist yet) */ static RTL_ATOM_TABLE get_local_table(DWORD entries) { static RTL_ATOM_TABLE local_table; if (!local_table) { NTSTATUS status; RTL_ATOM_TABLE table = NULL; if ((status = RtlCreateAtomTable( entries, &table ))) SetLastError( RtlNtStatusToDosError( status ) ); else if (InterlockedCompareExchangePointer((void*)&local_table, table, NULL) != NULL) RtlDestroyAtomTable( table ); } return local_table; }
NTSTATUS APIENTRY IntWinStaObjectDelete( _In_ PVOID Parameters) { PWIN32_DELETEMETHOD_PARAMETERS DeleteParameters = Parameters; PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)DeleteParameters->Object; TRACE("Deleting window station (0x%p)\n", WinSta); WinSta->Flags |= WSS_DYING; UserEmptyClipboardData(WinSta); RtlDestroyAtomTable(WinSta->AtomTable); RtlFreeUnicodeString(&WinSta->Name); return STATUS_SUCCESS; }