This document is archived and information here might be outdated.  Recommended version.


IPackageFile.Unpack Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (EngineCore)  

IPackageFile.Unpack Method

Unpacks a package.

[Visual Basic .NET]
Public Function Unpack ( _
    ByVal fileorURL As String, _
    ByRef pUnpackLocation As String _
) As IStringArray
[C#]
public IStringArray Unpack (
    string fileorURL,
    ref string pUnpackLocation
);
[C++]
HRESULT Unpack(
  BSTR fileorURL,
  System.String* pUnpackLocation
);
[C++]

Parameters fileorURL [in]
fileorURL is a parameter of type BSTR pUnpackLocation [in, out]
pUnpackLocation is a parameter of type BSTR*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The Unpack method requires a reference to a string and the path to the package that is being unpacked.  Developers can pass in a string to the location they want the package to unpack to.  This should be a general location.  After the package unpacks the string will be updated with the path to the content of the package.  For example, if a you are unpacking a Map Package to c:\Packages, the unpack location string will be updated to the path to the MXD.

If a package has been previously unpacked to a different location the path to the previous location will be returned.  Passing in an empty string will use the default package location.

The unpack method returns a StringArray containing the path to the package content.

Remarks

The unpack method does not support Geoprocessing Packages.

See Also

IPackageFile Interface