コード例 #1
0
ファイル: LhaExtractor.cs プロジェクト: hazychill/oog
 private static extern int UnlhaFindNext(IntPtr _harc, ref INDIVIDUALINFO _lpSubInfo);
コード例 #2
0
ファイル: LhaExtractor.cs プロジェクト: hazychill/oog
        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 {}
            }
              }
        }
コード例 #3
0
ファイル: LhaExtractor.cs プロジェクト: hazychill/oog
 private static extern int UnlhaFindFirst(IntPtr _harc, string _szWildName, ref INDIVIDUALINFO lpSubInfo);