void Load(DnsRecordHeader header, IntPtr dataPointer) { base.Load(header, dataPointer); Win32DnsSrvRecord record = (Win32DnsSrvRecord)Marshal.PtrToStructure(dataPointer, typeof(Win32DnsSrvRecord)); this.target = record.NameTarget; this.priority = record.Priority; this.weight = record.Weight; this.port = record.Port; }
/// <summary> /// Initializes a new instance of the DnsSrvRecord class. /// </summary> /// <param name="header">Dns dnsRecord header</param> /// <param name="dataPointer">Pointer to the data portion of the dnsRecord</param> internal override void Load(DnsRecordHeader header, IntPtr dataPointer) { base.Load(header, dataPointer); Win32DnsSrvRecord record = Marshal.PtrToStructure <Win32DnsSrvRecord>(dataPointer); this.target = record.NameTarget; this.priority = record.Priority; this.weight = record.Weight; this.port = record.Port; }