Exemplo n.º 1
0
 public static extern bool SFileGetFileInfo(
     MpqArchiveSafeHandle hMpqOrFile,
     SFileInfoClass InfoClass,
     IntPtr pvFileInfo,
     uint cbFileInfoSize,
     out uint pcbLengthNeeded
     );
Exemplo n.º 2
0
 public static extern int SFileEnumLocales(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     IntPtr plcLocales,
     ref uint pdwMaxLocales,
     uint dwSearchScope
     );
Exemplo n.º 3
0
 public static extern bool SFileAddWave(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szArchivedName,
     uint dwFlags,
     uint dwQuality
     );
Exemplo n.º 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
     );
Exemplo n.º 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
     );
Exemplo n.º 6
0
 public static extern uint SFileVerifyArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 7
0
 public static extern bool SFileHasFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
Exemplo n.º 8
0
 public static extern bool SFileOpenPatchArchive(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szPatchMpqName,
     [MarshalAs(UnmanagedType.LPStr)] string szPatchPathPrefix,
     uint dwFlags
     );
Exemplo n.º 9
0
 public static extern bool SFileSetMaxFileCount(MpqArchiveSafeHandle hMpq, uint dwMaxFileCount);
Exemplo n.º 10
0
 public static extern int SFileAddListFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile
     );
Exemplo n.º 11
0
 public static extern bool SFileSetAddFileCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_ADDFILE_CALLBACK AddFileCB,
     IntPtr pvUserData
     );
Exemplo n.º 12
0
 public static extern bool SFileAddWave(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPTStr)] string szFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szArchivedName,
     uint dwFlags,
     uint dwQuality
     );
Exemplo n.º 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
     );
Exemplo n.º 14
0
 public static extern uint SFileVerifyArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 15
0
 public static extern int SFileVerifyRawData(
     MpqArchiveSafeHandle hMpq,
     uint dwWhatToVerify,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
Exemplo n.º 16
0
 public static extern uint SFileVerifyFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwFlags
     );
Exemplo n.º 17
0
 public static extern bool SFileGetFileChecksums(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     out uint pdwCrc32,
     IntPtr pMD5
     );
Exemplo n.º 18
0
 public static extern bool SFileExtractFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szToExtract,
     [MarshalAs(UnmanagedType.LPTStr)] string szExtracted,
     uint dwSearchScope
     );
Exemplo n.º 19
0
 public static extern bool SFileOpenArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwPriority,
     SFileOpenArchiveFlags dwFlags,
     out MpqArchiveSafeHandle phMpq
     );
Exemplo n.º 20
0
 public static extern bool SFileCreateArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwCreateFlags,
     uint dwMaxFileCount,
     out MpqArchiveSafeHandle phMpq
     );
Exemplo n.º 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
     );
Exemplo n.º 22
0
 public static extern bool SFileCreateArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwCreateFlags,
     uint dwMaxFileCount,
     out MpqArchiveSafeHandle phMpq
     );
Exemplo n.º 23
0
 public static extern bool SFileRenameFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szOldFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szNewFileName
     );
Exemplo n.º 24
0
 public static extern bool SFileIsPatchedArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 25
0
 public static extern bool SFileFlushArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 26
0
 public static extern bool SFileGetFileInfo(
     MpqArchiveSafeHandle hMpqOrFile,
     SFileInfoClass InfoClass,
     IntPtr pvFileInfo,
     uint cbFileInfoSize,
     out uint pcbLengthNeeded
     );
Exemplo n.º 27
0
 public static extern bool SFileCompactArchive(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile,
     bool bReserved
     );
Exemplo n.º 28
0
 public static extern bool SFileExtractFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szToExtract,
     [MarshalAs(UnmanagedType.LPTStr)] string szExtracted,
     uint dwSearchScope
     );
Exemplo n.º 29
0
 public static extern bool SFileSetAttributes(MpqArchiveSafeHandle hMpq, uint dwFlags);
Exemplo n.º 30
0
 public static extern uint SFileVerifyFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwFlags
     );
Exemplo n.º 31
0
 public static extern bool SFileOpenFileEx(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope,
     out MpqFileSafeHandle phFile
     );
