public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.BeginStructure();
        writer.WriteTopLevelUnicodeStringPointer(ServerName.StartsWith("\\\\") ? ServerName : "\\\\" + ServerName);
        writer.WriteTopLevelUnicodeStringPointer(Service);
        writer.WriteUInt32(Level);
        writer.WriteUInt32(Options);
        writer.EndStructure();
        return(writer.GetBytes());
    }
Esempio n. 2
0
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.WriteTopLevelUnicodeStringPointer(ServerName);
        writer.WriteTopLevelUnicodeStringPointer(DomainName);
        //guid
        writer.WriteUInt32(0);
        writer.WriteTopLevelUnicodeStringPointer(SiteName);
        writer.WriteUInt32(Flags);
        return(writer.GetBytes());
    }
        public byte[] GetBytes()
        {
            using NDRWriter writer = new NDRWriter();
            writer.WriteTopLevelUnicodeStringPointer(ServerName);
            writer.WriteUInt32(Level);

            return(writer.GetBytes());
        }
Esempio n. 4
0
        public byte[] GetBytes()
        {
            using NDRWriter writer = new NDRWriter();
            writer.WriteTopLevelUnicodeStringPointer(ServerName);
            writer.WriteStructure(InfoStruct);
            writer.WriteUInt32(PreferedMaximumLength);
            writer.WriteUInt32(ResumeHandle);

            return(writer.GetBytes());
        }
    public byte[] GetBytes()
    {
        NDRWriter writer = new NDRWriter();

        writer.WriteTopLevelUnicodeStringPointer(null);
        writer.WriteStructure(ObjectAttributes);
        writer.WriteUInt32((uint)DesiredAccess);

        return(writer.GetBytes());
    }