Share via


IMoniker::Hash (Windows CE 5.0)

Send Feedback

This method returns a hash value.

HRESULT Hash( DWORD* pdwHash);

Parameters

  • pdwHash
    [out] Pointer to the hash value.

Return Values

S_OK indicates that a 32-bit integer hash value was successfully received.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Callers

You can use the value returned by this method to maintain a hash table of monikers. The hash value determines a hash bucket in the table. To search such a table for a specified moniker, calculate its hash value and then compare it to the monikers in that hash bucket using the IMoniker::IsEqual method.

Notes to Implementers

The hash value must be constant for the lifetime of the moniker. Two monikers that compare as equal using IMoniker::IsEqual must hash to the same value.

Marshaling and then unmarshaling a moniker should have no effect on its hash value. Consequently, your implementation of IMoniker::Hash should rely only on the internal state of the moniker, not on its memory address.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

IMoniker::IsEqual

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.