private void Init() { // This function initializes the WinFileIO object and reads in a file to be used for testing and verification. String DataPath; ByteBuf = new byte[BufSize]; ByteBufVer = new byte[BufSize]; WFIO = new WinFileIO(ByteBuf); DataPath = Application.StartupPath; int n = DataPath.LastIndexOf("bin\\"); DataPath = DataPath.Substring(0, n); DataPath += "data\\"; if (!Directory.Exists(DataPath)) { String S = "GetDataPath: data Folder can't be found. Should have been created on install."; DispUIMsg(S); DataPath = ""; } // Read the test file into the verification buffer. TestFileName = DataPath + "All Customers Orders Order Details.txt"; FileStream FSFile = new FileStream(TestFileName, FileMode.Open, FileAccess.Read, FileShare.None, BlockSize, FileOptions.SequentialScan); VerBytesRead = FSFile.Read(ByteBufVer, 0, BufSize); FSFile.Close(); FSFile.Dispose(); TestFileName2 = DataPath + "TestWriteFile.txt"; }