SFPackFile Class

The SFPackFile class is used to unpack a SFPack file to a SF2 file. You can create a SF2PackFile Object with the Engine.OpenSFPack method.

Methods and Properties:

Method/Property

Description

AgreeLicense ()

If the SFPack file includes a License, you need to call this method before any call to SFPackFile.Inflate.

Cancel ()

Call from within the Event.Progress event to cancel the current packing.

Error As SFPackErrorConst [R]

Get the current Error status of the object.

ErrorStr As String [R]

Returns the current Error status as a descriptive text.

File As String [R]

Returns the file the SFPackFile Object has been opened for (via Engine.OpenSFPack). This is also the default property.

GetSampleData (nSample As Long) As Integer()

Returns an 0-based Integer array with all the sample data points of the specified sample. nSample is in the range of 0 to SampleCount-1.

GetSampleSize (nSample As Long) As Long

Returns the size of the specified sample in sample points. nSample is in the range of 0 to SampleCount-1.

HasLicense As Long [R]

Returns a non zero value if the SFPack archive has a License file attached.

HasText as Long [R]

Returns a non zero value if the SFPack archive has a Text file attached.

IsEncrypted As Long [R]

Returns a non zero value if the SFPack archive is encrypted. If this is the case, you must set the proper password before calling the Inflate method.

IsNonCommercial As Long

Returns a non zero value if the SFPack archive has been packed with the freeware version.

License As String [R]

The License that is attached to the SFPack file.

Inflate (cFile as String) As Long

Inflate the SFPack file to a SF2 file. During processing multiple Event.Progress events are triggered.
Returns 0 on failure (you can use the Error, ErrorStr properties to get further information).

Visual Basic Source Example

InfoData As Byte() [R]

Returns a 0-based byte array that contains the original Info-List chunk of the packed SF2 files.

OriginalSize As Long [R]

Returns the original (unpacked) size of the file in bytes.

Password as String [W]

Sets the password for unpacking an encrypted archive

PresetData as Byte() [R]

Returns a 0-based byte array that contains the original Pdta-List chunk of the packed SF2 file.

SampleCount as Long

Total count of samples in the SFPack archive.

Size As Long [R]

Returns the size of the SFPack File in bytes.

Text As String [R]

The Text that is attached to the SFPack file.

VersionMajor As Short [R]

Major part of the SFPack file version (currently 1)

VersionMinor As Short [R]

Minor part of the SFPack file version (currently 0)