Exemple #1
0
            /// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
            public override void Decode(NdrBuffer src)
            {
                src.Align(4);
                Count = src.Dec_ndr_long();
                int sp = src.Dec_ndr_long();

                if (sp != 0)
                {
                    src = src.Deferred;
                    int ss = src.Dec_ndr_long();
                    int si = src.Index;
                    src.Advance(4 * ss);
                    if (S == null)
                    {
                        if (ss < 0 || ss > unchecked (0xFFFF))
                        {
                            throw new NdrException(NdrException.InvalidConformance);
                        }
                        S = new DfsInfo200[ss];
                    }
                    src = src.Derive(si);
                    for (int i = 0; i < ss; i++)
                    {
                        if (S[i] == null)
                        {
                            S[i] = new DfsInfo200();
                        }
                        S[i].Decode(src);
                    }
                }
            }
Exemple #2
0
			/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
			public override void Decode(NdrBuffer src)
			{
				src.Align(4);
				Count = src.Dec_ndr_long();
				int sp = src.Dec_ndr_long();
				if (sp != 0)
				{
					src = src.Deferred;
					int ss = src.Dec_ndr_long();
					int si = src.Index;
					src.Advance(4 * ss);
					if (S == null)
					{
						if (ss < 0 || ss > unchecked(0xFFFF))
						{
							throw new NdrException(NdrException.InvalidConformance);
						}
						S = new DfsInfo200[ss];
					}
					src = src.Derive(si);
					for (int i = 0; i < ss; i++)
					{
						if (S[i] == null)
						{
							S[i] = new DfsInfo200();
						}
						S[i].Decode(src);
					}
				}
			}