Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.08.15;
Скачать: [xml.tar.bz2];

Вниз

Подробности к DLL->Form->DLL часть2   Найти похожие ветки 

 
Bor   (2002-08-02 08:16) [0]

{----------------------------------------------------------------------------------}
// Установка ссылок на вспомогательные функции
procedure TFormArh.SetDummyInitFunctions(var Z:TZipUserFunctions);
begin
{ prepare ZipUserFunctions structure }
with Z do
begin
@Print := @DummyPrint;
@Comment := @DummyComment;
@Password := @DummyPassword;
@Service := @DummyService;
end;
{ send it to dll }
// ===!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ZpInit(Z); //ЗДЕСЬ ВЫЛЕТАЕТ ОШИБКА, до этого момента
//все работает - форма создается, кнопочка жмется :))
// ===!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//ПОЧЕМУ???
//Если вместо VfpShell.Dll форму вызывать из ехе-ка все работает
end;

{----------------------------------------------------------------------------------}
function DummyPrint(Buffer: PChar; Size: ULONG): integer;
begin
FormArh.Memo.Lines.Add("print> "+StrPas(Buffer));
Result := size;
end;
{----------------------------------------------------------------------------------}
function DummyPassword(P: PChar; N: Integer; M, Name: PChar): integer;
begin
Result := 1;
end;
{----------------------------------------------------------------------------------}
function DummyComment(Buffer: PChar): PChar;
begin
//Form1.Memo.Lines.Add("comment> "+StrPas(Buffer));
Result := buffer;
end;
{----------------------------------------------------------------------------------}
function DummyService(Buffer: PChar; Size: ULONG): integer;
begin
//Form1.Memo.Lines.Add("service> "+StrPas(Buffer));
Result := 0;
end;
{----------------------------------------------------------------------------------}
{задание параметров сжатия}
procedure TformArh.Set_ZipDllOptions;
var
ZipOptions : TZPOpt;
begin
ZipOptions.Date := nil;
ZipOptions.szRootDir := nil;
ZipOptions.szTempDir := nil;
ZipOptions.fSuffix := false;
ZipOptions.fEncrypt := false;
ZipOptions.fSystem := true;
ZipOptions.fVolume := false;
ZipOptions.fExtra := false;
ZipOptions.fNoDirEntries := false;
ZipOptions.fExcludeDate := false;
ZipOptions.fIncludeDate := false;
ZipOptions.fVerbose := false;
ZipOptions.fQuiet := false;
ZipOptions.fCRLF_LF := false;
ZipOptions.fLF_CRLF := false;
ZipOptions.fJunkDir := false;
ZipOptions.fGrow := true;
ZipOptions.fForce := false;
ZipOptions.fMove := false;
ZipOptions.fDeleteEntries := false;
ZipOptions.fUpdate := false;
ZipOptions.fFreshen := false;
ZipOptions.fJunkSFX := false;
ZipOptions.fLatestTime := false;
ZipOptions.fComment := false;
ZipOptions.fOffsets := false;
ZipOptions.fPrivilege := false;
ZipOptions.fEncryption := false;
ZipOptions.fRecurse := 1;
ZipOptions.fRepair := 0;
ZipOptions.fLevel := "9";
{ send the options to the dll }
if not ZpSetOptions(ZipOptions) then ShowMessage("Error setting Zip Options");
end;

{ event handlers }
{----------------------------------------------------------------------------------}

procedure TformArh.Button1Click(Sender: TObject);
begin
Memo.Lines.Clear;
Set_ZipDllOptions;
ListBox1.Items.Add("c:\temp\1.txt");
ListBox1.Items.Add("c:\temp\2.txt");
ListBox1.Items.Add("c:\temp\3.txt");
ZipFiles("c:\mytest.zip", ListBox1.Items);
end;

end.


 
Bor   (2002-08-02 15:13) [1]

У мастеров соображений по этому поводе нет?????



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2002.08.15;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.008 c
14-48297
совсем Новенький
2002-07-22 11:30
2002.08.15
Формулы


14-48284
Вадим
2002-07-20 00:35
2002.08.15
Win32.HLLM.Klez.4


1-48191
Sedunov Vitaly
2002-08-02 18:41
2002.08.15
OnActivate


1-48134
Bor
2002-08-01 11:23
2002.08.15
DLL->Form->DLL


1-48095
c0pYc@t
2002-08-05 09:39
2002.08.15
TLIST





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский