示例#1
0
 public static extern bool SFileGetFileInfo(
     MpqArchiveSafeHandle hMpqOrFile,
     SFileInfoClass InfoClass,
     IntPtr pvFileInfo,
     uint cbFileInfoSize,
     out uint pcbLengthNeeded
     );
示例#2
0
 public static extern int SFileEnumLocales(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     IntPtr plcLocales,
     ref uint pdwMaxLocales,
     uint dwSearchScope
     );
示例#3
0
 public static extern bool SFileAddWave(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szArchivedName,
     uint dwFlags,
     uint dwQuality
     );
示例#4
0
 public static extern bool SFileAddFileEx(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szArchivedName,
     uint dwFlags,
     uint dwCompression,
     uint dwCompressionNext
     );
示例#5
0
 public static extern bool SFileCreateFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szArchiveName,
     ulong fileTime,
     uint dwFileSize,
     uint lcLocale,
     uint dwFlags,
     out IntPtr phFile
     );
示例#6
0
 public static extern uint SFileVerifyArchive(MpqArchiveSafeHandle hMpq);
示例#7
0
 public static extern bool SFileHasFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
示例#8
0
 public static extern bool SFileOpenPatchArchive(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szPatchMpqName,
     [MarshalAs(UnmanagedType.LPStr)] string szPatchPathPrefix,
     uint dwFlags
     );
示例#9
0
 public static extern bool SFileSetMaxFileCount(MpqArchiveSafeHandle hMpq, uint dwMaxFileCount);
示例#10
0
 public static extern int SFileAddListFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile
     );
示例#11
0
 public static extern bool SFileSetAddFileCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_ADDFILE_CALLBACK AddFileCB,
     IntPtr pvUserData
     );
示例#12
0
 public static extern bool SFileAddWave(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szArchivedName,
     uint dwFlags,
     uint dwQuality
     );
示例#13
0
 public static extern IntPtr SListFileFindFirstFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile,
     [MarshalAs(UnmanagedType.LPStr)] string szMask,
     [In, Out] ref _SFILE_FIND_DATA lpFindFileData
     );
示例#14
0
 public static extern uint SFileVerifyArchive(MpqArchiveSafeHandle hMpq);
示例#15
0
 public static extern int SFileVerifyRawData(
     MpqArchiveSafeHandle hMpq,
     uint dwWhatToVerify,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
示例#16
0
 public static extern uint SFileVerifyFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwFlags
     );
示例#17
0
 public static extern bool SFileGetFileChecksums(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     out uint pdwCrc32,
     IntPtr pMD5
     );
示例#18
0
 public static extern bool SFileExtractFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szToExtract,
     [MarshalAs(UnmanagedType.LPTStr)] string szExtracted,
     uint dwSearchScope
     );
示例#19
0
 public static extern bool SFileOpenArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwPriority,
     SFileOpenArchiveFlags dwFlags,
     out MpqArchiveSafeHandle phMpq
     );
示例#20
0
 public static extern bool SFileCreateArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwCreateFlags,
     uint dwMaxFileCount,
     out MpqArchiveSafeHandle phMpq
     );
示例#21
0
 public static extern bool SFileCreateFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szArchiveName,
     ulong fileTime,
     uint dwFileSize,
     uint lcLocale,
     uint dwFlags,
     out IntPtr phFile
     );
示例#22
0
 public static extern bool SFileCreateArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwCreateFlags,
     uint dwMaxFileCount,
     out MpqArchiveSafeHandle phMpq
     );
示例#23
0
 public static extern bool SFileRenameFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szOldFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szNewFileName
     );
示例#24
0
 public static extern bool SFileIsPatchedArchive(MpqArchiveSafeHandle hMpq);
示例#25
0
 public static extern bool SFileFlushArchive(MpqArchiveSafeHandle hMpq);
示例#26
0
 public static extern bool SFileGetFileInfo(
     MpqArchiveSafeHandle hMpqOrFile,
     SFileInfoClass InfoClass,
     IntPtr pvFileInfo,
     uint cbFileInfoSize,
     out uint pcbLengthNeeded
     );
示例#27
0
 public static extern bool SFileCompactArchive(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile,
     bool bReserved
     );
示例#28
0
 public static extern bool SFileExtractFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szToExtract,
     [MarshalAs(UnmanagedType.LPTStr)] string szExtracted,
     uint dwSearchScope
     );
