English
Source / code snippets

functions benefit Ocx zipper

 

Uwe
''Pascal''
Niemeier
Hi people!

here two Minimal-Examples (without Fehlerabfrage), How one mithilfe the ocx3a-routines
The windows-internen zipper-functions benefit can.

File or Ordner pack:
CompileMarkSeparation
window 200,200
 $H Windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
var Quelle$="C:2Test"---existierende Datei oder Ordner
var Ziel$="C:Test.zip"--anzulegende Datei
declare a#:dim a#,24:clear a#
byte a#,0=80,75,5,6
blockwrite Ziel$,a#,0,24--leere Zip-Datei erzeugen
dispose a#
ocxInit()
var Shell&=ocxCreate("Shell.Application")
var Ziel&=ocxMethod(Shell&,"NameSpace",Ziel$)--ZIP wird von Windows wie Ordner behandelt
ocxMethod(Ziel&,"CopyHere",Quelle$)------------Quelle nach Pseudo-"Ordner" kopieren
set("ErrorLevel",0)---Komprimieren arbeitet asynchron, darum Statusabfrage nötig

while 1

    sleep 50
    case filesize(Ziel$)>-1:break--Datei "fertig", sonst Größe = -1
    print Time$(1)

endwhile

set("ErrorLevel",1)
ocxRelease(Ziel&,Shell&)
print "Fertig"
ocxDeInit()
waitkey

ZIP-File entpacken:
CompileMarkSeparation
window 200,200
 $H windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
var fountain$="C:Test.zip"--existing zipper-File
var target$="C:1Test"-------existierender Zielordner
ocxInit()
var Shell&=ocxCreate("Shell.Application")
var Ziel&=ocxMethod(Shell&,"NameSpace",target$)
var Quelle&=ocxMethod(Shell&,"NameSpace",fountain$)
var Items&=ocxMethod(Quelle&,"Items")
ocxMethod(Ziel&,"CopyHere",Items&)
--Entpacken operates synchron, therefore no Statusabfrage necessary (?)
print "Fertig"
ocxRelease(Items&,Ziel&,Quelle&,Shell&)
ocxDeInit()
waitkey

The Codes behaviour itself just as as windows-Originale, d.h. with large
Files appear a Fortschrittsanzeige and at Entpacken becomes possibly
demand, whether existing Files überschrieben go should.

PS: If the ocx-routines directly to Calling the functions de-Initialisiert go
(How in this Demos), can itself whom appeal of ocxRelease() save, because
yet apertured ocx-Objects through ocxDeInit() automatically released go.

SeeYou
Pascal
 
12/27/09  
 




Dieter
Zornow
super made, have you got too time attempts a Zipdatei with Password To entpacken, becomes there automatically nachgefragt or supported The Windowsroutine not.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
12/27/09  
 




Sato
Pinto
Hello

by me brich at unpacken the Program ex

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
12/27/09  
 




Uwe
''Pascal''
Niemeier
Hi people!

@ Dieter:
at that Entpacken becomes in the doing with want to one Password gefragt; at pack not,
because windows this even not self supported.

@ Sato:
No Error Message?
attempt time by $D rauszukriegen, wos klemmt and red you The contents the verwendeten
variables Show.

SeeYou
Pascal
 
12/28/09  
 




Sato
Pinto
Hello Pascal

loudly $D
The row causes whom Programabruch
ocxMethod(Ziel&,"CopyHere",Items&)

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
12/29/09  
 




Uwe
''Pascal''
Niemeier
Hi Sato!

If Ziel&  and Items&  not zero are, ought to it klappen
otherwise could you to and/or to "CopyHere" time one Sleep 200  or so bring into action.
might one Timing-trouble his.

@ All: has otherwise yet someone Problems with this functions?

SeeYou
Pascal
 
12/30/09  
 



i am pleased first on it, correctly. angucken can I first bisl later.
 
12/30/09  
 




Sato
Pinto
Hello

with The Sleep command functions lovely, thanks

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
12/30/09  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.738 Views

Untitledvor 0 min.
Member 862464105/13/24
Sven Bader07/11/21
Andre Rohland01/27/18
Gast-081505/15/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie