Juan Lang : rsaenh: Use Interlocked functions for reference counting.