private static int HandlePropertyChunk(IFFParser iff, object userData) { int err; var cn = iff.GetCurrentContext(); var ci = new ContextInfoNode(cn.Id, cn.Type, GenericChunkIds.CI_PROPCHUNK, cn.Size, null); if (ci != null) { var buffer = new byte[cn.Size]; err = iff.BufferChunk((int)cn.Size, ref buffer); if (err >= 0) { ci.Data = buffer; err = iff.StoreContextInfo(ci, ContextInfoLocation.Prop); if (err >= 0) { return(1); } } ci.Dispose(); } else { err = (int)ParserStatus.OutOfMemory; } return(err); }
private static int HandleStopChunk(IFFParser iff, object userData) { /* stop parsing and return to client */ return(0); }