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


IMapControl3.CheckMxFile Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Controls)  

IMapControl3.CheckMxFile Method

Checks the specified filename to see if it is a map document that can be loaded into the MapControl.

[Visual Basic .NET]
Public Function CheckMxFile ( _
    ByVal fileName As String _
) As Boolean
[C#]
public bool CheckMxFile (
    string fileName
);
[C++]
HRESULT CheckMxFile(
  BSTR fileName
);
[C++]

Parameters fileName [in]
fileName is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine.

Description

Determines whether the specified map document (*.mxd, *.mxt, *.pmf) is a valid map document and can be loaded into the MapControl. The method verifies the file exists and verifies the file internals conform to an expected storage format. The method does not read and validate the entire contents of the file; use the LoadMxFile to do this.

See Also

IMapControl3 Interface | IMapControl3.LoadMxFile Method | IMapControl2.LoadMxFile Method | IMapControl4.LoadMxFile Method | IMapControl2.ReadMxMaps Method | IMapControl4.ReadMxMaps Method | IMapControl3.ReadMxMaps Method

.NET Samples

Synchronized MapControl and PageLayoutControl application (Code Files: frmMain)