Additional modifications for AUT-1565 - return value and strcopy for non-windows