SecureDeviceAddress.CompareBuffers Method

Compares two serialized SecureDeviceAddress buffer objects to see if they represent the same device.

Syntax

public:
static int32 CompareBuffers(
         IBuffer^ buffer1,
         IBuffer^ buffer2
)  

Parameters

buffer1
Type: IBuffer 

Pointer to the first serialized buffer object

buffer2
Type: IBuffer 

Pointer to the second serialized buffer object

Return value

Type: int32 

 Returns 0 if the buffer objects represent the same device, non-zero if they represent different devices.

Remarks

This method compares two buffer objects representing serialized SecureDeviceAddress data blocks, and returns 0 in result if they refer to the same device. If they do not refer to the same device, then -1 is returned if the first identity’s value is less than the second’s, or 1 if the first identity’s value is greater than the second’s, where the relative value will enable consistently sorting one device before another.

Equality or relative value of the device identities is determined based on contents inside the opaque block, not a direct memory comparison. Two network identities with different buffer sizes or contents may still refer to the same device.

No connection to either of the SecureDeviceAddresses is required, and this method does not initiate communication with them.

Requirements

Namespace: Windows.Xbox.Networking

Metadata: windows.winmd

See also

Reference

SecureDeviceAddress Class

SecureDeviceAddress Members

Windows.Xbox.Networking Namespace