CreateFile function.