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


IESRISpatialReferenceGEN2.ExportToESRISpatialReference2 Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IESRISpatialReferenceGEN2.ExportToESRISpatialReference2 Method

Exports this spatial reference component to a buffer.

[Visual Basic .NET]
Public Sub ExportToESRISpatialReference2 ( _
    ByRef str As String, _
    ByRef cBytesWrote As Integer _
)
[C#]
public void ExportToESRISpatialReference2 (
    ref string str,
    ref int cBytesWrote
);
[C++]
HRESULT ExportToESRISpatialReference2(
  BSTR* str,
  long* cBytesWrote
);
[C++]

Parameters str [out] str is a parameter of type BSTR cBytesWrote [out] cBytesWrote is a parameter of type long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
[C#]

public void ExportToESRISpatialReference(ISpatialReference spatialReference)
{
    int bytes=0;
    string buffer=null;
    IESRISpatialReferenceGEN2 parameterExport=spatialReference as IESRISpatialReferenceGEN2;
    parameterExport.ExportToESRISpatialReference2(out buffer, out bytes);
}

 

[Visual Basic .NET]
Public Sub ExportToESRISpatialReference(ByVal spatialReference As ISpatialReference)
      Dim bytes As Long=Nothing
      Dim buffer As String=Nothing
      Dim projectedCoordinateSystem As ISpatialReference=spatialReference
      Dim parameterExport As IESRISpatialReferenceGEN2=projectedCoordinateSystem
      parameterExport.ExportToESRISpatialReference2(buffer, bytes)
End Sub

See Also

IESRISpatialReferenceGEN2 Interface