示例#29
0
 public static extern bool SFileSetAttributes(MpqArchiveSafeHandle hMpq, uint dwFlags);
示例#30
0
 public static extern uint SFileVerifyFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwFlags
     );
示例#31
0
 public static extern bool SFileOpenFileEx(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope,
     out MpqFileSafeHandle phFile
     );
示例#32
0
 public static extern bool SFileOpenFileEx(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope,
     out MpqFileSafeHandle phFile
     );
示例#33
0
 public static extern bool SFileOpenArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwPriority,
     SFileOpenArchiveFlags dwFlags,
     out MpqArchiveSafeHandle phMpq
     );
示例#34
0
 public static extern bool SFileRemoveFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope
     );
示例#35
0
 public static extern bool SFileGetFileChecksums(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     out uint pdwCrc32,
     IntPtr pMD5
     );
示例#36
0
 public static extern bool SFileRenameFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szOldFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szNewFileName
     );
示例#37
0
 public static extern int SFileVerifyRawData(
     MpqArchiveSafeHandle hMpq,
     uint dwWhatToVerify,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
示例#38
0
 public static extern bool SFileCreateArchive2(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     ref SFILE_CREATE_MPQ pCreateInfo,
     out MpqArchiveSafeHandle phMpq
     );
示例#39
0
 public static extern IntPtr SListFileFindFirstFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile,
     [MarshalAs(UnmanagedType.LPStr)] string szMask,
     [In, Out] ref _SFILE_FIND_DATA lpFindFileData
     );
示例#40
0
 public static extern bool SFileSetAddFileCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_ADDFILE_CALLBACK AddFileCB,
     IntPtr pvUserData
     );
示例#41
0
 public static extern int SFileEnumLocales(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     IntPtr plcLocales,
     ref uint pdwMaxLocales,
     uint dwSearchScope
     );
示例#42
0
 public static extern bool SFileSetDownloadCallback(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.FunctionPtr)] SFILE_DOWNLOAD_CALLBACK pfnCallback,
     IntPtr pvUserData
     );
示例#43
0
 public static extern bool SFileAddFileEx(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szArchivedName,
     uint dwFlags,
     uint dwCompression,
     uint dwCompressionNext
     );
示例#44
0
 public static extern bool SFileFlushArchive(MpqArchiveSafeHandle hMpq);
示例#45
0
 public static extern bool SFileRemoveFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope
     );
示例#46
0
 public static extern bool SFileCloseArchive(MpqArchiveSafeHandle hMpq);
示例#47
0
 public static extern bool SFileCreateArchive2(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     ref SFILE_CREATE_MPQ pCreateInfo,
     out MpqArchiveSafeHandle phMpq
     );
示例#48
0
 public static extern int SFileAddListFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile
     );
示例#49
0
 public static extern bool SFileSetDownloadCallback(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.FunctionPtr)] SFILE_DOWNLOAD_CALLBACK pfnCallback,
     IntPtr pvUserData
     );
示例#50
0
 public static extern bool SFileSetCompactCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_COMPACT_CALLBACK compactCB,
     IntPtr pvUserData
     );
示例#51
0
 public static extern bool SFileCloseArchive(MpqArchiveSafeHandle hMpq);
示例#52
0
 public static extern bool SFileCompactArchive(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile,
     bool bReserved
     );
示例#53
0
 public static extern bool SFileSetCompactCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_COMPACT_CALLBACK compactCB,
     IntPtr pvUserData
     );
示例#54
0
 public static extern uint SFileGetMaxFileCount(MpqArchiveSafeHandle hMpq);
示例#55
0
 public static extern uint SFileGetMaxFileCount(MpqArchiveSafeHandle hMpq);
示例#56
0
 public static extern bool SFileSetMaxFileCount(MpqArchiveSafeHandle hMpq, uint dwMaxFileCount);
示例#57
0
 public static extern uint SFileGetAttributes(MpqArchiveSafeHandle hMpq);
示例#58
0
 public static extern bool SFileHasFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
示例#59
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Release owned files first.
                if (_openFiles != null)
                {
                    foreach (var file in _openFiles)
                    {
                        file.Dispose();
                    }

                    _openFiles.Clear();
                    _openFiles = null;
                }

                // Release
                if (_handle != null && !_handle.IsInvalid)
                {
                    _handle.Close();
                    _handle = null;
                }
            }
        }
示例#60
0
 public static extern bool SFileUpdateFileAttributes(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );