Basic windows logic. Need to move to wstring version of the functions.