FileSystem.FileOpen(11, Application.StartupPath + @"\Welcome.zxm", OpenMode.Random, OpenAccess.Default, OpenShare.Default, -1); FileSystem.FileGet(11, ref strAllow, (long)1, false);
FileSystem.FileClose(11);
FreezerStuff.WinWidth = 640;
FreezerStuff.WinHeight = 480;FileOpen 和 FileGet 在C#中有对应的函数吗?
FileSystem.FileClose(11);
FreezerStuff.WinWidth = 640;
FreezerStuff.WinHeight = 480;FileOpen 和 FileGet 在C#中有对应的函数吗?
int FileNumber,
string FileName,
OpenMode Mode,
[OptionalAttribute] OpenAccess Access,
[OptionalAttribute] OpenShare Share,
[OptionalAttribute] int RecordLength
)public static void FileGet (
int FileNumber,
ref bool Value,
[OptionalAttribute] long RecordNumber
)
FileInfo fi = new FileInfo("temp.txt"); // Open the file just specified such that no one else can use it.
FileStream fs = fi.Open( FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None ); // Create another reference to the same file.
FileInfo nextfi = new FileInfo("temp.txt"); try
{
// Try opening the same file, which was locked by the previous process.
nextfi.Open( FileMode.OpenOrCreate, FileAccess.Read ); Console.WriteLine("The file was not locked, and was opened by a second process.");
}
catch (IOException)
{
Console.WriteLine("The file could not be opened because it was locked by another process.");
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
} // Close the file so it can be deleted.
fs.Close();
Microsoft.VisualBasic.FileSystem.FileGet(...