@@ -71,7 +71,7 @@ type ObjectNullMultiple256Record struct {
7171
7272type ObjectNullRecord struct {}
7373
74- type BinaryObjectRecord struct {
74+ type BinaryObjectString struct {
7575 ObjectID int
7676 Value string
7777}
@@ -121,7 +121,7 @@ func (classWithIDRecord ClassWithIDRecord) GetRecordType() int {
121121 return RecordTypeEnumMap ["ClassWithId" ]
122122}
123123
124- func (binaryObjectRecord BinaryObjectRecord ) GetRecordType () int {
124+ func (binaryObjectString BinaryObjectString ) GetRecordType () int {
125125 return RecordTypeEnumMap ["BinaryObjectString" ]
126126}
127127
@@ -212,12 +212,12 @@ func (classWithIDRecord ClassWithIDRecord) ToXML(_ ClassInfo, _ MemberTypeInfo,
212212 return MemberNode {}, false
213213}
214214
215- func (binaryObjectRecord BinaryObjectRecord ) ToXML (classInfo ClassInfo , memberTypeInfo MemberTypeInfo , _ BinaryLibraryRecord , currentIndex int , _ string ) (MemberNode , bool ) {
215+ func (binaryObjectString BinaryObjectString ) ToXML (classInfo ClassInfo , memberTypeInfo MemberTypeInfo , _ BinaryLibraryRecord , currentIndex int , _ string ) (MemberNode , bool ) {
216216 memberNode := MemberNode {}
217217 memberNode .XMLName .Local = classInfo .MemberNames [currentIndex ]
218- memberNode .ID = fmt .Sprintf ("ref-%d" , binaryObjectRecord .ObjectID )
218+ memberNode .ID = fmt .Sprintf ("ref-%d" , binaryObjectString .ObjectID )
219219 memberNode .XsiType = "xsd:" + strings .ToLower (memberTypeInfo .BinaryTypes [currentIndex ])
220- memberNode .Content = escapeTags (binaryObjectRecord .Value )
220+ memberNode .Content = escapeTags (binaryObjectString .Value )
221221
222222 return memberNode , true
223223}
@@ -471,10 +471,10 @@ func (classWithIDRecord ClassWithIDRecord) ToRecordBin() (string, bool) {
471471}
472472
473473// https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/eb503ca5-e1f6-4271-a7ee-c4ca38d07996
474- func (binaryObjectRecord BinaryObjectRecord ) ToRecordBin () (string , bool ) {
475- recordTypeEnumString := string (byte (binaryObjectRecord .GetRecordType ()))
476- objectIDString := transform .PackLittleInt32 (binaryObjectRecord .ObjectID )
477- prefixedValue := lengthPrefixedString (binaryObjectRecord .Value )
474+ func (binaryObjectString BinaryObjectString ) ToRecordBin () (string , bool ) {
475+ recordTypeEnumString := string (byte (binaryObjectString .GetRecordType ()))
476+ objectIDString := transform .PackLittleInt32 (binaryObjectString .ObjectID )
477+ prefixedValue := lengthPrefixedString (binaryObjectString .Value )
478478
479479 return recordTypeEnumString + objectIDString + prefixedValue , true
480480}
@@ -537,7 +537,7 @@ func (systemClassWithMembersAndTypesRecord SystemClassWithMembersAndTypesRecord)
537537 return "" , false
538538 }
539539
540- ////////////////////////// /// objid, name, count, membernames//int8 type values+addInfo/the array of values
540+ // objid, name, count, membernames//int8 type values+addInfo/the array of values
541541 return recordTypeEnumString + systemClassWithMembersAndTypesRecord .ClassInfo .ToBin () + memberTypeInfoString + memberValuesString , true
542542}
543543
@@ -599,6 +599,6 @@ func (classWithMembersAndTypesRecord ClassWithMembersAndTypesRecord) ToRecordBin
599599 return "" , false
600600 }
601601
602- ////////////////////////////// id, name, count, membernames+addinfo // the int8 values for types // the int32 ID// the array of values
602+ // id, name, count, membernames+addinfo the int8 values for types, the int32 ID, the array of values
603603 return recordTypeEnumString + classWithMembersAndTypesRecord .ClassInfo .ToBin () + memberTypeInfoString + libraryIDString + memberValuesString , true
604604}
0 commit comments