coisane: Keep track of window handles and check memory pointers