/// <exception cref="WinrtCifs.Dcerpc.Ndr.NdrException"></exception> public override void Encode(NdrBuffer buf) { int start = buf.GetIndex(); int allocHintIndex = 0; buf.Advance(16); if (Ptype == 0) { allocHintIndex = buf.GetIndex(); buf.Enc_ndr_long(0); buf.Enc_ndr_short(0); buf.Enc_ndr_short(GetOpnum()); } Encode_in(buf); Length = buf.GetIndex() - start; if (Ptype == 0) { buf.SetIndex(allocHintIndex); AllocHint = Length - allocHintIndex; buf.Enc_ndr_long(AllocHint); } buf.SetIndex(start); Encode_header(buf); buf.SetIndex(start + Length); }