code: def getDMCframe(f, iFrm: int, finf: dict, verbose: bool=False):
      
      # on windows, "int" is int32 and overflows at 2.1GB!  We need np.int64
      currByte = iFrm * finf['bytesperframe']
  # %% advance to start of frame in bytes
      if verbose:
          print(f'seeking to byte {currByte}')
  
      assert isinstance(iFrm, (int, int64)), 'int32 will fail on files > 2GB'
  
      try:
          f.seek(currByte, 0)
      except IOError as e:
          raise IOError(f'I couldnt seek to byte {currByte:d}. try using a 64-bit integer for iFrm \n'
                        'is {f.name} a DMCdata file?  {e}')
  # %% read data ***LABVIEW USES ROW-MAJOR C ORDERING!!
      try:
          currFrame = fromfile(f, uint16,
                               finf['pixelsperimage']).reshape((finf['supery'], finf['superx']),
                                                               order='C')
      except ValueError as e:
          raise ValueError(f'read past end of file?  {e}')
  
      rawFrameInd = meta2rawInd(f, finf['nmetadata'])
  
      if rawFrameInd is None:  # 2011 no metadata file
          rawFrameInd = iFrm + 1  # fallback
  
      return currFrame, rawFrameInd
docs: f is open file handle