Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.08.15;
Скачать: CL | DM;

Вниз

Подробности к 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;
Скачать: CL | DM;

Наверх




Память: 0.45 MB
Время: 0.005 c
1-48028
Fissher
2002-07-31 21:05
2002.08.15
Есть ли у MainMenu свойство Cursor? И как бы это сделать??


3-48010
Alexsys
2002-07-25 21:43
2002.08.15
Поиск в табличке по неполному слову по нескольким полям


3-47985
UnDISCOvery
2002-07-26 16:46
2002.08.15
Как соотносятся типы полей Paradox и Access ?


14-48287
Magystr
2002-07-20 21:53
2002.08.15
Где можно скачать звуки?


1-48087
SemFLY
2002-07-28 21:02
2002.08.15
Печать документа Word





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский