private bool Open(string file, uint Prio, uint Flags) { void * h; void **hp = &h; bool r = StormDll.SFileOpenArchive(file, Prio, Flags, hp); handle = h; return(r); }
public ulong GetSize() { uint high; uint *phigh = &high; uint low = StormDll.SFileGetFileSize(handle, phigh); //if (low == 0xffffffff) // return 0; return(low); }
public bool Close() { bool r = StormDll.SFileCloseFile(handle); if (r) { handle = null; } return(r); }
private bool Open(string file, uint Prio, uint Flags) { void * h; void **hp = &h; bool r = StormDll.SFileOpenArchive(file, Prio, Flags, hp); handle = h; logger.WriteLine("Open " + file + " = " + r); return(r); }
public File OpenFile(string szFileName, uint dwSearchScope) { void * h; void **hp = &h; bool r = StormDll.SFileOpenFileEx(handle, szFileName, dwSearchScope, hp); if (!r) { return(null); } return(new File(this, h)); }
public bool ExtractFile(string from, string to) { bool r = StormDll.SFileExtractFile(handle, from, to); return(r); }
public bool HasFile(string name) { bool r = StormDll.SFileHasFile(handle, name); return(r); }
/* * [DllImport("user32.dll")] * public static extern int MessageBoxA(int h, * [MarshalAs(UnmanagedType.LPStr)]string m, * [MarshalAs(UnmanagedType.LPStr)]string c, * int type); * */ public static uint GetLocale() { return(StormDll.SFileGetLocale()); }