mirror of https://github.com/dahall/Vanara.git
Added CoClassAttribute to IContextCallback
parent
f45861e1e1
commit
07561a1419
|
@ -6,6 +6,15 @@ namespace Vanara.PInvoke
|
||||||
{
|
{
|
||||||
public static partial class Ole32
|
public static partial class Ole32
|
||||||
{
|
{
|
||||||
|
/// <summary>CLSID_ContextSwitcher</summary>
|
||||||
|
public static readonly Guid CLSID_ContextSwitcher = new Guid(0x0000034e, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
||||||
|
|
||||||
|
/// <summary>IID_ICallbackWithNoReentrancyToApplicationSTA</summary>
|
||||||
|
public static readonly Guid IID_ICallbackWithNoReentrancyToApplicationSTA = new Guid(0x0a299774, 0x3e4e, 0xfc42, 0x1d, 0x9d, 0x72, 0xce, 0xe1, 0x05, 0xca, 0x57);
|
||||||
|
|
||||||
|
/// <summary>IID_IEnterActivityWithNoLock</summary>
|
||||||
|
public static readonly Guid IID_IEnterActivityWithNoLock = new Guid(0xd7174f82, 0x36b8, 0x4aa8, 0x80, 0x0a, 0xe9, 0x63, 0xab, 0x2d, 0xfa, 0xb9);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The function to be called inside the object context if <see cref="IContextCallback.ContextCallback(PFNCONTEXTCALL, in
|
/// The function to be called inside the object context if <see cref="IContextCallback.ContextCallback(PFNCONTEXTCALL, in
|
||||||
/// ComCallData, in Guid, int, IntPtr)"/>.
|
/// ComCallData, in Guid, int, IntPtr)"/>.
|
||||||
|
@ -20,7 +29,7 @@ namespace Vanara.PInvoke
|
||||||
/// <remarks>An instance of this interface for the current context can be obtained using CoGetObjectContext.</remarks>
|
/// <remarks>An instance of this interface for the current context can be obtained using CoGetObjectContext.</remarks>
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/api/ctxtcall/nn-ctxtcall-icontextcallback
|
// https://docs.microsoft.com/en-us/windows/win32/api/ctxtcall/nn-ctxtcall-icontextcallback
|
||||||
[PInvokeData("ctxtcall.h", MSDNShortId = "NN:ctxtcall.IContextCallback")]
|
[PInvokeData("ctxtcall.h", MSDNShortId = "NN:ctxtcall.IContextCallback")]
|
||||||
[ComImport, Guid("000001da-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
[ComImport, Guid("000001da-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), CoClass(typeof(ContextSwitcher))]
|
||||||
public interface IContextCallback
|
public interface IContextCallback
|
||||||
{
|
{
|
||||||
/// <summary>Enters the object context, executes the specified function, and returns.</summary>
|
/// <summary>Enters the object context, executes the specified function, and returns.</summary>
|
||||||
|
@ -88,14 +97,5 @@ namespace Vanara.PInvoke
|
||||||
int iMethod,
|
int iMethod,
|
||||||
IntPtr pUnk = new IntPtr());
|
IntPtr pUnk = new IntPtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>CLSID_ContextSwitcher</summary>
|
|
||||||
public static readonly Guid CLSID_ContextSwitcher = new Guid(0x0000034e, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
|
|
||||||
|
|
||||||
/// <summary>IID_IEnterActivityWithNoLock</summary>
|
|
||||||
public static readonly Guid IID_IEnterActivityWithNoLock = new Guid(0xd7174f82, 0x36b8, 0x4aa8, 0x80, 0x0a, 0xe9, 0x63, 0xab, 0x2d, 0xfa, 0xb9);
|
|
||||||
|
|
||||||
/// <summary>IID_ICallbackWithNoReentrancyToApplicationSTA</summary>
|
|
||||||
public static readonly Guid IID_ICallbackWithNoReentrancyToApplicationSTA = new Guid(0x0a299774, 0x3e4e, 0xfc42, 0x1d, 0x9d, 0x72, 0xce, 0xe1, 0x05, 0xca, 0x57);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue