GFSPack/GFSPackmod.bas
Attribute VB_Name = "GFSPackmod"
Option Explicit
'(c)2001 by Louis. Interface between your target project and the SPack[Server/Client] code.
'
'NOTE: the full functionality of the SPack code must be retained, including the NN99 System
'sub/function name hiding.
'NOTE: to decrease the executable size an #If statement is used, don't forget
'to set the related flags (see below) before compiling.
'
#Const SPACK_ServerUsedFlag = False 'set before compiling
#Const SPACK_ClientUsedFlag = True 'set before compiling
'***SERVER FUNCTIONS***
Public Sub GFSPACK_CreateSPack(ByVal SPackType As Integer, ByVal SPackClientFileName As String, ByVal SPacklParam As String)
'on error resume next
#If SPACK_ServerUsedFlag = True Then
'preset
Load SPACKSfrm
'begin
Call SPACKSfrm.SPACKType_Apply(SPackType, SPackClientFileName, SPacklParam)
#End If
End Sub
'***END OF SERVER FUNCTIONS***
'***CLIENT FUNCTIONS***
Public Sub GFSPACK_OpenPacket(ByVal PacketCarrierFile As String, ByVal OutputDir As String, ByVal OverwriteFlag As Boolean, ByVal CallBackForm As Object)
'on error resume next 'allocate all data in an SPack
#If SPACK_ClientUsedFlag = True Then
'preset
Load SPACKCfrm
'begin
Call SPACKCfrm.noname8192(PacketCarrierFile, OutputDir, OverwriteFlag, CallBackForm, "", "")
#End If
End Sub
Public Function GFSPACK_UnpackFile(ByVal PacketCarrierFile As String, ByVal OverwriteFlag As Boolean, ByVal CallBackForm As Object, ByVal FileInputName As String, ByVal FileOutputName As String) As Boolean
'on error resume next 'unpacks one single file (input name needn't to be a valid file name); returns True for file is existing or False if not
#If SPACK_ClientUsedFlag = True Then
'preset
Load SPACKCfrm
'begin
Call SPACKCfrm.noname8192(PacketCarrierFile, "", OverwriteFlag, CallBackForm, FileInputName, FileOutputName) 'target sub must not replace %userdir% through ""
If Not ((Dir$(FileOutputName) = "") Or (Right$(FileOutputName, 1) = "\") Or (FileOutputName = "")) Then 'verify
GFSPACK_UnpackFile = True 'ok (file has been unpacked)
Else
GFSPACK_UnpackFile = False 'error (file has not been unpacked)
End If
#End If
End Function
Public Function GFSPACK_RemoveFileSystemVars(ByVal Line As String) As String
'on error resume next 'for removing %userdir% GFSPACK_OpenPacket() must have been called (OutputDir)
#If SPACK_ClientUsedFlag = True Then
'preset
Load SPACKCfrm
'begin
GFSPACK_RemoveFileSystemVars = SPACKCfrm.noname8193(Line)
#End If
End Function
'***END OF CLIENT FUNCTIONS***
[END OF FILE]