4.6 Correlation Example

 void CorrelatedMethod([in] long Size,
     [in,size_is(Size)] short * pArray );

In this method, the value of Size dictates the size of conformant array pArray in octet stream. Parameter Size is correlated to parameter pArray.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Value of Size

Maximum Count = Size

Representation of first element

Representation of second element

continued

continued

continued

Representation of the n-th element,

 where n=Size

The maximum count of the conformant array is the value of Size. In the example, correlation validation succeeds if the value of Size is equal to the maximum count of the conformant array referred by pArray.