<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=3913599</guid>
        <pubDate>Thu, 21 Nov 2024 17:25:48 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=3913599</link>
        <description><![CDATA[HackerVlad: Вы просили код для упаковки CAB из Cabinet.dll (на VB6). Вот пожалуйста:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Option Explicit</div><div class="code_line">&#39;////////////////////////////////////////////</div><div class="code_line">&#39;// Модуль упаковки CAB-архивов &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</div><div class="code_line">&#39;// Copyright (c) 21.11.2024 by HackerVlad //</div><div class="code_line">&#39;// e-mail: vladislavpeshkov@yandex.ru &nbsp; &nbsp; //</div><div class="code_line">&#39;// Версия 1.2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</div><div class="code_line">&#39;////////////////////////////////////////////</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Декларации API ...</div><div class="code_line">Private Declare Function FCICreate CDecl Lib &quot;cabinet.dll&quot; (perf As TERF, ByVal fnFilePlaced As Long, ByVal fnAlloc As Long, ByVal fnFree As Long, ByVal fnOpen As Long, ByVal fnRead As Long, ByVal fnWrite As Long, ByVal fnClose As Long, ByVal fnSeek As Long, ByVal fnDelete As Long, ByVal fnFciGTF As Long, ByVal ccab As Long, Optional ByVal pv As Long) As Long</div><div class="code_line">Private Declare Function FCIAddFile CDecl Lib &quot;cabinet.dll&quot; (ByVal hfci As Long, ByVal pszSourceFile As Long, ByVal pszFileName As Long, ByVal fExecute As BOOL, ByVal pfnGetNextCabinet As Long, ByVal pfnProgress As Long, ByVal pfnOpenInfo As Long, ByVal typeCompress As Long) As Long</div><div class="code_line">Private Declare Function FCIFlushCabinet CDecl Lib &quot;cabinet.dll&quot; (ByVal hfci As Long, ByVal fGetNextCab As BOOL, ByVal pfnfcignc As Long, ByVal pfnfcis As Long) As BOOL</div><div class="code_line">Private Declare Function FCIDestroy CDecl Lib &quot;cabinet.dll&quot; (ByVal hfci As Long) As BOOL</div><div class="code_line">Private Declare Function SHCreateMemStream Lib &quot;shlwapi.dll&quot; Alias &quot;#12&quot; (ByVal pInit As Long, ByVal cbInit As Long) As Long</div><div class="code_line">Private Declare Function PathStripPathW Lib &quot;shlwapi.dll&quot; (ByVal pszPath As Long) As Long</div><div class="code_line">Private Declare Function PathRemoveFileSpecW Lib &quot;shlwapi.dll&quot; (ByVal pszPath As Long) As Long</div><div class="code_line">Private Declare Sub CopyMemory Lib &quot;kernel32&quot; Alias &quot;RtlMoveMemory&quot; (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long)</div><div class="code_line">Private Declare Function GlobalAlloc Lib &quot;kernel32&quot; (ByVal wFlags As Long, ByVal dwBytes As Long) As Long</div><div class="code_line">Private Declare Function GlobalFree Lib &quot;kernel32&quot; (ByVal hMem As Long) As Long</div><div class="code_line">Private Declare Function CloseHandle Lib &quot;kernel32&quot; (ByVal hObject As Long) As Long</div><div class="code_line">Private Declare Function GetFileAttributes Lib &quot;kernel32&quot; Alias &quot;GetFileAttributesA&quot; (ByVal lpFileName As Long) As Long</div><div class="code_line">Private Declare Function GetFileTime Lib &quot;kernel32&quot; (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long</div><div class="code_line">Private Declare Function FileTimeToLocalFileTime Lib &quot;kernel32&quot; (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long</div><div class="code_line">Private Declare Function FileTimeToDosDateTime Lib &quot;kernel32&quot; (lpFileTime As FILETIME, lpFatDate As Integer, lpFatTime As Integer) As Long</div><div class="code_line">Private Declare Function SetFilePointer Lib &quot;kernel32&quot; (ByVal hFile As Long, ByVal lDistanceToMove As Long, lpDistanceToMoveHigh As Long, ByVal dwMoveMethod As Long) As Long</div><div class="code_line">Private Declare Function ReadFile Lib &quot;kernel32&quot; (ByVal hFile As Long, ByVal lpBuffer As Long, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, ByVal lpOverlapped As Any) As BOOL</div><div class="code_line">Private Declare Function WriteFile Lib &quot;kernel32&quot; (ByVal hFile As Long, ByVal lpBuffer As Long, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Any) As BOOL</div><div class="code_line">Private Declare Function OpenFile Lib &quot;kernel32&quot; (ByVal lpFileName As Long, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long</div><div class="code_line">Private Declare Function CreateFileA Lib &quot;kernel32&quot; (ByVal lpFileName As Long, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long</div><div class="code_line">Private Declare Function CreateFileW Lib &quot;kernel32&quot; (ByVal lpFileName As Long, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long</div><div class="code_line">Private Declare Function GetMem4 Lib &quot;msvbvm60&quot; (ByVal Addr As Long, ByRef dstValue As Long) As Long</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Константы ...</div><div class="code_line">Private Const CB_MAX_DISK_NAME = 256</div><div class="code_line">Private Const CB_MAX_CABINET_NAME = 256</div><div class="code_line">Private Const CB_MAX_CAB_PATH = 256</div><div class="code_line">Private Const OFS_MAXPATHNAME = 128</div><div class="code_line">Private Const GENERIC_READ As Long = &amp;H80000000</div><div class="code_line">Private Const GENERIC_WRITE As Long = &amp;H40000000</div><div class="code_line">Private Const FILE_SHARE_READ = &amp;H1</div><div class="code_line">Private Const OPEN_EXISTING As Long = 3</div><div class="code_line">Private Const FILE_ATTRIBUTE_ARCHIVE = &amp;H20</div><div class="code_line">Private Const FILE_ATTRIBUTE_NORMAL = &amp;H80</div><div class="code_line">Private Const INVALID_HANDLE_VALUE As Long = -1</div><div class="code_line">Private Const CREATE_ALWAYS = 2</div><div class="code_line">Private Const MAX_PATH As Long = 260</div><div class="code_line">Private Const tcompTYPE_MSZIP = &amp;H1&amp;</div><div class="code_line">Private Const tcompTYPE_LZX = &amp;H3&amp; &#39; 0x0003</div><div class="code_line">Private Const tcompLZX_WINDOW_LO = &amp;HF00&amp; &#39; 0x0F00</div><div class="code_line">Private Const tcompLZX_WINDOW_HI = &amp;H1500&amp; &#39; 0x1500</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Типы ...</div><div class="code_line">Private Type TCCAB</div><div class="code_line">&nbsp;&nbsp; &nbsp;cb As Long &#39; size available for cabinet on this media</div><div class="code_line">&nbsp;&nbsp; &nbsp;cbFolderThresh As Long &#39; Thresshold for forcing a new Folder</div><div class="code_line">&nbsp;&nbsp; &nbsp;cbReserveCFHeader As Long &#39; Space to reserve in CFHEADER</div><div class="code_line">&nbsp;&nbsp; &nbsp;cbReserveCFFolder As Long &#39; Space to reserve in CFFOLDER</div><div class="code_line">&nbsp;&nbsp; &nbsp;cbReserveCFData As Long &#39; Space to reserve in CFDATA</div><div class="code_line">&nbsp;&nbsp; &nbsp;iCab As Long &#39; sequential numbers for cabinets</div><div class="code_line">&nbsp;&nbsp; &nbsp;iDisk As Long &#39; Disk number</div><div class="code_line">&nbsp;&nbsp; &nbsp;fFailOnIncompressible As Long &#39; TRUE =&#62; Fail if a block is incompressible</div><div class="code_line">&nbsp;&nbsp; &nbsp;setID As Integer &#39; Cabinet set ID</div><div class="code_line">&nbsp;&nbsp; &nbsp;szDisk(0 To (CB_MAX_DISK_NAME - 1)) As Byte &#39; current disk name</div><div class="code_line">&nbsp;&nbsp; &nbsp;szCab(0 To (CB_MAX_CABINET_NAME - 1)) As Byte &#39; current cabinet name</div><div class="code_line">&nbsp;&nbsp; &nbsp;szCabPath(0 To (CB_MAX_CAB_PATH - 1)) As Byte &#39; path for creating cabinet</div><div class="code_line">End Type</div><div class="code_line">&nbsp;</div><div class="code_line">Private Type TERF</div><div class="code_line">&nbsp;&nbsp; &nbsp;erfOper As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;erfType As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;fError As Byte</div><div class="code_line">End Type</div><div class="code_line">&nbsp;</div><div class="code_line">Private Type OFSTRUCT</div><div class="code_line">&nbsp;&nbsp; &nbsp;cBytes As Byte</div><div class="code_line">&nbsp;&nbsp; &nbsp;fFixedDisk As Byte</div><div class="code_line">&nbsp;&nbsp; &nbsp;nErrCode As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp;Reserved1 As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp;Reserved2 As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp;szPathName(0 To (OFS_MAXPATHNAME - 1)) As Byte</div><div class="code_line">End Type</div><div class="code_line">&nbsp;</div><div class="code_line">Private Type FILETIME</div><div class="code_line">&nbsp;&nbsp;dwLowDateTime As Long</div><div class="code_line">&nbsp;&nbsp;dwHighDateTime As Long</div><div class="code_line">End Type</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Переменные для временного хранения данных ...</div><div class="code_line">Dim fh As Long</div><div class="code_line">Dim fh_cab As Long</div><div class="code_line">Dim cabFileName As String</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Енумы ...</div><div class="code_line">Private Enum BOOL</div><div class="code_line">&nbsp;&nbsp; &nbsp;cFalse</div><div class="code_line">&nbsp;&nbsp; &nbsp;cTrue</div><div class="code_line">End Enum</div><div class="code_line">&nbsp;</div><div class="code_line">Private Enum Stream_Seek</div><div class="code_line">&nbsp;&nbsp; &nbsp;STREAM_SEEK_SET</div><div class="code_line">&nbsp;&nbsp; &nbsp;STREAM_SEEK_CUR</div><div class="code_line">&nbsp;&nbsp; &nbsp;STREAM_SEEK_END</div><div class="code_line">End Enum</div><div class="code_line">&nbsp;</div><div class="code_line">Public Enum cabCompressionMethod</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_MSZIP = tcompTYPE_MSZIP</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX15 = tcompTYPE_LZX Or tcompLZX_WINDOW_LO</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX16 = &amp;H1003&amp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX17 = &amp;H1103&amp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX18 = &amp;H1203&amp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX19 = &amp;H1303&amp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX20 = &amp;H1403&amp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;cm_LZX21 = tcompTYPE_LZX Or tcompLZX_WINDOW_HI</div><div class="code_line">End Enum</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Для совместимости с TwinBasic и VBA7</div><div class="code_line">#If (VBA7 &#60;&#62; 0) Or (TWINBASIC &#60;&#62; 0) Then</div><div class="code_line">&nbsp;&nbsp; &nbsp;Private Declare PtrSafe Function DispCallFunc Lib &quot;oleaut32&quot; (ByVal pvInstance As LongPtr, ByVal oVft As LongPtr, ByVal lCc As Long, ByVal vtReturn As VbVarType, ByVal cActuals As Long, prgVt As Any, prgpVarg As Any, pvargResult As Variant) As Long</div><div class="code_line">#Else</div><div class="code_line">&nbsp;&nbsp; &nbsp;Private Declare Function DispCallFunc Lib &quot;oleaut32&quot; (ByVal pvInstance As LongPtr, ByVal oVft As LongPtr, ByVal lCc As Long, ByVal vtReturn As VbVarType, ByVal cActuals As Long, prgVt As Any, prgpVarg As Any, pvargResult As Variant) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Private Enum LongPtr</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[_]</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Enum</div><div class="code_line">#End If</div><div class="code_line">&nbsp;</div><div class="code_line">Private Function DispCallByVtbl(ByVal pUnk As LongPtr, ByVal lIndex As Long, ParamArray A() As Variant) As Variant</div><div class="code_line">&nbsp;&nbsp; &nbsp;Const CC_STDCALL &nbsp; &nbsp;As Long = 4</div><div class="code_line">#If Win64 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp;Const PTR_SIZE &nbsp; &nbsp; &nbsp;As Long = 8</div><div class="code_line">#Else</div><div class="code_line">&nbsp;&nbsp; &nbsp;Const PTR_SIZE &nbsp; &nbsp; &nbsp;As Long = 4</div><div class="code_line">#End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim lIdx &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim vParam() &nbsp; &nbsp; &nbsp; &nbsp;As Variant</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim vType(0 To 63) &nbsp;As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim vPtr(0 To 63) &nbsp; As LongPtr</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim hResult &nbsp; &nbsp; &nbsp; &nbsp; As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;vParam = A</div><div class="code_line">&nbsp;&nbsp; &nbsp;For lIdx = 0 To UBound(vParam)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;vType(lIdx) = VarType(vParam(lIdx))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;vPtr(lIdx) = VarPtr(vParam(lIdx))</div><div class="code_line">&nbsp;&nbsp; &nbsp;Next</div><div class="code_line">&nbsp;&nbsp; &nbsp;hResult = DispCallFunc(pUnk, lIndex * PTR_SIZE, CC_STDCALL, vbLong, lIdx, vType(0), vPtr(0), DispCallByVtbl)</div><div class="code_line">&nbsp;&nbsp; &nbsp;If hResult &#60; 0 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Err.Raise hResult, &quot;DispCallFunc&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">Private Function IStream_Read(ByVal ptrIStream As Long, ByVal pv As Long, ByVal BytesRead As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim BytesReaded As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;DispCallByVtbl ptrIStream, 3, pv, BytesRead, VarPtr(BytesReaded)</div><div class="code_line">&nbsp;&nbsp; &nbsp;IStream_Read = BytesReaded</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">Private Function IStream_Write(ByVal ptrIStream As Long, ByVal pv As Long, ByVal BytesWrite As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim BytesWritten As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;DispCallByVtbl ptrIStream, 4, pv, BytesWrite, VarPtr(BytesWritten)</div><div class="code_line">&nbsp;&nbsp; &nbsp;IStream_Write = BytesWritten</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">Private Function IStream_Seek(ByVal ptrIStream As Long, ByVal Offset As Currency, ByVal Origin As Stream_Seek) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim NewPosition As Currency</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;DispCallByVtbl ptrIStream, 5, Offset, Origin, VarPtr(NewPosition)</div><div class="code_line">&nbsp;&nbsp; &nbsp;IStream_Seek = NewPosition * 10000@</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">Private Sub IStream_Release(ByVal ptrIStream As Long)</div><div class="code_line">&nbsp;&nbsp; &nbsp;DispCallByVtbl ptrIStream, 2</div><div class="code_line">End Sub</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; +++ FCICreate CallBack&#39;s +++</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 1. Выделение памяти</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnalloc</div><div class="code_line">&#39; Delphi: function fnAlloc(Size: ULONG): Pointer; cdecl;</div><div class="code_line">Private Function fnAlloc CDecl(ByVal lngSize As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnAlloc = GlobalAlloc(0, lngSize)</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 2. Создание временного файла (потока)</div><div class="code_line">&#39; Delphi: function fnFciGTF(pszTempName: PAnsiChar; cbTempName: Integer; pv: Pointer): BOOL; cdecl;</div><div class="code_line">Private Function fnFciGTF CDecl(ByRef pszTempName As Long, ByVal cbTempName As Long, ByVal pv As Long) As BOOL</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; Специальный хак:</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; Обманываем операционную систему, которая будет &quot;думать&quot;, что работает с TMP-файлами на диске</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; Вместо временного файла на диске, мы будем создавать поток IStream в оперативной памяти своего процесса</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim hStream As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;hStream = SHCreateMemStream(0, 0) &#39; Создать новый поток IStream для временного файла</div><div class="code_line">&nbsp;&nbsp; &nbsp;pszTempName = hStream &#39; Здесь мы будем использовать хак: засовываем в переменную String значение Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnFciGTF = 1</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 3. Открытие файла (потока)</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnopen</div><div class="code_line">&#39; Delphi: function fnOpen(pszFile: PAnsiChar; oflag: Integer; pmode: Integer; err: PInteger; pv: Pointer): Integer; cdecl;</div><div class="code_line">Private Function fnOpen CDecl(ByRef pszFile As Long, ByVal oFlag As Long, ByVal pMode As Long, ByRef ErrNo As Long, ByVal pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;If oFlag &#60;&#62; &amp;H8302&amp; Then &#39; Хак</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fnOpen = pszFile</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fh_cab = CreateFileW(StrPtr(cabFileName), GENERIC_WRITE, FILE_SHARE_READ, ByVal 0&amp;, CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE, 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If fh_cab &#60;&#62; INVALID_HANDLE_VALUE Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ErrNo = Err.LastDllError</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fnOpen = fh_cab</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ErrNo = Err.LastDllError</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fnOpen = -1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 4. Чтение данных</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnread</div><div class="code_line">&#39; Delphi: function fnRead(hf: Integer; memory: Pointer; cb: UINT; err: PInteger; pv: Pointer): UINT; cdecl;</div><div class="code_line">Private Function fnRead CDecl(ByVal hf As Long, ByVal hMemory As Long, ByVal cbSize As Long, ByRef ErrNo As Long, ByVal pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim dwBytesRead As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If hf = fh Then &#39; Если открывается на чтение файл, который добавляется в архив</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If ReadFile(fh, hMemory, cbSize, dwBytesRead, ByVal 0&amp;) = cFalse Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ErrNo = Err.LastDllError</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fnRead = -1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else &#39; Если открывается на чтение временный поток IStream</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;dwBytesRead = IStream_Read(hf, hMemory, cbSize)</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnRead = dwBytesRead</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 5. Запись данных</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnwrite</div><div class="code_line">&#39; Delphi: function fnWrite(hf: Integer; memory: Pointer; cb: UINT; err: PInteger; pv: Pointer): UINT; cdecl;</div><div class="code_line">Private Function fnWrite CDecl(ByVal hf As Long, ByVal hMemory As Long, ByVal cbSize As Long, ByRef ErrNo As Long, ByVal pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim dwBytesWritten As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If hf = fh_cab Then &#39; Если открывается на запись файл архива</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If WriteFile(fh_cab, hMemory, cbSize, dwBytesWritten, ByVal 0&amp;) = cFalse Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ErrNo = Err.LastDllError</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fnWrite = -1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else &#39; Если открывается на запись временный поток IStream</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;dwBytesWritten = IStream_Write(hf, hMemory, cbSize)</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnWrite = dwBytesWritten</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 6. Освобождение памяти</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnfree</div><div class="code_line">&#39; Delphi: procedure fnFree(memory: Pointer); cdecl;</div><div class="code_line">Private Sub fnFree CDecl(ByVal lngMemory As Long)</div><div class="code_line">&nbsp;&nbsp; &nbsp;GlobalFree lngMemory</div><div class="code_line">End Sub</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 7. Позиционирование указателя</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnseek</div><div class="code_line">&#39; Delphi: function fnSeek(hf: Integer; dist: Longint; seektype: Integer; err: PInteger; pv: Pointer): Longint; cdecl;</div><div class="code_line">Private Function fnSeek CDecl(ByVal hf As Long, ByVal dist As Long, ByVal seektype As Long, ByRef ErrNo As Long, pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim newPos As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If hf = fh Or hf = fh_cab Then &#39; Если открывается на позиционирование файл, который добавляется в архив, либо сам файл архива</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;newPos = SetFilePointer(hf, dist, ByVal 0&amp;, seektype)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ErrNo = Err.LastDllError</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else &#39; Позиционирование &quot;временного файла&quot; то есть потока</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;newPos = IStream_Seek(hf, dist / 10000@, seektype)</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnSeek = newPos</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 8. Закрытие файла (потока)</div><div class="code_line">&#39; Описание макроса: https://learn.microsoft.com/en-us/windows/win32/api/fdi/nf-fdi-fnclose</div><div class="code_line">&#39; Delphi: function fnClose(hf: Integer; err, pv: Pointer): Integer; cdecl;</div><div class="code_line">Private Function fnClose CDecl(ByVal hf As Long, ErrNo As Long, pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;If hf = fh Or hf = fh_cab Then &#39; Если закрывать нужно файл, который добавляется в архив, либо нужно закрывать сам файл архива</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CloseHandle hf</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnClose = 0</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 9. Удаление временного файла (потока)</div><div class="code_line">&#39; Delphi: function fnDelete(pszFile: PAnsiChar; err: PInteger; pv: Pointer): Integer; cdecl;</div><div class="code_line">Private Function fnDelete CDecl(ByRef pszFile As Long, ErrNo As Long, pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;IStream_Release pszFile</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnDelete = 0</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 10. Вызывается каждый раз при добавлении нового файла в архив</div><div class="code_line">&#39; Delphi: function fnFilePlaced(var ccab: TCCAB; pszFile: PAnsiChar; cbFile: Longint; fContinuation: BOOL; pv: Pointer): THandle; cdecl;</div><div class="code_line">Private Function fnFilePlaced CDecl(ccab As TCCAB, ByVal pszFile As String, ByVal FileSize As Long, ByVal fContinuation As BOOL, ByVal pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; Здесь можно получить полезные данные:</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; 1. FileSize</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; 2. StrConv(ccab.szCabPath, vbUnicode)</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; 3. StrConv(ccab.szCab, vbUnicode)</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnFilePlaced = 0</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; --- FCICreate CallBack&#39;s ---</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; +++ FCIAddFile CallBack&#39;s +++</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 11. Устанавливаем атрибуты файла</div><div class="code_line">&#39; Delphi: function fnOpenInfo(pszName: PAnsiChar; var pDate: WORD; var pTime: WORD; var pAttrib: WORD; err: PInteger; pv: Pointer): Integer; cdecl;</div><div class="code_line">&#39; Syntax C++</div><div class="code_line">&#39; ;; &nbsp; &nbsp;void FNFCIGETOPENINFO(</div><div class="code_line">&#39; ;; &nbsp; &nbsp; &nbsp;[in] &nbsp;LPSTR pszName,</div><div class="code_line">&#39; ;; &nbsp; &nbsp; &nbsp;USHORT *pdate,</div><div class="code_line">&#39; ;; &nbsp; &nbsp; &nbsp;USHORT *ptime,</div><div class="code_line">&#39; ;; &nbsp; &nbsp; &nbsp;USHORT *pattribs,</div><div class="code_line">&#39; ;; &nbsp; &nbsp; &nbsp;int FAR *err,</div><div class="code_line">&#39; ;; &nbsp; &nbsp; &nbsp;void FAR *pv</div><div class="code_line">&#39; ;; &nbsp; &nbsp;);</div><div class="code_line">Private Function fnOpenInfo CDecl(ByVal pszName As String, pDate As Integer, pTime As Integer, pAttribs As Integer, ErrNo As Long, ByVal pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim LocalTime As FILETIME</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim CreationTime As FILETIME</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim LastAccessTime As FILETIME</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim LastWriteTime As FILETIME</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;pAttribs = GetFileAttributes(StrPtr(pszName))</div><div class="code_line">&nbsp;&nbsp; &nbsp;fh = CreateFileA(StrPtr(pszName), GENERIC_READ, FILE_SHARE_READ, ByVal 0&amp;, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If fh &#60;&#62; INVALID_HANDLE_VALUE Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;GetFileTime fh, CreationTime, LastAccessTime, LastWriteTime</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;FileTimeToLocalFileTime LastWriteTime, LocalTime</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;FileTimeToDosDateTime LocalTime, pDate, pTime</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fnOpenInfo = fh</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ErrNo = Err.LastDllError</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fnOpenInfo = -1</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 12. Вызывается на нескольких этапах обработки файла: сжатие блока, добавление сжатого блока и запись архива</div><div class="code_line">&#39; Delphi: function fnStatus(typeStatus: UINT; cb1, cb2: ULONG; pv: Pointer): Longint; cdecl;</div><div class="code_line">Private Function fnStatus CDecl(ByVal typeStatus As Long, ByVal cb1 As Long, ByVal cb2 As Long, ByVal pv As Long) As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnStatus = 0</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; 13. Вызывается перед созданием нового тома архива</div><div class="code_line">&#39; Delphi: function fnGetNextCabinet(var ccab: TCCAB; cbPrevCab: ULONG; pv: Pointer): BOOL; cdecl;</div><div class="code_line">Private Function fnGetNextCabinet CDecl(ccab As TCCAB, ByVal cbPrevCab As Long, ByVal pv As Long) As BOOL</div><div class="code_line">&nbsp;&nbsp; &nbsp;fnGetNextCabinet = 0</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; --- FCIAddFile CallBack&#39;s ---</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Упаковать файлы в архив CAB</div><div class="code_line">&#39; Функция принимает в качестве параметров SourceFullFileNames, DestFileNames строку (если файл один) либо массив строк (список файлов)</div><div class="code_line">&#39; DestFileNames - это необязательный параметр, это путь и имя файла внутри архива CAB</div><div class="code_line">Public Function CabinetAddFiles(ByVal CabinetFullFileName As String, SourceFullFileNames As Variant, Optional DestFileNames As Variant, Optional CompressionMethod As cabCompressionMethod = cm_LZX21) As Boolean</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim ccab As TCCAB</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim erf As TERF</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim fci As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim CabinetDisk As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim CabinetName As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim CabinetPath As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim AnsiSourceFileName As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim AnsiExtractFileName As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim AnsiDestinationFileName As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim AnsiSourceFullFileNames() As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim AnsiDestFileNames() As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim DestFileNamesArrayInitialized As Boolean</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim i As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If Len(CabinetFullFileName) = 0 Then Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If IsArray(SourceFullFileNames) Then &#39; Если это массив</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If CabinetIsArrayInitialized(SourceFullFileNames) = True Then &#39; Если массив инициализирован</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;For i = 0 To UBound(SourceFullFileNames)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiSourceFileName = StrConv(SourceFullFileNames(i), vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If InStrB(1, AnsiSourceFileName, ChrB(&amp;H3F)) &#62; 0 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Cabinet.dll не поддерживает юникодные имена файлов для упаковки</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Копируем массив, только в результатирующем массиве будут имена файлов в кодировке ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CabinetInsertArrayString AnsiSourceFullFileNames, AnsiSourceFileName</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Next</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If VarType(SourceFullFileNames) = vbString Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If SourceFullFileNames &#60;&#62; vbNullString Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiSourceFileName = StrConv(SourceFullFileNames, vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If InStrB(1, AnsiSourceFileName, ChrB(&amp;H3F)) &#62; 0 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Cabinet.dll не поддерживает юникодные имена файлов для упаковки</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CabinetInsertArrayString AnsiSourceFullFileNames, AnsiSourceFileName &#39; В массиве будет только одна строка</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Else &#39; Строка не должна быть пустой</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else &#39; Ошибка типа данных (не массив и не строка)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If IsArray(DestFileNames) Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If CabinetIsArrayInitialized(SourceFullFileNames) = True Then &#39; Если массив инициализирован</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If UBound(SourceFullFileNames) &#60;&#62; UBound(DestFileNames) Then Exit Function &#39; Не совпадают границы массивов</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;For i = 0 To UBound(DestFileNames)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiDestinationFileName = StrConv(DestFileNames(i), vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If InStrB(1, AnsiDestinationFileName, ChrB(&amp;H3F)) &#62; 0 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Cabinet.dll не поддерживает юникодные имена файлов для упаковки</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Копируем массив, только в результатирующем массиве будут имена файлов в кодировке ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CabinetInsertArrayString AnsiDestFileNames, AnsiDestinationFileName</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Next</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DestFileNamesArrayInitialized = True</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If VarType(DestFileNames) = vbString Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If DestFileNames &#60;&#62; vbNullString Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiDestinationFileName = StrConv(DestFileNames, vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If InStrB(1, AnsiDestinationFileName, ChrB(&amp;H3F)) &#62; 0 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39; Cabinet.dll не поддерживает юникодные имена файлов для упаковки</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Function</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CabinetInsertArrayString AnsiDestFileNames, AnsiDestinationFileName &#39; В массиве будет только одна строка</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DestFileNamesArrayInitialized = True</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; Прежде всего нужно взять FullFileName будущего архива и извлечь из него путь к папке и имя файла</div><div class="code_line">&nbsp;&nbsp; &nbsp;CabinetName = StrConv(CabinetExtractFileName(CabinetFullFileName), vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp;CabinetPath = StrConv(CabinetExtractFilePath(CabinetFullFileName), vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#39; Определить значения структуры</div><div class="code_line">&nbsp;&nbsp; &nbsp;ccab.cb = &amp;H7FFFFFFF &nbsp;&#39; The maximum size, in bytes, of a cabinet created by FCI</div><div class="code_line">&nbsp;&nbsp; &nbsp;ccab.iDisk = 1</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;CabinetDisk = StrConv(&quot;DISK1&quot;, vbFromUnicode) &#39; Я не знаю почему, но надо писать &quot;DISK1&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;CopyMemory VarPtr(ccab.setID) + 2, StrPtr(CabinetDisk), LenB(CabinetDisk) &#39; ccab.szDisk = CabinetDisk</div><div class="code_line">&nbsp;&nbsp; &nbsp;CopyMemory VarPtr(ccab.setID) + 2 + 256, StrPtr(CabinetName), LenB(CabinetName) &#39; ccab.szCab = CabinetName</div><div class="code_line">&nbsp;&nbsp; &nbsp;CopyMemory VarPtr(ccab.setID) + 2 + 512, StrPtr(CabinetPath), LenB(CabinetPath) &#39; ccab.szCabPath = CabinetPath</div><div class="code_line">&nbsp;&nbsp; &nbsp;cabFileName = CabinetFullFileName &#39; Запомнить FileName будущего архива</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;fci = FCICreate(erf, AddressOf fnFilePlaced, AddressOf fnAlloc, AddressOf fnFree, AddressOf fnOpen, AddressOf fnRead, AddressOf fnWrite, AddressOf fnClose, AddressOf fnSeek, AddressOf fnDelete, AddressOf fnFciGTF, VarPtr(ccab))</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If fci &#60;&#62; 0 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;For i = 0 To UBound(AnsiSourceFullFileNames)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiSourceFileName = AnsiSourceFullFileNames(i)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If DestFileNamesArrayInitialized = True Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiExtractFileName = AnsiDestFileNames(i)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If IsArray(SourceFullFileNames) Then &#39; Если это массив</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiExtractFileName = StrConv(CabinetExtractFileName(SourceFullFileNames(i)), vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AnsiExtractFileName = StrConv(CabinetExtractFileName(SourceFullFileNames), vbFromUnicode) &#39; Преобразовать в ANSI</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FCIAddFile fci, StrPtr(AnsiSourceFileName), StrPtr(AnsiExtractFileName), 0, AddressOf fnGetNextCabinet, AddressOf fnStatus, AddressOf fnOpenInfo, CompressionMethod</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Next</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If FCIFlushCabinet(fci, cFalse, AddressOf fnGetNextCabinet, AddressOf fnStatus) = cTrue Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CabinetAddFiles = True</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;FCIDestroy fci</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;cabFileName = vbNullString</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Преобразовать полный путь кабинета в имя файла</div><div class="code_line">Public Function CabinetExtractFileName(ByVal FileName As String) As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim lNullPos As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim pszPath As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;pszPath = FileName</div><div class="code_line">&nbsp;&nbsp; &nbsp;PathStripPathW StrPtr(pszPath)</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;lNullPos = InStr(1, pszPath, vbNullChar)</div><div class="code_line">&nbsp;&nbsp; &nbsp;If lNullPos Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CabinetExtractFileName = Left$(pszPath, lNullPos - 1)</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CabinetExtractFileName = FileName</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Преобразовать полный путь кабинета в путь к папке (всегда возвращает на конце &quot;\&quot;)</div><div class="code_line">Public Function CabinetExtractFilePath(ByVal FileName As String) As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim lNullPos As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim pszPath As String</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;pszPath = FileName</div><div class="code_line">&nbsp;&nbsp; &nbsp;PathRemoveFileSpecW StrPtr(pszPath)</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;lNullPos = InStr(1, pszPath, vbNullChar)</div><div class="code_line">&nbsp;&nbsp; &nbsp;If lNullPos Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;pszPath = Left$(pszPath, lNullPos - 1)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If Right$(pszPath, 1) &#60;&#62; &quot;\&quot; Then pszPath = pszPath &amp; &quot;\&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CabinetExtractFilePath = pszPath</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;CabinetExtractFilePath = FileName</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Добавить строку в массив, в не зависимости от того, был ли он инициализирован</div><div class="code_line">Public Sub CabinetInsertArrayString(ByRef strArr() As String, ByVal InsertString As String)</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim NewIndex As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If CabinetIsArrayInitialized(strArr) = False Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ReDim strArr(0)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;strArr(0) = InsertString</div><div class="code_line">&nbsp;&nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;NewIndex = UBound(strArr) + 1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ReDim Preserve strArr(NewIndex)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;strArr(NewIndex) = InsertString</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Sub</div><div class="code_line">&nbsp;</div><div class="code_line">&#39; Инициализирован ли массив</div><div class="code_line">Public Function CabinetIsArrayInitialized(arr) As Boolean</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim saAddress As Long</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;GetMem4 VarPtr(arr) + 8, saAddress</div><div class="code_line">&nbsp;&nbsp; &nbsp;GetMem4 saAddress, saAddress</div><div class="code_line">&nbsp;&nbsp; &nbsp;CabinetIsArrayInitialized = (saAddress &#60;&#62; 0)</div><div class="code_line">&nbsp;&nbsp; &nbsp;If CabinetIsArrayInitialized Then CabinetIsArrayInitialized = UBound(arr) &#62;= LBound(arr)</div><div class="code_line">End Function</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script> <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2024-11-21T20:27:41+03:00">21.11.24, 17:27</time></span></span><br>
Теперь давайте мне DGM, чтобы это ни значило бы) надеюсь это что-то хорошее)))]]></description>
        <author>HackerVlad</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=656263</guid>
        <pubDate>Thu, 24 Mar 2005 02:09:26 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=656263</link>
        <description><![CDATA[Vasya2000: Это только создание архива, да еще и не через cabinet.dll, короче это не то.]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=655872</guid>
        <pubDate>Wed, 23 Mar 2005 16:26:01 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=655872</link>
        <description><![CDATA[SCAT123: Можно сделать через COM (<a class='tag-url' href='http://www.quickvb.com/Code/CabinetMaker.htm' target='_blank'>см. здесь</a>), но, как я понял, будет работать только под Win2k и выше]]></description>
        <author>SCAT123</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=623337</guid>
        <pubDate>Fri, 25 Feb 2005 11:43:28 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=623337</link>
        <description><![CDATA[f33l: Пока никак =) Щас у мя вообще мало времени, как освобожусь, займусь вплотную. Мне что-то всё-таки влом колупаться с этими cdecl, т.к. это будет очень трудно отлаживать, поэтому я попробую разобраться в реализации MSZIP- или LZX-сжатия.]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=622667</guid>
        <pubDate>Thu, 24 Feb 2005 19:50:56 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=622667</link>
        <description><![CDATA[miksayer: ну и как даела?]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=617374</guid>
        <pubDate>Sat, 19 Feb 2005 15:45:54 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=617374</link>
        <description><![CDATA[f33l: <strong class='tag-b'>SmK</strong>, т.е. я был прав насчёт чистки стека..<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=616999'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SmK &#064; <time class="tag-quote__quoted-time" datetime="2005-02-19T07:47:36+00:00">19.02.05, 07:47</time></span><div class='quote '> Вылетает ошибка Rumtime Error 0</div></div>Странно...<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=617307'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>nash &#064; <time class="tag-quote__quoted-time" datetime="2005-02-19T14:14:44+00:00">19.02.05, 14:14</time></span><div class='quote '>да там половина функций неправильно задекларирована</div></div>Хм? А по-подробней?]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=617307</guid>
        <pubDate>Sat, 19 Feb 2005 14:14:44 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=617307</link>
        <description><![CDATA[nash: да там половина функций неправильно задекларирована.]]></description>
        <author>nash</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=616999</guid>
        <pubDate>Sat, 19 Feb 2005 07:47:36 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=616999</link>
        <description><![CDATA[SmK: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>вызов cdecl-функций отличается только тем, что нужно чистить стек.. правильно я понял?<br>
</div></div><br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
; F(A,B,C,D)<br>
<br>
_cdecl: ; прямой порядок расположения данных на стеке<br>
        ; обратный по времени способ запихивания<br>
        ; допускает переменное число параметров<br>
        ; поскольку стек очищает тот, кто вызвал функцию<br>
  push D<br>
  push C<br>
  push B<br>
  push A<br>
  call F<br>
  ; ret<br>
  inc esp, 16  ; очистка стека здесь<br>
<br>
_stdcall: ; порядок данных - тот же самый<br>
          ; но стек очищает функция<br>
          ; поэтому число параметров фиксировано<br>
  push D<br>
  push C<br>
  push B<br>
  push A<br>
  call F<br>
  ; ret 16 ; очистка стека - в функции<br>
<br>
_fastcall: ; аналогично stdcall, но два первых параметра передаются через регистры<br>
  push D<br>
  push C<br>
  mov edx, B<br>
  mov eax, A<br>
  call F<br>
  ; ret 8 ; очистка стека - в функции<br>
<br>
_pascal: ; обратный порядок данных на стеке, прямой порядок запихивания<br>
         ; поэтому число параметров фиксировано, и следовательно, стек очищает функция<br>
  push A<br>
  push B<br>
  push C<br>
  push D<br>
  call F<br>
  ; ret 16<br>
<br>
</div></div><br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
ОДНАКО хочу заметить, ведь мой код всё-таки работает.. если подебажить, можно увидеть, что структуры и правда заполняются, даже вроде правильно, но криво (имя файла например вписывается правильно, но с каким-то смещением..) Т.е. я хочу сказать, что оно как-никак, но работает. Может быть баг просто только в коде?..<br>
</div></div><br>
Хм... а у меня не заполняются. Вылетает ошибка Rumtime Error 0]]></description>
        <author>SmK</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=614440</guid>
        <pubDate>Wed, 16 Feb 2005 22:46:38 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=614440</link>
        <description><![CDATA[f33l: Насколько я понял из найденных примеров (там вставки, но вроде всё более-менее понятно..), вызов cdecl-функций отличается только тем, что нужно чистить стек.. правильно я понял?<br>
И это:<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=612272'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SmK &#064; <time class="tag-quote__quoted-time" datetime="2005-02-15T05:09:39+00:00">15.02.05, 05:09</time></span><div class='quote '>А обычные ф-ии типа fci_open вообще нельзя</div></div>Почему? Это никак не обойти (по аналогии с cdecl-API)?<br>
<br>
ОДНАКО хочу заметить, ведь мой код всё-таки работает.. если подебажить, можно увидеть, что структуры и правда заполняются, даже вроде правильно, но криво (имя файла например вписывается правильно, но с каким-то смещением..) Т.е. я хочу сказать, что оно как-никак, но работает. Может быть баг просто только в коде?..<br>
<br>
Подключайтесь, блин, а то трудновато в этом во всём разобраться..<br>
<br>
<br>
И вот ещё, тот другой способ, про который я говорил. В CAB SDK подробно описывается формат CAB, т.е. его можно конструировать вручную. Там есть пример cab-архива (не код, просто структура бинарика), он прокомментирован, и разобраться легко. НО там очень мало и запутанно написано про сжатие.. И в том примере файлы не сжаты. Т.е. я могу реализовать ручную сборку, но только без сжатия файлов (т.к. фиг там разберёшься)<br>
Если у кого есть примеры/ссылки реализации полностью совместимого со стандартом сжатия MSZIP (или LZX), выложите, плиз.<br>
Вообще, конечно, это менее желательный вариант, но если нифига с этим [censored] cdecl не получится, то останется только это..]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=613103</guid>
        <pubDate>Tue, 15 Feb 2005 17:14:38 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=613103</link>
        <description><![CDATA[f33l: Всё, я понял =) Блин, никогда не сталкивался на VB с cdecl-функциями..<br>Что ж придётся разбираться =)<br>Хотя, есть, в принципе, альтернатива, но геморная..<br>Попробую покувыркаться с этим cdecl, вроде что-то нашёл уже..]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=612272</guid>
        <pubDate>Tue, 15 Feb 2005 05:09:39 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=612272</link>
        <description><![CDATA[SmK: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Гм, и что, что cdecl? </div></div><br>
А VB их вызывает как stdcall. У VB все stdcall. <br>
Менять нельзя. Нуу... разве вроде импортируемы ф-ии можно, но там тоже косяки идут<br>
(Bad DLL calling convercation)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Private Declare Function FCICreate CDecl&amp; Lib &quot;cabinet.dll&quot;</div></ol></div></div></div></div><br>
А обычные ф-ии типа fci_open вообще нельзя.]]></description>
        <author>SmK</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=611886</guid>
        <pubDate>Mon, 14 Feb 2005 15:22:27 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=611886</link>
        <description><![CDATA[f33l: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=611859'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SmK &#064; <time class="tag-quote__quoted-time" datetime="2005-02-14T14:59:21+00:00">14.02.05, 14:59</time></span><div class='quote '>Нет, чтобы на сях сделать юзабельную длл и юзать в VB</div></div>Ну, во-первых, изначально это было нужно Скинеру для его спая, почитай посты выше. Во-вторых, конечно хорошо, когда есть возможность не юзать сторонние библиотеки/контролы (для этого, кстати, Скинер и поднял вопрос). А, в-третьих, это просто интересно как опыт, в том числе и перевода.<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=611859'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SmK &#064; <time class="tag-quote__quoted-time" datetime="2005-02-14T14:59:21+00:00">14.02.05, 14:59</time></span><div class='quote '>Там все ф-ии CDECL &#33; И callback-и и FCICreate. ИМХО без ассемблерных вставок вряд ли обойтись</div></div>Гм, и что, что cdecl? И причём тут асмовые вставки?]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=611859</guid>
        <pubDate>Mon, 14 Feb 2005 14:59:21 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=611859</link>
        <description><![CDATA[SmK: Блин,<strong class='tag-b'>f33l</strong>, тебе делать нечего, как перегонять код из Сей в VB ? Нет, чтобы на сях сделать юзабельную длл и юзать в VB.<br>
Посмотрел исходник. Там все ф-ии CDECL &#33; И callback-и и FCICreate<br>
ИМХО без ассемблерных вставок вряд ли обойтись. А это такой гемор. <br>
Предлагаю все же рассмотреть вариант с длл на сях :)]]></description>
        <author>SmK</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=611447</guid>
        <pubDate>Mon, 14 Feb 2005 09:19:20 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=611447</link>
        <description><![CDATA[f33l: Всё, выкладываю, блин.. Мы по-тихому =) договорились со Скинером устранить ошибочку, чтоб можно было сразу выложить полностью работоспособный модуль, однако он опять куда-то пропал.. &lt;_&lt;<br>Итак, в аттаче модуль на VB и несколько файлов из CAB SDK на C, которые, собственно, переводились..<br><br>Ошибка возникает при создании временных файлов, а конкретнее, происходит переполнение при передаче имени файла в callback-функцию. Некоторые симптомы наблюдаются ещё до того, вобщем, подебажте и поэкспериментируйте, думаю кто-нить сможет исправить ошибку на свежую голову..]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=607809</guid>
        <pubDate>Thu, 10 Feb 2005 13:38:27 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=607809</link>
        <description><![CDATA[miksayer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=603492'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>f33l &#064; <time class="tag-quote__quoted-time" datetime="2005-02-06T23:38:32+00:00">06.02.05, 23:38</time></span><div class='quote '>Всё переведено и подкорректировано, теперь отлавливаются и давятся злостные подлые баги...</div></div><br>
может выложишь? вместе баги будет устранять]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=603589</guid>
        <pubDate>Mon, 07 Feb 2005 05:43:29 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=603589</link>
        <description><![CDATA[SCINER: cablib.dll не входит в стандартную поставку windows и является надстройкой для cabinet.d]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=603573</guid>
        <pubDate>Mon, 07 Feb 2005 05:16:43 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=603573</link>
        <description><![CDATA[SmK: Извиняюсь, если не до конца въехал в тему, но<br>Project-&gt;References-&gt;CabLib интерфейс ля работы с архивами Cabinet<br>Это разве не то ?]]></description>
        <author>SmK</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=603492</guid>
        <pubDate>Sun, 06 Feb 2005 23:38:32 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=603492</link>
        <description><![CDATA[f33l: Всё переведено и подкорректировано, теперь отлавливаются и давятся злостные подлые баги...]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602978</guid>
        <pubDate>Sun, 06 Feb 2005 11:32:14 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602978</link>
        <description><![CDATA[maxim84_: Распокавал?]]></description>
        <author>maxim84_</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602957</guid>
        <pubDate>Sun, 06 Feb 2005 11:16:32 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602957</link>
        <description><![CDATA[SCINER: че-то я непонял откуда в хафманском файле вот такая штука:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>HE4    	<br>
<br>
2876<br>
<strong class='tag-b'>Rar&#33;</strong></div></div><br>
помоему этот архив создан при помощи совсем другой программы]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602930</guid>
        <pubDate>Sun, 06 Feb 2005 10:54:37 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602930</link>
        <description><![CDATA[maxim84_: хммм&#33; интиресно&#33;&#33; <br>вот попробуй]]></description>
        <author>maxim84_</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602764</guid>
        <pubDate>Sun, 06 Feb 2005 07:40:43 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602764</link>
        <description><![CDATA[SCINER: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=602530'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>maxim84_ &#064; <time class="tag-quote__quoted-time" datetime="2005-02-05T21:04:35+00:00">05.02.05, 21:04</time></span><div class='quote '>ну как это нет ничего на VB&#33;&#33;&#33; <br>
<a class='tag-url' href='http://vbstreets.ru/VB/Sources/42704.aspx' target='_blank'>77 методов компресии</a><br>
ооочень хорошие исходники&#33;&#33; а тебе уважаемый SCINER подойдет метод сжатия Huffman&#39;а на называется он &quot;Short 16 Chars&quot;<br>
WinRar 3.11 читает&#33;&#33; сам проверял&#33;&#33;</div></div><br>
1. Short 16 Chars - там нет такого метода<br>
2. WinRAR 3.42 пишет неверный формат на файлы сжатые всеми видами алгоритма Huffman<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">ооочень хорошие исходники!!</div></ol></div></div></div></div><br>
:no:<br>
1. почти в каждом алгоритме ошибка<br>
2. они не очень хорошо оптимизированы]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602530</guid>
        <pubDate>Sat, 05 Feb 2005 21:04:35 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602530</link>
        <description><![CDATA[maxim84_: ну как это нет ничего на VB&#33;&#33;&#33; <br>
<a class='tag-url' href='http://vbstreets.ru/VB/Sources/42704.aspx' target='_blank'>77 методов компресии</a><br>
ооочень хорошие исходники&#33;&#33; а тебе уважаемый SCINER подойдет метод сжатия Huffman&#39;а на называется он &quot;Short 16 Chars&quot;<br>
WinRar 3.11 читает&#33;&#33; сам проверял&#33;&#33;]]></description>
        <author>maxim84_</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602461</guid>
        <pubDate>Sat, 05 Feb 2005 20:02:57 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602461</link>
        <description><![CDATA[miksayer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=602454'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SCINER &#064; <time class="tag-quote__quoted-time" datetime="2005-02-05T20:00:07+00:00">05.02.05, 20:00</time></span><div class='quote '>мне нужно сжать кучку файлов в архив, который смогут распаковать WinZip и WinRAR</div></div><br>
мне тоже<br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=602454'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SCINER &#064; <time class="tag-quote__quoted-time" datetime="2005-02-05T20:00:07+00:00">05.02.05, 20:00</time></span><div class='quote '>1. нет ничего на VB</div></div><br>
раньше там к каждому алгоритму прилагался пример на VB, Pascal и C, а теперь почему-то нет]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602454</guid>
        <pubDate>Sat, 05 Feb 2005 20:00:07 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602454</link>
        <description><![CDATA[SCINER: 1. нет ничего на VB<br>2. там только алгоритмы сжатия, без формата архивов<br>3. алгоритмы ни капли не оптимизированные<br><br>мне нужно сжать кучку файлов в архив, который смогут распаковать WinZip и WinRAR]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602452</guid>
        <pubDate>Sat, 05 Feb 2005 19:59:33 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602452</link>
        <description><![CDATA[f33l: Блин, зачем ты поднял это позорное<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=549405'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>f33l &#064; <time class="tag-quote__quoted-time" datetime="2004-12-20T15:15:19+00:00">20.12.04, 15:15</time></span><div class='quote '>где-то на выходных</div></div>=)) А если серьёзно, уже почти готово, осталось буквально переписать функцию да привести это всё в человеческий вид. Большое сорри за такую задержку, мне действительно несколько стыдно =)]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602441</guid>
        <pubDate>Sat, 05 Feb 2005 19:55:35 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=602441</link>
        <description><![CDATA[miksayer: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=549405'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>f33l &#064; <time class="tag-quote__quoted-time" datetime="2004-12-20T15:15:19+00:00">20.12.04, 15:15</time></span><div class='quote '>Неа, я сам =))) Если серьёзно, я выложу где-то на выходных наверно...</div></div><br>
и где же? уже 2 месяца ждем<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=548026'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SCINER &#064; <time class="tag-quote__quoted-time" datetime="2004-12-19T11:20:53+00:00">19.12.04, 11:20</time></span><div class='quote '>Можно ZIP<br>
но для него придется писать сам алгоритм сжатия. Потом его потимизировать под VB.<br>
А для каба есть готовая библа, надо только функции заюзать.<br>
Вот так.<br>
Если есть зип, можно и зип, я не против.</div></div><br>
а если не zip?<br>
вот нашел:<br>
<a class='tag-url' href='http://algolist.manual.ru/compress/standard/index.php' target='_blank'>http://algolist.manual.ru/compress/standard/index.php</a>]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=549405</guid>
        <pubDate>Mon, 20 Dec 2004 15:15:19 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=549405</link>
        <description><![CDATA[f33l: Неа, я сам =))) Если серьёзно, я выложу где-то на выходных наверно...]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=549081</guid>
        <pubDate>Mon, 20 Dec 2004 12:11:10 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=549081</link>
        <description><![CDATA[XPraptor: <strong class='tag-b'>f33l</strong>, Там (в fci.h) основной момент как перевести указатели на функции обратного вызова (PFNFCIGETNEXTCABINET, PCCAB) и прочие. Если ты это уже сделал, то выкладывай, дальше всем аулом добъем очень быстро. ;)]]></description>
        <author>XPraptor</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548596</guid>
        <pubDate>Sun, 19 Dec 2004 23:35:04 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548596</link>
        <description><![CDATA[f33l: Переведён fci.h и бОльшая часть tesfci.c. В принципе это хорошо, но тестировать я пока ни разу не запустил, т.к. нужно перевести полностью. И не думаю, что когда я запущу, всё запашет с первого раза, т.к. там куча спорных мест, и это всё надо будет шлифовать долго...]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548593</guid>
        <pubDate>Sun, 19 Dec 2004 23:32:35 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548593</link>
        <description><![CDATA[SCINER: Блин.<br>кстати а что уже достигнуто на сегодняшний день ?]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548585</guid>
        <pubDate>Sun, 19 Dec 2004 23:23:12 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548585</link>
        <description><![CDATA[f33l: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=548576'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>SCINER &#064; 20.12.04, 01:54</span><div class='quote '>срочно</div></div>Блин, ну почему рочно? =) Моему переводу до рабочего варианта ещё очень далеко...]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548576</guid>
        <pubDate>Sun, 19 Dec 2004 22:54:58 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548576</link>
        <description><![CDATA[SCINER: В данный момент в моей проге юзается cablib.dll от Microsoft&#39;a<br>Мне срочно(потому что уже достала) надо от нее избавится(любым способом).<br><br>Требуется запаковать кучку файлов из кода программы(без библиотек и прог) в такой архив, который потом смогли бы распаковать WinZip и WinRAR.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548290</guid>
        <pubDate>Sun, 19 Dec 2004 17:51:13 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548290</link>
        <description><![CDATA[f33l: Это не подходит, Sciner вроде говорил уже. Ему нужно без сторонних контролов и прог.]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548275</guid>
        <pubDate>Sun, 19 Dec 2004 17:35:38 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548275</link>
        <description><![CDATA[miksayer: <strong class='tag-b'>SCINER</strong>, а как насчет утилиты MAKECAB.EXE(смотри аттач)?]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548026</guid>
        <pubDate>Sun, 19 Dec 2004 11:20:53 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=548026</link>
        <description><![CDATA[SCINER: Можно ZIP<br>но для него придется писать сам алгоритм сжатия. Потом его потимизировать под VB.<br>А для каба есть готовая библа, надо только функции заюзать.<br>Вот так.<br>Если есть зип, можно и зип, я не против.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=547905</guid>
        <pubDate>Sun, 19 Dec 2004 08:28:54 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=547905</link>
        <description><![CDATA[miksayer: <strong class='tag-b'>SCINER</strong>, а тебе обязательно именно cab? Ведь можно просто архивировать по какому-нибудь другому алгоритму и все. Хотя я не думаю, что ты бы создавал эту тему, если бы ты мог обойтись без cab <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2004-12-19T08:36:10+00:00">19.12.04, 08:36</time></span></span><br>
Кстати, я как-то находил прмер с 150 алгоритмами сжатия, но с моего винчестера он бесследно пропал. Теперь не могу его найти. Может у кого-то есть?]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=547762</guid>
        <pubDate>Sun, 19 Dec 2004 00:06:04 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=547762</link>
        <description><![CDATA[f33l: Распаковка - это фигня.. Я тоже находил такой сурс, он не юзает cabinet.dll, там другой принцип. А про XML в комментах вроде написано, я уж не помню. Типа в таком формате там сохраняются сведения о cab-файлах (только, спрашивается, нафиг это нужно?)<br><br>Я вообще тут в напряге... У меня куча материалов по cab&#39;ам на разных языках, но они пользы почти не приносят. Мне приходится почти с нуля переводить код из MS CAB SDK, там всё на Сях, а с Сей на ВБ переводить местами очень трудно.. Работа идёт, но медленно..]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=547751</guid>
        <pubDate>Sat, 18 Dec 2004 23:34:43 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=547751</link>
        <description><![CDATA[SCINER: Нашел распаковку.<br>Но она какая-то непонятная.<br>Причем тут вообще XML ?<br>Да и cabinet.dll че-то нигде не светится ???]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=544811</guid>
        <pubDate>Wed, 15 Dec 2004 20:49:37 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=544811</link>
        <description><![CDATA[SCINER: распаковка не нужна.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=544541</guid>
        <pubDate>Wed, 15 Dec 2004 15:01:37 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=544541</link>
        <description><![CDATA[f33l: То есть всё-таки общий класс делать...<br>А распаковвывать тебе надо?]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=543923</guid>
        <pubDate>Wed, 15 Dec 2004 01:28:25 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=543923</link>
        <description><![CDATA[SCINER: Мне надо типа:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Dim Cab As New Cabinet</div><div class="code_line">For i=0 To File1.ListCount -1</div><div class="code_line">&nbsp;Cab.AddFile File1.List(i)</div><div class="code_line">Next</div><div class="code_line">Cab.Path = &quot;C:\MyCabinet.Cab&quot;</div><div class="code_line">Call Cab.Compress</div><div class="code_line">Msgbox &quot;Archive create sucessfull!&quot;,32</div></ol></div></div></div></div>]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=543094</guid>
        <pubDate>Tue, 14 Dec 2004 11:46:28 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=543094</link>
        <description><![CDATA[f33l: <strong class='tag-b'>SCINER</strong>, я нашёл кое-что насчёт cab&#39;ов в очень извратном виде, но это сильно поможет с переводом.<br>
Так вот, скажи подробно, что ты хочешь делать со всем этим, т.е. опиши подробнее задачу и т.д.. Я могу узко заточить под конкретную задачу, а могу и сделать общий класс (хотя его всё равно придётся делать потом).]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533887</guid>
        <pubDate>Mon, 06 Dec 2004 05:37:07 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533887</link>
        <description><![CDATA[Dufa: <strong class='tag-b'>SCINER</strong>, Очень много ошибок. В делфи тип Integer = 4 байтам]]></description>
        <author>Dufa</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533848</guid>
        <pubDate>Mon, 06 Dec 2004 02:41:48 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533848</link>
        <description><![CDATA[SCINER: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>f33l,6.12.04, 01:53 &#064; <time class="tag-quote__quoted-time" datetime="1970-01-07T04:17:17+00:00">07.01.70, 04:17</time></span><div class='quote '>Чем это ты переводил? имхо оочень криво переводит.<br>
Вообще-то я имел ввиду пост#9: это конечный код или есть исправления?<br>
кстати навскидку tcomp это не структура это typedef, который вроде-бы используется как набор констант</div></div><br>
Переводил я сам :)<br>
Я не силен в Delphi.<br>
А насчет поста №9, я в нем ниче не понял, неработает он и все&#33;]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533837</guid>
        <pubDate>Mon, 06 Dec 2004 01:53:55 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533837</link>
        <description><![CDATA[f33l: Чем это ты переводил? имхо оочень криво переводит.<br>Вообще-то я имел ввиду пост#9: это конечный код или есть исправления?<br>кстати навскидку tcomp это не структура это typedef, который вроде-бы используется как набор констант]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533827</guid>
        <pubDate>Mon, 06 Dec 2004 01:09:39 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533827</link>
        <description><![CDATA[SCINER: Вот, но здесь стопудово ниче неправильно.<br>
А еще доку отсюда брал: <a class='tag-url' href='http://cvs.winehq.com/patch.py?id=6331' target='_blank'>http://cvs.winehq.com/patch.py?id=6331</a>]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533818</guid>
        <pubDate>Mon, 06 Dec 2004 00:46:53 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533818</link>
        <description><![CDATA[f33l: Я такими вещами не занимался... и поподробней плиз что за баг<br>И ещё раз: выложи тут, что у тя в конечном варианте получилось по кабам]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533784</guid>
        <pubDate>Sun, 05 Dec 2004 22:18:04 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533784</link>
        <description><![CDATA[f33l: Хм... трудновато.. Выложите плиз всё, что у вас пока получилось на эту тему, так будет проще.<br>з.ы. а на сях желательно под билдер нету исходников?]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533779</guid>
        <pubDate>Sun, 05 Dec 2004 22:11:08 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533779</link>
        <description><![CDATA[SCINER: Вообще-то здесь все помогают безвозмездно,<br>но если на то пошло, могу 2 DGM отдать (не больше)&#33;<br>Об этом в 1-ом посте этого топика сказано.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533420</guid>
        <pubDate>Sun, 05 Dec 2004 14:45:42 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533420</link>
        <description><![CDATA[Vasya2000: А сколько вы хотите?]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533388</guid>
        <pubDate>Sun, 05 Dec 2004 13:35:25 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533388</link>
        <description><![CDATA[Dufa: Исходники большие, а сколько заплатите :blink:  :D]]></description>
        <author>Dufa</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533152</guid>
        <pubDate>Sun, 05 Dec 2004 06:28:04 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533152</link>
        <description><![CDATA[Vasya2000: Вот исходники на Делфи, перевести надо всё&#33;]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533108</guid>
        <pubDate>Sun, 05 Dec 2004 04:39:26 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533108</link>
        <description><![CDATA[SCINER: Кусок кода который с которым можно запаковать файлы в архив.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533099</guid>
        <pubDate>Sun, 05 Dec 2004 03:53:28 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533099</link>
        <description><![CDATA[f33l: Уф... :rolleyes: Я долго долбился с експлорером, забил и поставил оперу... наконец-то зарегился<br>Так вот, в аттаче лежат исходники компонентов, которые работают с cab&#39;ами - что конкретно тебе надо перевести? :D]]></description>
        <author>f33l</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533069</guid>
        <pubDate>Sun, 05 Dec 2004 00:27:42 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533069</link>
        <description><![CDATA[SCINER: если я его кину на сайт у меня деньги на счету кончаться.<br>у меня выделенка с платным трафиком.<br><br>Остаток на счете: -0.94 у.е., порог отключения: -1 у.е.<br><br>а заплатить деньги немогу т.к. завтра воскресенье.<br>еще максимум килобайт 500 протяну.<br>а аттач весит 83кб&#33;]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533059</guid>
        <pubDate>Sun, 05 Dec 2004 00:05:22 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=533059</link>
        <description><![CDATA[tmp: Блин Sciner )) Ты забыл что я не зареген? ) Кинь к себе на сайт плиз<br>а вообще, сорри, конечно... я вот щас попытаюсь осла переставить, может быть всё исправится..]]></description>
        <author>tmp</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532749</guid>
        <pubDate>Sat, 04 Dec 2004 17:41:19 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532749</link>
        <description><![CDATA[SCINER: Блин, а я и не видел этого поста.<br>Вот, что-то на дельфи:]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532727</guid>
        <pubDate>Sat, 04 Dec 2004 17:10:11 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532727</link>
        <description><![CDATA[tmp: Sciner см пост #40. Могу чем-нить помочь хоть в этом?]]></description>
        <author>tmp</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532683</guid>
        <pubDate>Sat, 04 Dec 2004 16:02:48 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532683</link>
        <description><![CDATA[SCINER: Блин. Жаль что ниче нового.<br>На данный момент в SCINSpy я как раз эту библу и юзаю. Я только перебил ее немного(удалил инфу о версии, переименовал в ssreport.dll и сжал UPX&#39;ом)<br>К сожалению это не на VB.<br><br>Проблема до сих пор актуальна&#33;]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532663</guid>
        <pubDate>Sat, 04 Dec 2004 15:34:10 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532663</link>
        <description><![CDATA[Vasya2000: Кхм. Собственно самих исходников библиотеки нету. Да и библиотека не на ВБ сделана. Жаль.]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532631</guid>
        <pubDate>Sat, 04 Dec 2004 15:03:04 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532631</link>
        <description><![CDATA[Dr._S: <strong class='tag-b'>SCINER</strong>, нашел пример по CAB&#39;у архивировать/разархивировать, но не могу на форум выложить, хрень какая-то, не получается&#33; Качать могу, все и сколько хочешь, а вот когда начинаю выкладывать - проблема. Если на сайт не получится выложить, то до понедельника.<br>
<br>
<a class='tag-url' href='http://kotikdima.narod.ru/cablib.part1.rar' target='_blank'>1 часть</a><br>
<br>
<a class='tag-url' href='http://kotikdima.narod.ru/cablib.part2.rar' target='_blank'>2 часть</a>]]></description>
        <author>Dr._S</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532604</guid>
        <pubDate>Sat, 04 Dec 2004 14:40:16 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532604</link>
        <description><![CDATA[tmp: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Пол инета перерыл, ничего готового не нашел.<br>
Кроме как на C++ да на Delphi.</div></div><br>
Если ты нашёл то, что тебе нужно, но есть проблемы с переводом на вб, выложи кусок кода (лучше на дельфях), может смогу помочь? :unsure:]]></description>
        <author>tmp</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532237</guid>
        <pubDate>Sat, 04 Dec 2004 05:01:04 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532237</link>
        <description><![CDATA[SCINER: Так там же только распаковка и просмотр. Вроде :huh:.<br>Там нет запаковки в архив&#33;]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532235</guid>
        <pubDate>Sat, 04 Dec 2004 04:36:24 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532235</link>
        <description><![CDATA[Dr._S: <strong class='tag-b'>Vasya2000</strong>, <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Наверное потому что zip и rar тоже сторонние архиваторы, их в винде может и не быть, а cab предустановлен в винде, так же как kernel или user32. </div></div><br>
, Вася в примере используются только <strong class='tag-b'>kernel32</strong> и <strong class='tag-b'>shell32</strong><br>
<br>
<strong class='tag-b'>SCINER</strong>,   <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>zip or rar неподходят, в чистой винде нет ничего для работы с ними.<br>
а cabinet.dll есть везде&#33;</div></div>, если ты смотрел пример, то наверное заметил, что в нем используются только <strong class='tag-b'>kernel32</strong> и <strong class='tag-b'>shell32</strong>. Никаких сторонних библиотек, тем более самих экзешников этих архиваторов и в помине нет.]]></description>
        <author>Dr._S</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532203</guid>
        <pubDate>Sat, 04 Dec 2004 01:11:48 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=532203</link>
        <description><![CDATA[SCINER: zip or rar неподходят, в чистой винде нет ничего для работы с ними.<br>а cabinet.dll есть везде&#33;<br><br>Да в принципе мне подойдет любой алгоритм сжатия.<br>Лишь бы его поддерживал WinZip и WinRar.<br>А то как мне людям слать архивы, которые потом никак не распаковать ?<br><br>Короче CAB здесь подходит всех больше.<br>Если бы еще знать как им корректно пользоваться :)<br><br>Пол инета перерыл, ничего готового не нашел.<br>Кроме как на C++ да на Delphi.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529190</guid>
        <pubDate>Wed, 01 Dec 2004 10:33:35 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529190</link>
        <description><![CDATA[Vasya2000: Ну не знаю как там с зипом или раром, это вообще-то SCINER&#39;у надо было. А по поводу cab&#39;а - задача сама по себе интересная.]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529170</guid>
        <pubDate>Wed, 01 Dec 2004 10:17:01 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529170</link>
        <description><![CDATA[Dr._S: <strong class='tag-b'>Vasya2000</strong>, <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Наверное потому что zip и rar тоже сторонние архиваторы, их в винде может и не быть, а cab предустановлен в винде, так же как kernel или user32. </div></div>, так нет, как раз таки, не используя сами это архиваторы, а реальный код. Вот например посмотри это, там есть и CAB, но вот только он его может просматривать и все. Работает реально только с зипом, вроде, не разбирался сильно, смотри сам:]]></description>
        <author>Dr._S</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529140</guid>
        <pubDate>Wed, 01 Dec 2004 09:49:05 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529140</link>
        <description><![CDATA[Vasya2000: Наверное потому что zip и rar  тоже сторонние архиваторы, их в винде может и не быть, а cab предустановлен в винде, так же как kernel или user32.]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529101</guid>
        <pubDate>Wed, 01 Dec 2004 09:28:44 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=529101</link>
        <description><![CDATA[Dr._S: <strong class='tag-b'>Vasya2000</strong>, <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Нужны исходники на ВБ, работа с cabinet.dll напрямую, а не через посредников. </div></div>, а почему именно с CAB, а не ZIP или RAR например?]]></description>
        <author>Dr._S</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528946</guid>
        <pubDate>Wed, 01 Dec 2004 07:32:51 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528946</link>
        <description><![CDATA[Vasya2000: Нужны исходники на ВБ, работа с cabinet.dll напрямую, а не через посредников.]]></description>
        <author>Vasya2000</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528850</guid>
        <pubDate>Wed, 01 Dec 2004 04:57:38 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528850</link>
        <description><![CDATA[Dr._S: <strong class='tag-b'>Vasya2000</strong>, а <strong class='tag-b'>expand.exe</strong> (для XP) и  <strong class='tag-b'>extract</strong> (win98)  не подходит?]]></description>
        <author>Dr._S</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528435</guid>
        <pubDate>Tue, 30 Nov 2004 14:21:30 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528435</link>
        <description><![CDATA[tmp: 2Sciner: ну мне в полнейший лом переставлять... :&#39;( потом как-нить<br>2Vasya2000: пасиб... и отдельно большое спасибо за ссылку на такой замечательный сайт =) не знал о нём..]]></description>
        <author>tmp</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528408</guid>
        <pubDate>Tue, 30 Nov 2004 14:05:55 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528408</link>
        <description><![CDATA[SCINER: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=74124&view=findpost&p=528284'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>miksayer &#064; 30.11.04, 12:41</span><div class='quote '>мне тоже нужно с Cab&#39;ами работать... А cabinet.dll с виндой поставляется?</div></div><br>
Да&#33; Помоему начиная с 98. А может даже и с 95.]]></description>
        <author>SCINER</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528284</guid>
        <pubDate>Tue, 30 Nov 2004 12:41:21 +0000</pubDate>
        <title>Кому надо DGM ?</title>
        <link>https://forum.sources.ru/index.php?showtopic=74124&amp;view=findpost&amp;p=528284</link>
        <description><![CDATA[miksayer: мне тоже нужно с Cab&#39;ами работать... А cabinet.dll с виндой поставляется?]]></description>
        <author>miksayer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	