private static extern int UnlhaFindNext(IntPtr _harc, ref INDIVIDUALINFO _lpSubInfo);
private string[] InitializeNames() { IntPtr harc = IntPtr.Zero; try { List<string> nameList = new List<string>(); UnlhaSetCursorMode(false); harc = UnlhaOpenArchive(arcFilePath); INDIVIDUALINFO info = new INDIVIDUALINFO(); int result = UnlhaFindFirst(harc, "*", ref info); if (result == 0) { do { nameList.Add(info.szFileName); result = UnlhaFindNext(harc, ref info); } while (result == 0); } return nameList.ToArray(); } catch { return new string[0]; } finally { if (harc != IntPtr.Zero) { try { UnlhaCloseArchive(harc); } catch {} } } }
private static extern int UnlhaFindFirst(IntPtr _harc, string _szWildName, ref INDIVIDUALINFO lpSubInfo);