|
CreateGenericComposite
Performs a generic composition of pmkFirst and pmkRest and returns the resulting moniker.
WINOLEAPI CreateGenericComposite(
LPMONIKER pmkFirst,
| //First moniker
| LPMONIKER pmkRest,
| //Second moniker
| LPMONIKER FAR *ppmkComposite
| //Receives the composite
| );
|
|
Parameters
pmkFirst
Points to the moniker to be composed to the left of the pmkRest moniker. Can point to any kind of moniker, including a generic composite.
pmkRest
Points to the moniker to be composed to the right of the pmkFirst moniker. Can point to any kind of moniker, including a generic composite.
ppmkComposite
Receives an IMoniker pointer to the moniker that is the result of composing pmkFirst and pmkRest. If either pmkFirst or pmkRest are NULL, the returned pointer is the one that is non-NULL. If both pmkFirst and pmkRest are NULL, or if an error occurs, the returned pointer is NULL. If the
returned pointer is non-NULL, the function has called IUnknown::AddRef on the parameter and the caller is responsible for calling IUnknown::Release.
Return Values
S_OK
Indicates the two input monikers were successfully composed.
MK_E_SYNTAX
Indicates the two monikers could not be composed due to an error in the syntax
of a path (for example, if both pmkFirst and pmkRest are file monikers based on absolute paths).
E_OUTOFMEMORY
Indicates insufficient memory.
Comments
You would call this function only if you are writing your own moniker class
(implementing the IMoniker interface). If you want to perform a generic composition in your
implementation of the IMoniker::ComposeWith method, call this function from there.
Composition is the process of joining two monikers together. Sometimes two
monikers of specific classes can be combined; for example, a file moniker
representing an incomplete path and another file moniker representing a relative path
can be combined to form a single file moniker representing the complete path.
This is an example of "non-generic" composition. "Generic" composition, on the
other hand, can connect any two monikers, no matter what their classes. Because a
non-generic composition depends on the class of the monikers involved, it can
be done only in the implementation of the IMoniker::ComposeWith method for a particular class. You can define new types of non-generic
compositions if you write a new moniker class. In contrast, it is only necessary to
call the CreateGenericComposite for generic compositions.
If you are a moniker client and you need to compose two monikers together, you
should call the IMoniker::ComposeWith method. This gives the first moniker a chance to perform a non-generic
composition. The only time you should call CreateGenericComposite is if you are writing a new moniker class. In the implementation of IMoniker::ComposeWith, you should call CreateGenericComposite once you have determined that your implementation cannot do a non-generic
composition.
During the process of composing the two monikers, CreateGenericComposite makes all possible simplifications. Consider the example where pmkFirst is the generic composite moniker, A ( ) B ( ) C, and pmkRest is the generic composite moniker, C (-1) ( ) B (-1) ( ) Z (where C (-1) is the inverse of C). The function first composes C to C (-1) , which composes to nothing. Then it composes B and B (-1) to nothing. Finally, it composes A to Z, and returns a pointer to the generic composite moniker, A ( ) Z.
See Also
IMoniker::ComposeWith, IMoniker - Generic Composite Moniker Implementation
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|