public void Open(OpenType flags, string options = "") { if (_handle > 0) { Close(false); } Check(ISYS11df.IGR_Open_Stream_Ex(NeedStream(), (int)flags, options, ref _capabilities, ref _filetype, ref _handle, ref ecb), ecb); if (((int)(flags) & 0xffff0000) == (int)OpenType.FormatImage) { Check(ISYS11df.IGR_Get_Page_Count(_handle, ref _pageCount, ref ecb)); } _flags = flags; }