MsgBox IIf(x > 0, "Unable to establish connection with Zip Server. Zip Server was loaded and remained in memory.", "Unable to establish connection with Zip Server. Zip Server was not found.")
End
End If
End If
'give values here before calling ZipPass
ZipInfo.ZipFile = "C:\ZIPDDE.ZIP"
ZipInfo.Task = 0
ZipInfo.Destination = ""
ZipInfo.FilesToZip = "C:\DOS\*.COM"
ZipInfo.KeepDate = True
ZipInfo.OverWrite = False
ZipInfo.StorePath = True
ZipInfo.Recursive = True
ZipInfo.RestorePath = True
ZipInfo.Comment = "Sample ZIP file by ZipServer"
ZipInfo.Password = "REDEI"
DDEMessage$ = ZipPass$()
Mousepointer = 11
SendDDE DDEMessage$
start& = Timer
Do
DoEvents
Loop Until (DDELabel.Caption = "-1") Or Timer - start& > 60
DDELabel.Visible = True
Mousepointer = 0
DoEvents
'To terminate the DDE server, send nothing:
MsgBox "Zip Server will be removed from memory." 'REM out to bypass it
SendDDE ""
DDELabel.LinkMode = 0' None
End Sub
Sub Form_Load ()
Dim x As Integer
Dim OurDrive$
'before the first call to the ZIPSERV.DDL we have to change the
'drive to the one where the ZIPSERV.DDL resides
OurDrive$ = HomeDrive$()
ChDrive OurDrive$
'now make a call to ZIPSERV.DDL, just for loading it into memory
x = DriveType(Left$(OurDrive$, 1))
End Sub
Sub SendDDE (DDEInstruction$)
'Send and receive DDE commands/results to/from the
'hidden DDE Zip server, using the local DDE Label control
DDELabel.Caption = UCase$(DDEInstruction$)
DDELabel.LinkPoke
DoEvents
If Not UCase$(DDEInstruction$) = "" Then 'Unload server
DDELabel.LinkRequest
If Not DDELabel.Caption = "-1" Then '"-1" successful execution