Smrf.NodeXL.ExcelTemplate.NodeXLApplicationSettingsBase.FileIsLocked C# (CSharp) Method

FileIsLocked() protected method

Determines whether an IOException was thrown because a file was locked.
protected FileIsLocked ( IOException oIOException ) : System.Boolean
oIOException System.IO.IOException /// The IOException that was thrown. ///
return System.Boolean
    protected Boolean FileIsLocked
    (
        IOException oIOException
    )
    {
        Debug.Assert(oIOException != null);
        AssertValid();

        Int32 iErrorCode =
            Marshal.GetHRForException(oIOException) & ( (1 << 16) - 1 );

        return (iErrorCode == 32 || iErrorCode == 33);
    }