MessageQueueWin, refactoring