QOS_DIFFSERV用法的示例

时间:2017-05-27 09:46:13

标签: c++ msdn qos

使用此QOS_DIFFSERV时收到错误消息。我在here中了解了它的使用方式。我想知道我是否正确编写了这段代码?

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);

0 个答案:

没有答案
相关问题