Exemplo n.º 32
0
 public static extern bool SFileOpenFileEx(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope,
     out MpqFileSafeHandle phFile
     );
Exemplo n.º 33
0
 public static extern bool SFileOpenArchive(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     uint dwPriority,
     SFileOpenArchiveFlags dwFlags,
     out MpqArchiveSafeHandle phMpq
     );
Exemplo n.º 34
0
 public static extern bool SFileRemoveFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope
     );
Exemplo n.º 35
0
 public static extern bool SFileGetFileChecksums(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     out uint pdwCrc32,
     IntPtr pMD5
     );
Exemplo n.º 36
0
 public static extern bool SFileRenameFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szOldFileName,
     [MarshalAs(UnmanagedType.LPStr)] string szNewFileName
     );
Exemplo n.º 37
0
 public static extern int SFileVerifyRawData(
     MpqArchiveSafeHandle hMpq,
     uint dwWhatToVerify,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
Exemplo n.º 38
0
 public static extern bool SFileCreateArchive2(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     ref SFILE_CREATE_MPQ pCreateInfo,
     out MpqArchiveSafeHandle phMpq
     );
Exemplo n.º 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
     );
Exemplo n.º 40
0
 public static extern bool SFileSetAddFileCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_ADDFILE_CALLBACK AddFileCB,
     IntPtr pvUserData
     );
Exemplo n.º 41
0
 public static extern int SFileEnumLocales(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     IntPtr plcLocales,
     ref uint pdwMaxLocales,
     uint dwSearchScope
     );
Exemplo n.º 42
0
 public static extern bool SFileSetDownloadCallback(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.FunctionPtr)] SFILE_DOWNLOAD_CALLBACK pfnCallback,
     IntPtr pvUserData
     );
Exemplo n.º 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
     );
Exemplo n.º 44
0
 public static extern bool SFileFlushArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 45
0
 public static extern bool SFileRemoveFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName,
     uint dwSearchScope
     );
Exemplo n.º 46
0
 public static extern bool SFileCloseArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 47
0
 public static extern bool SFileCreateArchive2(
     [MarshalAs(UnmanagedType.LPTStr)] string szMpqName,
     ref SFILE_CREATE_MPQ pCreateInfo,
     out MpqArchiveSafeHandle phMpq
     );
Exemplo n.º 48
0
 public static extern int SFileAddListFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile
     );
Exemplo n.º 49
0
 public static extern bool SFileSetDownloadCallback(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.FunctionPtr)] SFILE_DOWNLOAD_CALLBACK pfnCallback,
     IntPtr pvUserData
     );
Exemplo n.º 50
0
 public static extern bool SFileSetCompactCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_COMPACT_CALLBACK compactCB,
     IntPtr pvUserData
     );
Exemplo n.º 51
0
 public static extern bool SFileCloseArchive(MpqArchiveSafeHandle hMpq);
Exemplo n.º 52
0
 public static extern bool SFileCompactArchive(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szListFile,
     bool bReserved
     );
Exemplo n.º 53
0
 public static extern bool SFileSetCompactCallback(
     MpqArchiveSafeHandle hMpq,
     SFILE_COMPACT_CALLBACK compactCB,
     IntPtr pvUserData
     );
Exemplo n.º 54
0
 public static extern uint SFileGetMaxFileCount(MpqArchiveSafeHandle hMpq);
Exemplo n.º 55
0
 public static extern uint SFileGetMaxFileCount(MpqArchiveSafeHandle hMpq);
Exemplo n.º 56
0
 public static extern bool SFileSetMaxFileCount(MpqArchiveSafeHandle hMpq, uint dwMaxFileCount);
Exemplo n.º 57
0
 public static extern uint SFileGetAttributes(MpqArchiveSafeHandle hMpq);
Exemplo n.º 58
0
 public static extern bool SFileHasFile(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );
Exemplo n.º 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;
                }
            }
        }
Exemplo n.º 60
0
 public static extern bool SFileUpdateFileAttributes(
     MpqArchiveSafeHandle hMpq,
     [MarshalAs(UnmanagedType.LPStr)] string szFileName
     );