0

I receive an error when I use this QOS_DIFFSERV. I read about the way it is used in here. I am wondered if I have written this code correctly?

auto diffClass = (QOS_DIFFSERV*)pointer;
diffClass->ObjectHdr.ObjectType = QOS_OBJECT_DIFFSERV;      
diffClass->DSFieldCount = 1;
auto rule = (QOS_DIFFSERV_RULE*)diffClass->DiffservRule;
rule->ConformingOutboundDSField = 48;
rule->ConformingUserPriority = 7;
rule->InboundDSField = 48;
rule->NonConformingOutboundDSField = 48;
rule->NonConformingUserPriority = 7;
diffClass->ObjectHdr.ObjectLength = sizeof(QOS_DIFFSERV) + sizeof(QOS_DIFFSERV_RULE);
Matin Lotfaliee
  • 1,745
  • 2
  • 21
  • 43

0 Answers0