|
IROTData::GetComparisonData
Retrieves data from a moniker that can be used to test the moniker for
equality against another moniker.
HRESULT GetComparisonData(
PVOID *ppvData,
| //Buffer that receives the comparison data
| ULONG cbMax,
| //Specifies length of buffer
| PULONG pcbData
| //Receives the length of the comparison data
| );
|
|
Parameters
ppvData
[out] Points to a buffer that receives the comparison data.
cbMax
[in] Specifies the length of the buffer specified in ppvData.
pcbData
[out] Receives the length of the comparison data.
Return Values
S_OK
The comparison data was successfully returned.
E_OUTOFMEMORY
The buffer contained insufficient space to return the comparison data.
Comments
The IROTData::GetComparisonData method is primarily called by the Running Object Table (ROT). The comparison
data returned by the method is tested for binary equality against the
comparison data returned by another moniker. The pcbData parameter enables the ROT to locate the end of the data returned.
Notes to Implementors
The comparison data that you return must uniquely identify the moniker, while
still being as short as possible. The comparison data should include
information about the internal state of the moniker, as well as the moniker's CLSID. For
example, the comparison data for a file moniker would include the pathname
stored within the moniker as well as the CLSID of the file moniker implementation.
This makes it possible to distinguish two monikers that happen to store similar
state information but are instances of different moniker classes.
The comparison data for a moniker cannot exceed 2048 bytes in length. For
composite monikers, the total length of the comparison data for all of its
components cannot exceed 2048 bytes; consequently, if your moniker can be a component
within a composite moniker, the comparison data you return must be significantly
less than 2048 bytes.
If your comparison data is longer than the value specified by the cbMax parameter, you must return an error. Note that when IROTData::GetComparisionData is called on the components of a composite moniker, the value of cbMax becomes smaller for each moniker in sequence.
See Also
IMoniker, IRunningObjectTable
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|