Exemplo n.º 1
0
            /// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
            public override void Decode(NdrBuffer src)
            {
                src.Align(4);
                int pathp    = src.Dec_ndr_long();
                int commentp = src.Dec_ndr_long();

                State     = src.Dec_ndr_long();
                NumStores = src.Dec_ndr_long();
                int storesp = src.Dec_ndr_long();

                if (pathp != 0)
                {
                    src  = src.Deferred;
                    Path = src.Dec_ndr_string();
                }
                if (commentp != 0)
                {
                    src     = src.Deferred;
                    Comment = src.Dec_ndr_string();
                }
                if (storesp != 0)
                {
                    src = src.Deferred;
                    int storess = src.Dec_ndr_long();
                    int storesi = src.Index;
                    src.Advance(12 * storess);
                    if (Stores == null)
                    {
                        if (storess < 0 || storess > unchecked (0xFFFF))
                        {
                            throw new NdrException(NdrException.InvalidConformance);
                        }
                        Stores = new DfsStorageInfo[storess];
                    }
                    src = src.Derive(storesi);
                    for (int i = 0; i < storess; i++)
                    {
                        if (Stores[i] == null)
                        {
                            Stores[i] = new DfsStorageInfo();
                        }
                        Stores[i].Decode(src);
                    }
                }
            }
Exemplo n.º 2
0
			/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
			public override void Decode(NdrBuffer src)
			{
				src.Align(4);
				int pathp = src.Dec_ndr_long();
				int commentp = src.Dec_ndr_long();
				State = src.Dec_ndr_long();
				NumStores = src.Dec_ndr_long();
				int storesp = src.Dec_ndr_long();
				if (pathp != 0)
				{
					src = src.Deferred;
					Path = src.Dec_ndr_string();
				}
				if (commentp != 0)
				{
					src = src.Deferred;
					Comment = src.Dec_ndr_string();
				}
				if (storesp != 0)
				{
					src = src.Deferred;
					int storess = src.Dec_ndr_long();
					int storesi = src.Index;
					src.Advance(12 * storess);
					if (Stores == null)
					{
						if (storess < 0 || storess > unchecked(0xFFFF))
						{
							throw new NdrException(NdrException.InvalidConformance);
						}
						Stores = new DfsStorageInfo[storess];
					}
					src = src.Derive(storesi);
					for (int i = 0; i < storess; i++)
					{
						if (Stores[i] == null)
						{
							Stores[i] = new DfsStorageInfo();
						}
						Stores[i].Decode(src);
					}
				}
			}