Changed the read function to allow WIN32 to build.