Microsoft SDK for Java

CommonPrefixWith

This method of the IMoniker interface creates a new moniker based on the common prefix that this moniker (the one comprising the data of this moniker object) shares with another moniker.

Syntax

public IMoniker CommonPrefixWith(IMoniker pmkRight, boolean fOnlyIfNotGeneric);

Return Values

The method supports the standard return value E_OUTOFMEMORY, as well as the following:

S_OK -- A common prefix exists.

MK_S_NOPREFIX -- No common prefix exists.

MK_S_US -- The two monikers are identical.

MK_E_NOTBINDABLE -- This method was called on a relative moniker. It is not meaningful to take the common prefix on a relative moniker.

Parameters

pmkRight Pointer to the IMoniker interface on the moniker to compose onto the end of this moniker.
fOnlyIfNotGeneric If TRUE, the caller requires a non-generic prefix, so the operation should proceed only if pmkRight is a moniker class that this moniker can work with in some way other than forming a generic prefix. If FALSE, the method can create a generic prefix if necessary.

Note   ppmkPrefix is not returned, because this method can return many successful HRESULTs. This requires a throw in Java, which disallows return values.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.