1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 /*=============================================================================
6 **
7 ** Class: IMoniker
8 **
9 **
10 ** Purpose: IMoniker interface definition.
11 **
12 **
13 =============================================================================*/
14 
15 using System;
16 
17 namespace System.Runtime.InteropServices.ComTypes
18 {
19     [Guid("0000000f-0000-0000-C000-000000000046")]
20     [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
21     [ComImport]
22     public interface IMoniker
23     {
24         // IPersist portion
GetClassID(out Guid pClassID)25         void GetClassID(out Guid pClassID);
26 
27         // IPersistStream portion
28         [PreserveSig]
IsDirty()29         int IsDirty();
Load(IStream pStm)30         void Load(IStream pStm);
Save(IStream pStm, [MarshalAs(UnmanagedType.Bool)] bool fClearDirty)31         void Save(IStream pStm, [MarshalAs(UnmanagedType.Bool)] bool fClearDirty);
GetSizeMax(out Int64 pcbSize)32         void GetSizeMax(out Int64 pcbSize);
33 
34         // IMoniker portion
BindToObject(IBindCtx pbc, IMoniker pmkToLeft, [In()] ref Guid riidResult, [MarshalAs(UnmanagedType.Interface)] out Object ppvResult)35         void BindToObject(IBindCtx pbc, IMoniker pmkToLeft, [In()] ref Guid riidResult, [MarshalAs(UnmanagedType.Interface)] out Object ppvResult);
BindToStorage(IBindCtx pbc, IMoniker pmkToLeft, [In()] ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out Object ppvObj)36         void BindToStorage(IBindCtx pbc, IMoniker pmkToLeft, [In()] ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out Object ppvObj);
Reduce(IBindCtx pbc, int dwReduceHowFar, ref IMoniker ppmkToLeft, out IMoniker ppmkReduced)37         void Reduce(IBindCtx pbc, int dwReduceHowFar, ref IMoniker ppmkToLeft, out IMoniker ppmkReduced);
ComposeWith(IMoniker pmkRight, [MarshalAs(UnmanagedType.Bool)] bool fOnlyIfNotGeneric, out IMoniker ppmkComposite)38         void ComposeWith(IMoniker pmkRight, [MarshalAs(UnmanagedType.Bool)] bool fOnlyIfNotGeneric, out IMoniker ppmkComposite);
Enum([MarshalAs(UnmanagedType.Bool)] bool fForward, out IEnumMoniker ppenumMoniker)39         void Enum([MarshalAs(UnmanagedType.Bool)] bool fForward, out IEnumMoniker ppenumMoniker);
40         [PreserveSig]
IsEqual(IMoniker pmkOtherMoniker)41         int IsEqual(IMoniker pmkOtherMoniker);
Hash(out int pdwHash)42         void Hash(out int pdwHash);
43         [PreserveSig]
IsRunning(IBindCtx pbc, IMoniker pmkToLeft, IMoniker pmkNewlyRunning)44         int IsRunning(IBindCtx pbc, IMoniker pmkToLeft, IMoniker pmkNewlyRunning);
GetTimeOfLastChange(IBindCtx pbc, IMoniker pmkToLeft, out FILETIME pFileTime)45         void GetTimeOfLastChange(IBindCtx pbc, IMoniker pmkToLeft, out FILETIME pFileTime);
Inverse(out IMoniker ppmk)46         void Inverse(out IMoniker ppmk);
CommonPrefixWith(IMoniker pmkOther, out IMoniker ppmkPrefix)47         void CommonPrefixWith(IMoniker pmkOther, out IMoniker ppmkPrefix);
RelativePathTo(IMoniker pmkOther, out IMoniker ppmkRelPath)48         void RelativePathTo(IMoniker pmkOther, out IMoniker ppmkRelPath);
GetDisplayName(IBindCtx pbc, IMoniker pmkToLeft, [MarshalAs(UnmanagedType.LPWStr)] out String ppszDisplayName)49         void GetDisplayName(IBindCtx pbc, IMoniker pmkToLeft, [MarshalAs(UnmanagedType.LPWStr)] out String ppszDisplayName);
ParseDisplayName(IBindCtx pbc, IMoniker pmkToLeft, [MarshalAs(UnmanagedType.LPWStr)] String pszDisplayName, out int pchEaten, out IMoniker ppmkOut)50         void ParseDisplayName(IBindCtx pbc, IMoniker pmkToLeft, [MarshalAs(UnmanagedType.LPWStr)] String pszDisplayName, out int pchEaten, out IMoniker ppmkOut);
51         [PreserveSig]
IsSystemMoniker(out int pdwMksys)52         int IsSystemMoniker(out int pdwMksys);
53     }
54 }
55