Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild: Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil) Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters - Decal.Core, DecalControls, DecalRender, D3DService Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL Phase 4: DenAgent WinForms tray application Phase 5: WiX installer and build script 25 C# projects building with 0 errors. Native C++ projects require VS 2022 + Windows SDK (x86). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
d1442e3747
1382 changed files with 170725 additions and 0 deletions
8
Managed/Decal.Interop.Inject/Decal.Interop.Inject.csproj
Normal file
8
Managed/Decal.Interop.Inject/Decal.Interop.Inject.csproj
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Decal.Interop.Inject</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Decal.Interop.Core\Decal.Interop.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("50CDFD25-4F3B-4412-96BE-947A6C7B93A2")]
|
||||
[CoClass(typeof(BrushImageClass))]
|
||||
public interface BrushImage : IBrushImage
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("918C0333-5714-4C8D-A95C-2C137B76D364")]
|
||||
public class BrushImageClass : IBrushImage, BrushImage, IImageCache
|
||||
{
|
||||
[DispId(1610678272)]
|
||||
public virtual extern int Color
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual extern tagSIZE Size
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void PatBlt([MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagRECT prcDest, ref tagPOINT ptOrigin);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void StretchBlt([MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagPOINT pptDest, int nWidth, int nStartStretch, int nEndStretch);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Blt(ref tagRECT rcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagPOINT pptDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void StretchBltArea(ref tagRECT prcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagRECT prcDest);
|
||||
}
|
||||
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Button.cs
Normal file
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Button.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(ButtonClass))]
|
||||
[Guid("0F5765A4-9F83-4077-8884-6CBDDCE348F7")]
|
||||
public interface Button : IButton, ICommandEvents_Event
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("C22BF2FC-F144-4D17-9C12-A344F980BB17")]
|
||||
[TypeLibType(2)]
|
||||
[ComSourceInterfaces("Decal.Interop.Inject.ICommandEvents\0\0")]
|
||||
public class ButtonClass : IButton, Button, ICommandEvents_Event, IControl
|
||||
{
|
||||
[DispId(2)]
|
||||
public virtual extern int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(3)]
|
||||
public virtual extern int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(4)]
|
||||
public virtual extern IControl Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(102)]
|
||||
public virtual extern int Matte
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(102)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(102)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual extern int IControl_ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern int IControl_ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern IControl IControl_Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern event ICommandEvents_DestroyEventHandler Destroy;
|
||||
|
||||
public virtual extern event ICommandEvents_HitEventHandler Hit;
|
||||
|
||||
public virtual extern event ICommandEvents_UnhitEventHandler Unhit;
|
||||
|
||||
public virtual extern event ICommandEvents_AcceptedEventHandler Accepted;
|
||||
|
||||
public virtual extern event ICommandEvents_CanceledEventHandler Canceled;
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
public virtual extern void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(101)]
|
||||
public virtual extern void SetImages(int nModule, int nReleased, int nPressed);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(103)]
|
||||
public virtual extern void SetBackground(int nBackground);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void IControl_DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
}
|
||||
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Canvas.cs
Normal file
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Canvas.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("9241862D-BA71-4317-8166-3A3E61CE3E5F")]
|
||||
[CoClass(typeof(CanvasClass))]
|
||||
public interface Canvas : ICanvas
|
||||
{
|
||||
}
|
||||
109
Managed/Decal.Interop.Inject/Decal.Interop.Inject/CanvasClass.cs
Normal file
109
Managed/Decal.Interop.Inject/Decal.Interop.Inject/CanvasClass.cs
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("91892F16-31A3-4E23-9CFD-89A5A5174A59")]
|
||||
[ComConversionLoss]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public class CanvasClass : ICanvas, Canvas
|
||||
{
|
||||
[DispId(1610678280)]
|
||||
public virtual extern bool WasLost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678281)]
|
||||
public virtual extern tagSIZE Size
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678289)]
|
||||
public virtual extern int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern bool PushClipRect(ref tagRECT prc);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void PopClipRect();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[return: ComAliasName("Decal.Interop.Inject.wireHDC")]
|
||||
public virtual extern IntPtr GetDC();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void ReleaseDC();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
public virtual extern object GetSurface(ref Guid riid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Fill(ref tagRECT prc, int nRGB);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Frame(ref tagRECT prc, int nRGB);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern ClipParams GetClipParams();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Blt(ref tagRECT prcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pSrc, ref tagPOINT pptDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern bool HitTest(ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void ToClient([In][Out] ref tagPOINT pt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void ToScreen([In][Out] ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern bool OffsetOrg(ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern bool SetClipRect(ref tagRECT prcClip);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern ushort DownMixRGB(ushort wRed, ushort wGreen, ushort wBlue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
public virtual extern int GetDCLong();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void SetTransparentColor([In] int TransColor);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern int GetTransparentColor();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void StretchBlt(ref tagRECT prcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pSrc, ref tagRECT prcDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void UpdateInternalSurface([MarshalAs(UnmanagedType.IUnknown)] object pNew);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void PushUseColorKeyedBlt([In] bool newVal);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void PopUseColorKeyedBlt();
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct ClipParams
|
||||
{
|
||||
public tagRECT window;
|
||||
|
||||
public tagPOINT org;
|
||||
|
||||
public short visible;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
[Guid("E4CCDC92-8658-4CAA-8955-FB891D5BDCF7")]
|
||||
public interface IBarManager
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void AddBar(int nViewID, [MarshalAs(UnmanagedType.BStr)] string Title, ref ViewParams pParams);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void RemoveBar(int nViewID);
|
||||
|
||||
[DispId(1610678274)]
|
||||
ViewParams Bar
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678276)]
|
||||
string BarTitle
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: MarshalAs(UnmanagedType.BStr)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Reformat();
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[Guid("50CDFD25-4F3B-4412-96BE-947A6C7B93A2")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IBrushImage
|
||||
{
|
||||
[DispId(1610678272)]
|
||||
int Color
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
}
|
||||
61
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IButton.cs
Normal file
61
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IButton.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("0F5765A4-9F83-4077-8884-6CBDDCE348F7")]
|
||||
[TypeLibType(4160)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IButton : IControl
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
new void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
|
||||
[DispId(2)]
|
||||
new int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(3)]
|
||||
new int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(4)]
|
||||
new IControl Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(101)]
|
||||
void SetImages(int nModule, int nReleased, int nPressed);
|
||||
|
||||
[DispId(102)]
|
||||
int Matte
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(102)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(102)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(103)]
|
||||
void SetBackground(int nBackground);
|
||||
}
|
||||
109
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ICanvas.cs
Normal file
109
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ICanvas.cs
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("9241862D-BA71-4317-8166-3A3E61CE3E5F")]
|
||||
[InterfaceType(1)]
|
||||
[ComConversionLoss]
|
||||
public interface ICanvas
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool PushClipRect(ref tagRECT prc);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PopClipRect();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
[return: ComAliasName("Decal.Interop.Inject.wireHDC")]
|
||||
IntPtr GetDC();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void ReleaseDC();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
object GetSurface(ref Guid riid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Fill(ref tagRECT prc, int nRGB);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Frame(ref tagRECT prc, int nRGB);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
ClipParams GetClipParams();
|
||||
|
||||
[DispId(1610678280)]
|
||||
bool WasLost
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678281)]
|
||||
tagSIZE Size
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Blt(ref tagRECT prcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pSrc, ref tagPOINT pptDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool HitTest(ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void ToClient([In][Out] ref tagPOINT pt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void ToScreen([In][Out] ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool OffsetOrg(ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool SetClipRect(ref tagRECT prcClip);
|
||||
|
||||
[DispId(1610678289)]
|
||||
int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
ushort DownMixRGB(ushort wRed, ushort wGreen, ushort wBlue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
int GetDCLong();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void SetTransparentColor([In] int TransColor);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
int GetTransparentColor();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void StretchBlt(ref tagRECT prcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pSrc, ref tagRECT prcDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void UpdateInternalSurface([MarshalAs(UnmanagedType.IUnknown)] object pNew);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PushUseColorKeyedBlt([In] bool newVal);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PopUseColorKeyedBlt();
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("F029D3A1-29AF-45EF-927E-729FEDD87403")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(2)]
|
||||
[TypeLibType(4096)]
|
||||
public interface ICommandEvents
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void Destroy(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
void Hit(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
void Unhit(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
void Accepted(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(5)]
|
||||
void Canceled(int nID);
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void ICommandEvents_AcceptedEventHandler(int nID);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void ICommandEvents_CanceledEventHandler(int nID);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void ICommandEvents_DestroyEventHandler(int nID);
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
[TypeLibType(16)]
|
||||
public interface ICommandEvents_Event
|
||||
{
|
||||
event ICommandEvents_DestroyEventHandler Destroy;
|
||||
|
||||
event ICommandEvents_HitEventHandler Hit;
|
||||
|
||||
event ICommandEvents_UnhitEventHandler Unhit;
|
||||
|
||||
event ICommandEvents_AcceptedEventHandler Accepted;
|
||||
|
||||
event ICommandEvents_CanceledEventHandler Canceled;
|
||||
}
|
||||
|
|
@ -0,0 +1,458 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
internal sealed class ICommandEvents_EventProvider : ICommandEvents_Event, IDisposable
|
||||
{
|
||||
private IConnectionPointContainer m_ConnectionPointContainer;
|
||||
|
||||
private ArrayList m_aEventSinkHelpers;
|
||||
|
||||
private IConnectionPoint m_ConnectionPoint;
|
||||
|
||||
private void Init()
|
||||
{
|
||||
IConnectionPoint ppCP = null;
|
||||
Guid riid = new Guid(new byte[16]
|
||||
{
|
||||
161, 211, 41, 240, 175, 41, 239, 69, 146, 126,
|
||||
114, 159, 237, 216, 116, 3
|
||||
});
|
||||
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out ppCP);
|
||||
m_ConnectionPoint = ppCP;
|
||||
m_aEventSinkHelpers = new ArrayList();
|
||||
}
|
||||
|
||||
event ICommandEvents_DestroyEventHandler ICommandEvents_Event.Destroy
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = new ICommandEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(commandEvents_SinkHelper, out pdwCookie);
|
||||
commandEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
commandEvents_SinkHelper.m_DestroyDelegate = value;
|
||||
m_aEventSinkHelpers.Add(commandEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = (ICommandEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (commandEvents_SinkHelper.m_DestroyDelegate != null && ((commandEvents_SinkHelper.m_DestroyDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(commandEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event ICommandEvents_HitEventHandler ICommandEvents_Event.Hit
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = new ICommandEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(commandEvents_SinkHelper, out pdwCookie);
|
||||
commandEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
commandEvents_SinkHelper.m_HitDelegate = value;
|
||||
m_aEventSinkHelpers.Add(commandEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = (ICommandEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (commandEvents_SinkHelper.m_HitDelegate != null && ((commandEvents_SinkHelper.m_HitDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(commandEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event ICommandEvents_UnhitEventHandler ICommandEvents_Event.Unhit
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = new ICommandEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(commandEvents_SinkHelper, out pdwCookie);
|
||||
commandEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
commandEvents_SinkHelper.m_UnhitDelegate = value;
|
||||
m_aEventSinkHelpers.Add(commandEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = (ICommandEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (commandEvents_SinkHelper.m_UnhitDelegate != null && ((commandEvents_SinkHelper.m_UnhitDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(commandEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event ICommandEvents_AcceptedEventHandler ICommandEvents_Event.Accepted
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = new ICommandEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(commandEvents_SinkHelper, out pdwCookie);
|
||||
commandEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
commandEvents_SinkHelper.m_AcceptedDelegate = value;
|
||||
m_aEventSinkHelpers.Add(commandEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = (ICommandEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (commandEvents_SinkHelper.m_AcceptedDelegate != null && ((commandEvents_SinkHelper.m_AcceptedDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(commandEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event ICommandEvents_CanceledEventHandler ICommandEvents_Event.Canceled
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = new ICommandEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(commandEvents_SinkHelper, out pdwCookie);
|
||||
commandEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
commandEvents_SinkHelper.m_CanceledDelegate = value;
|
||||
m_aEventSinkHelpers.Add(commandEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = (ICommandEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (commandEvents_SinkHelper.m_CanceledDelegate != null && ((commandEvents_SinkHelper.m_CanceledDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(commandEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public ICommandEvents_EventProvider(object P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_ConnectionPointContainer = (IConnectionPointContainer)P_0;
|
||||
}
|
||||
|
||||
public void Finalize()
|
||||
{
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 < count)
|
||||
{
|
||||
do
|
||||
{
|
||||
ICommandEvents_SinkHelper commandEvents_SinkHelper = (ICommandEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
m_ConnectionPoint.Unadvise(commandEvents_SinkHelper.m_dwCookie);
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
Finalize();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void ICommandEvents_HitEventHandler(int nID);
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[TypeLibType(TypeLibTypeFlags.FHidden)]
|
||||
public sealed class ICommandEvents_SinkHelper : ICommandEvents
|
||||
{
|
||||
public ICommandEvents_DestroyEventHandler m_DestroyDelegate;
|
||||
|
||||
public ICommandEvents_HitEventHandler m_HitDelegate;
|
||||
|
||||
public ICommandEvents_UnhitEventHandler m_UnhitDelegate;
|
||||
|
||||
public ICommandEvents_AcceptedEventHandler m_AcceptedDelegate;
|
||||
|
||||
public ICommandEvents_CanceledEventHandler m_CanceledDelegate;
|
||||
|
||||
public int m_dwCookie;
|
||||
|
||||
public void Destroy(int P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_DestroyDelegate != null)
|
||||
{
|
||||
m_DestroyDelegate(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Hit(int P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_HitDelegate != null)
|
||||
{
|
||||
m_HitDelegate(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unhit(int P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_UnhitDelegate != null)
|
||||
{
|
||||
m_UnhitDelegate(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Accepted(int P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_AcceptedDelegate != null)
|
||||
{
|
||||
m_AcceptedDelegate(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Canceled(int P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_CanceledDelegate != null)
|
||||
{
|
||||
m_CanceledDelegate(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
internal ICommandEvents_SinkHelper()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_dwCookie = 0;
|
||||
m_DestroyDelegate = null;
|
||||
m_HitDelegate = null;
|
||||
m_UnhitDelegate = null;
|
||||
m_AcceptedDelegate = null;
|
||||
m_CanceledDelegate = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void ICommandEvents_UnhitEventHandler(int nID);
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("996B377C-1953-4DB1-AAC1-157F72592D3E")]
|
||||
public interface IControl
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
|
||||
[DispId(2)]
|
||||
int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(3)]
|
||||
int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(4)]
|
||||
IControl Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(2)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("2FEBCBC3-488C-444F-AD08-5D3097D2D1ED")]
|
||||
[TypeLibType(4096)]
|
||||
public interface IControlEvents
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void Destroy(int nID);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4096)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("12ECCB0F-36A6-451C-B086-1306B74AAEC2")]
|
||||
public interface IFontCache
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void DecalDrawText(ref tagPOINT pt, [MarshalAs(UnmanagedType.BStr)] string szText, int clr, [MarshalAs(UnmanagedType.Interface)] Canvas pTarget);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
tagSIZE MeasureText([MarshalAs(UnmanagedType.BStr)] string szText);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
int HitTest([MarshalAs(UnmanagedType.BStr)] string szText, int nPos);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void DecalDrawTextEx(ref tagPOINT pt, [MarshalAs(UnmanagedType.BStr)] string szText, int clr1, int clr2, int flags, [MarshalAs(UnmanagedType.Interface)] Canvas pTarget);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[Guid("DEDCD5AA-F6CA-4DA5-A657-E82F126ABBCD")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IIconCache
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void DrawIcon(ref tagPOINT ppt, int nFile, int nModule, [MarshalAs(UnmanagedType.Interface)] Canvas pTarget);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void DrawIconEx(ref tagPOINT ppt, int nFile, int nModule, [MarshalAs(UnmanagedType.Interface)] Canvas pTarget, int lColor);
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("BE566CEC-6881-481C-A146-9F5A32576BE6")]
|
||||
[TypeLibType(4096)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IImageCache
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PatBlt([MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagRECT prcDest, ref tagPOINT ptOrigin);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void StretchBlt([MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagPOINT pptDest, int nWidth, int nStartStretch, int nEndStretch);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Blt(ref tagRECT rcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagPOINT pptDest);
|
||||
|
||||
[DispId(1610743811)]
|
||||
tagSIZE Size
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void StretchBltArea(ref tagRECT prcSrc, [MarshalAs(UnmanagedType.Interface)] Canvas pDest, ref tagRECT prcDest);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("E288C465-2DD6-4FCD-95E2-5BBC1A1D2D32")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[TypeLibType(4160)]
|
||||
public interface IInputNotify
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void NotifyBegin();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
void NotifyEnd();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
void SetMousePos(int nX, int nY);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(4)]
|
||||
void NotifyPause();
|
||||
}
|
||||
33
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ILayer.cs
Normal file
33
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ILayer.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("0D63504F-DEEF-4A2D-9742-28DD1BADDA7C")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
public interface ILayer
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void LayerCreate([MarshalAs(UnmanagedType.Interface)] Layer pSite);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void LayerDestroy();
|
||||
|
||||
[DispId(1610678274)]
|
||||
tagRECT Position
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: Out]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Invalidate();
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("7500929F-4251-4373-B978-286A8A8BECED")]
|
||||
[InterfaceType(1)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface ILayerKeyboard
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void KeyboardChar(ref KeyState pKS);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void KeyboardEndCapture(bool bCancel);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void KeyboardEvent(int nMsg, int wParam, int lParam);
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("5014E0B2-9156-412C-946D-9D4BAA9F4C51")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
public interface ILayerMouse
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseEnter(ref MouseState pMouse);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseExit(ref MouseState pMouse);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseDown(ref MouseState pMouse);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseUp(ref MouseState pMouse);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseMove(ref MouseState pMouse);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseDblClk(ref MouseState pMouse);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void MouseEvent(int nMsg, int wParam, int lParam);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("22072A97-E5E6-4D91-A344-807235BFA5D8")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
public interface ILayerPopup
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool PopupCancel(ref MouseState pMouse);
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
[Guid("D1C71B85-62C2-42A3-AE2E-4BF5A6BE1784")]
|
||||
public interface ILayerRender
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PreRender();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void render([MarshalAs(UnmanagedType.Interface)] Canvas pDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Reformat();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool AdjustRenderArea([MarshalAs(UnmanagedType.Interface)] Canvas pDest);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool HitTest(ref tagPOINT pt);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[Guid("829E0FB2-D0B5-4814-BCF9-6ECFA06C9AED")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface ILayerSchema
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void SchemaLoad([MarshalAs(UnmanagedType.Interface)] View pView, [MarshalAs(UnmanagedType.IUnknown)] object pXMLSchema);
|
||||
}
|
||||
119
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ILayerSite.cs
Normal file
119
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ILayerSite.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("5B7E9D99-BB3A-475D-842D-43EBEA8284EA")]
|
||||
[InterfaceType(1)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface ILayerSite
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Destroy();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void CreateChild(ref LayerParams @params, [MarshalAs(UnmanagedType.Interface)] ILayer pSink);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void GetSink(ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] ref object ppvItf);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Invalidate();
|
||||
|
||||
[DispId(1610678276)]
|
||||
PluginSite PluginSite
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Reformat();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void GetParentSink(ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] ref object ppvItf);
|
||||
|
||||
[DispId(1610678279)]
|
||||
tagRECT Position
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678281)]
|
||||
int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678282)]
|
||||
int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678283)]
|
||||
Layer Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void CaptureKeyboard();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool IsChild([MarshalAs(UnmanagedType.Interface)] Layer pSite, bool bTestUnclipped = false);
|
||||
|
||||
[DispId(1610678286)]
|
||||
bool Popup
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678287)]
|
||||
tagRECT ScreenPosition
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void StartTimer(int nID, int nInterval);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void EndTimer(int nID);
|
||||
|
||||
[DispId(1610678290)]
|
||||
bool Transparent
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678292)]
|
||||
int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void moveToFront();
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("5D6B8A1B-321A-479F-9347-55725BDA3DA9")]
|
||||
[InterfaceType(1)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface ILayerTimer
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool TimerTimeout(int nID, int nInterval, int nReps);
|
||||
}
|
||||
66
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPager.cs
Normal file
66
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPager.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("BD9FC464-C0D8-4823-8255-E818F8836B08")]
|
||||
[TypeLibType(4096)]
|
||||
public interface IPager : IControl
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
new void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
|
||||
[DispId(2)]
|
||||
new int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(3)]
|
||||
new int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(4)]
|
||||
new IControl Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void FinishCommand();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void ScrollTo(ref tagPOINT ppt);
|
||||
|
||||
[DispId(1610809346)]
|
||||
int Command
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809348)]
|
||||
tagPOINT Offset
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void CreateClient([MarshalAs(UnmanagedType.Interface)] ILayer pLayer);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4096)]
|
||||
[InterfaceType(2)]
|
||||
[Guid("7499EB61-6992-4E21-8A55-CF44D44C0A07")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IPagerEvents
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void Destroy(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(6)]
|
||||
void Change(int nID, int nCommand, int nX, int nY);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(7)]
|
||||
bool GetNextPosition(int nID, int nCommand, [In][Out] ref int nX, [In][Out] ref int nY);
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void IPagerEvents_ChangeEventHandler(int nID, int nCommand, int nX, int nY);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void IPagerEvents_DestroyEventHandler(int nID);
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[TypeLibType(16)]
|
||||
[ComVisible(false)]
|
||||
public interface IPagerEvents_Event
|
||||
{
|
||||
event IPagerEvents_DestroyEventHandler Destroy;
|
||||
|
||||
event IPagerEvents_ChangeEventHandler Change;
|
||||
|
||||
event IPagerEvents_GetNextPositionEventHandler GetNextPosition;
|
||||
}
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
internal sealed class IPagerEvents_EventProvider : IPagerEvents_Event, IDisposable
|
||||
{
|
||||
private IConnectionPointContainer m_ConnectionPointContainer;
|
||||
|
||||
private ArrayList m_aEventSinkHelpers;
|
||||
|
||||
private IConnectionPoint m_ConnectionPoint;
|
||||
|
||||
private void Init()
|
||||
{
|
||||
IConnectionPoint ppCP = null;
|
||||
Guid riid = new Guid(new byte[16]
|
||||
{
|
||||
97, 235, 153, 116, 146, 105, 33, 78, 138, 85,
|
||||
207, 68, 212, 76, 10, 7
|
||||
});
|
||||
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out ppCP);
|
||||
m_ConnectionPoint = ppCP;
|
||||
m_aEventSinkHelpers = new ArrayList();
|
||||
}
|
||||
|
||||
event IPagerEvents_DestroyEventHandler IPagerEvents_Event.Destroy
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = new IPagerEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(pagerEvents_SinkHelper, out pdwCookie);
|
||||
pagerEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
pagerEvents_SinkHelper.m_DestroyDelegate = value;
|
||||
m_aEventSinkHelpers.Add(pagerEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = (IPagerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (pagerEvents_SinkHelper.m_DestroyDelegate != null && ((pagerEvents_SinkHelper.m_DestroyDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(pagerEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event IPagerEvents_ChangeEventHandler IPagerEvents_Event.Change
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = new IPagerEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(pagerEvents_SinkHelper, out pdwCookie);
|
||||
pagerEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
pagerEvents_SinkHelper.m_ChangeDelegate = value;
|
||||
m_aEventSinkHelpers.Add(pagerEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = (IPagerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (pagerEvents_SinkHelper.m_ChangeDelegate != null && ((pagerEvents_SinkHelper.m_ChangeDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(pagerEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event IPagerEvents_GetNextPositionEventHandler IPagerEvents_Event.GetNextPosition
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = new IPagerEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(pagerEvents_SinkHelper, out pdwCookie);
|
||||
pagerEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
pagerEvents_SinkHelper.m_GetNextPositionDelegate = value;
|
||||
m_aEventSinkHelpers.Add(pagerEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = (IPagerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (pagerEvents_SinkHelper.m_GetNextPositionDelegate != null && ((pagerEvents_SinkHelper.m_GetNextPositionDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(pagerEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IPagerEvents_EventProvider(object P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_ConnectionPointContainer = (IConnectionPointContainer)P_0;
|
||||
}
|
||||
|
||||
public void Finalize()
|
||||
{
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 < count)
|
||||
{
|
||||
do
|
||||
{
|
||||
IPagerEvents_SinkHelper pagerEvents_SinkHelper = (IPagerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
m_ConnectionPoint.Unadvise(pagerEvents_SinkHelper.m_dwCookie);
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
Finalize();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate bool IPagerEvents_GetNextPositionEventHandler(int nID, int nCommand, [In][Out] ref int nX, [In][Out] ref int nY);
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[TypeLibType(TypeLibTypeFlags.FHidden)]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
public sealed class IPagerEvents_SinkHelper : IPagerEvents
|
||||
{
|
||||
public IPagerEvents_DestroyEventHandler m_DestroyDelegate;
|
||||
|
||||
public IPagerEvents_ChangeEventHandler m_ChangeDelegate;
|
||||
|
||||
public IPagerEvents_GetNextPositionEventHandler m_GetNextPositionDelegate;
|
||||
|
||||
public int m_dwCookie;
|
||||
|
||||
public void Destroy(int P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_DestroyDelegate != null)
|
||||
{
|
||||
m_DestroyDelegate(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Change(int P_0, int P_1, int P_2, int P_3)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_ChangeDelegate != null)
|
||||
{
|
||||
m_ChangeDelegate(P_0, P_1, P_2, P_3);
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetNextPosition(int P_0, int P_1, ref int P_2, ref int P_3)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_GetNextPositionDelegate != null)
|
||||
{
|
||||
return m_GetNextPositionDelegate(P_0, P_1, ref P_2, ref P_3);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
internal IPagerEvents_SinkHelper()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_dwCookie = 0;
|
||||
m_DestroyDelegate = null;
|
||||
m_ChangeDelegate = null;
|
||||
m_GetNextPositionDelegate = null;
|
||||
}
|
||||
}
|
||||
66
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPanel.cs
Normal file
66
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPanel.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("2B52B5CB-9E10-4238-8F62-A501406E3EAB")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
[ComConversionLoss]
|
||||
public interface IPanel
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void AddView(int nViewID, [MarshalAs(UnmanagedType.Interface)] ILayer pLayer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void ActivateView(int nViewID, ref ViewParams pParams, ref int pVal);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void RemoveView(int nViewID);
|
||||
|
||||
[DispId(1610678275)]
|
||||
int ActiveView
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void LoadView(int nViewID, [MarshalAs(UnmanagedType.Interface)] View pView, [MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Deactivate();
|
||||
|
||||
[DispId(1610678278)]
|
||||
IPanelSink Sink
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.Interface)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void LoadViewEx(int nViewID, [MarshalAs(UnmanagedType.Interface)] View pView, [MarshalAs(UnmanagedType.IUnknown)] object pSchema, int lViewFlags);
|
||||
|
||||
[DispId(1610678280)]
|
||||
bool Transparent
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678282)]
|
||||
IntPtr @params
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("85D70924-917D-41BB-995D-C40E6AB21C71")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
public interface IPanelSink
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PanelDeactivate(int nViewID);
|
||||
}
|
||||
26
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPlugin.cs
Normal file
26
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPlugin.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("0B43A5E9-2ED4-4A0C-AED1-552B9E3A23B3")]
|
||||
public interface IPlugin
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Initialize([MarshalAs(UnmanagedType.Interface)] PluginSite pSite, int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void Terminate();
|
||||
|
||||
[DispId(1610678274)]
|
||||
string FriendlyName
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("93D72C31-CBC3-4471-AE4B-395FBB4D3B45")]
|
||||
[InterfaceType(1)]
|
||||
public interface IPluginAdapterV1
|
||||
{
|
||||
}
|
||||
151
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPluginSite.cs
Normal file
151
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IPluginSite.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("E9D10D39-63A9-478B-81FE-0045BA0593EF")]
|
||||
public interface IPluginSite
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
void UnloadPlugin(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
Canvas GetPrimarySurface();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
object Get3DDevice(ref Guid ifaceid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IImageCache LoadBitmapFile([MarshalAs(UnmanagedType.BStr)] string strFilename);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IIconCache GetIconCache(ref tagSIZE psz);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IImageCache LoadBitmapPortal(int nFile);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IFontCache DecalCreateFont([MarshalAs(UnmanagedType.BStr)] string szFaceName, int nHeight, int dwFlags);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void GetScreenSize(ref tagSIZE sz);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
Canvas CreateCanvas(ref tagSIZE psz);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
View CreateView([MarshalAs(UnmanagedType.BStr)] string Title, ref ViewParams pParams, [MarshalAs(UnmanagedType.Interface)] ILayer pLayer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
View LoadView([MarshalAs(UnmanagedType.BStr)] string strSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IImageCache CreateBrushImage(int nColor);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IImageCache LoadImageSchema([MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
IFontCache CreateFontSchema(int nDefHeight, int nDefOptions, [MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
int LoadResourceModule([MarshalAs(UnmanagedType.BStr)] string strLibrary);
|
||||
|
||||
[DispId(1610678287)]
|
||||
string ResourcePath
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678288)]
|
||||
object Plugin
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IDispatch)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678289)]
|
||||
object NetworkFilter
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IDispatch)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
View LoadViewObject([MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[DispId(1610678291)]
|
||||
int HWND
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678292)]
|
||||
bool Focus
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678293)]
|
||||
int OldWndProc
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
int QueryKeyboardMap([In][MarshalAs(UnmanagedType.BStr)] string bstrName);
|
||||
|
||||
[DispId(1610678295)]
|
||||
DecalCore Decal
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678296)]
|
||||
ACHooks Hooks
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void RedrawBar();
|
||||
|
||||
[DispId(1610678298)]
|
||||
string FontName
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
[Guid("E4FBF228-D2AA-4298-96EC-6D89A1960731")]
|
||||
public interface IRender3DSink
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PreBeginScene([MarshalAs(UnmanagedType.IUnknown)] object pD3D);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PostBeginScene([MarshalAs(UnmanagedType.IUnknown)] object pD3D);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PreEndScene([MarshalAs(UnmanagedType.IUnknown)] object pD3D);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void PostEndScene([MarshalAs(UnmanagedType.IUnknown)] object pD3D);
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[InterfaceType(1)]
|
||||
[Guid("D3006096-B293-47F5-9377-C12DEF5C1D34")]
|
||||
public interface IRootLayer
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
View CreateView([MarshalAs(UnmanagedType.BStr)] string Title, ref ViewParams pParams, [MarshalAs(UnmanagedType.Interface)] ILayer pLayer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void SelectBar(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
View LoadView([MarshalAs(UnmanagedType.BStr)] string strXML);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
View LoadViewObject([MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[Guid("4A2D87CD-BFB4-4723-B959-FFF3FDD49278")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface ISimpleBar
|
||||
{
|
||||
[DispId(1610678272)]
|
||||
int RenderWidth
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678273)]
|
||||
ViewParams @params
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678275)]
|
||||
string Title
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.BStr)]
|
||||
set;
|
||||
}
|
||||
}
|
||||
103
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IView.cs
Normal file
103
Managed/Decal.Interop.Inject/Decal.Interop.Inject/IView.cs
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4096)]
|
||||
[Guid("A2AE18B7-85C9-451C-8CC3-D0FFE6B86EEB")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IView : IViewDisp
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
new IControl Control
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.Interface)]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743809)]
|
||||
new object ControlEx
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610743811)]
|
||||
new string Title
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.BStr)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
new void Alert();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
new void SetIcon(int icon, [Optional][MarshalAs(UnmanagedType.Struct)] object iconLibrary);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
new void Activate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
new void Deactivate();
|
||||
|
||||
[DispId(1610743817)]
|
||||
new tagRECT Position
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: Out]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
int LoadControl([MarshalAs(UnmanagedType.Interface)] Layer pParent, int nID, [MarshalAs(UnmanagedType.IUnknown)] object pXMLSource);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void LoadSchema([MarshalAs(UnmanagedType.BStr)] string strXMLSchema);
|
||||
|
||||
[DispId(1610809347)]
|
||||
bool Activated
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809349)]
|
||||
bool Transparent
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809346)]
|
||||
int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("F3B54A0C-61B9-4B7A-9FD8-82B0477FB7D9")]
|
||||
[TypeLibType(4160)]
|
||||
public interface IViewDisp
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
IControl Control
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.Interface)]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743809)]
|
||||
object ControlEx
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610743811)]
|
||||
string Title
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.BStr)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
void Alert();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
void SetIcon(int icon, [Optional][MarshalAs(UnmanagedType.Struct)] object iconLibrary);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
void Activate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
void Deactivate();
|
||||
|
||||
[DispId(1610743817)]
|
||||
tagRECT Position
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743817)]
|
||||
[param: In]
|
||||
[param: Out]
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[Guid("4B7B19D5-61A2-4AB0-8B1B-381A303A937F")]
|
||||
[TypeLibType(4096)]
|
||||
[InterfaceType(2)]
|
||||
public interface IViewEvents
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(8)]
|
||||
void OnActivate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(9)]
|
||||
void OnDeactivate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(13)]
|
||||
bool Size();
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(14)]
|
||||
void Sizing([In] int left, int top, int width, int height);
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[TypeLibType(16)]
|
||||
[ComVisible(false)]
|
||||
public interface IViewEvents_Event
|
||||
{
|
||||
event IViewEvents_OnActivateEventHandler OnActivate;
|
||||
|
||||
event IViewEvents_OnDeactivateEventHandler OnDeactivate;
|
||||
|
||||
event IViewEvents_SizeEventHandler Size;
|
||||
|
||||
event IViewEvents_SizingEventHandler Sizing;
|
||||
}
|
||||
|
|
@ -0,0 +1,382 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
internal sealed class IViewEvents_EventProvider : IViewEvents_Event, IDisposable
|
||||
{
|
||||
private IConnectionPointContainer m_ConnectionPointContainer;
|
||||
|
||||
private ArrayList m_aEventSinkHelpers;
|
||||
|
||||
private IConnectionPoint m_ConnectionPoint;
|
||||
|
||||
private void Init()
|
||||
{
|
||||
IConnectionPoint ppCP = null;
|
||||
Guid riid = new Guid(new byte[16]
|
||||
{
|
||||
213, 25, 123, 75, 162, 97, 176, 74, 139, 27,
|
||||
56, 26, 48, 58, 147, 127
|
||||
});
|
||||
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out ppCP);
|
||||
m_ConnectionPoint = ppCP;
|
||||
m_aEventSinkHelpers = new ArrayList();
|
||||
}
|
||||
|
||||
event IViewEvents_OnActivateEventHandler IViewEvents_Event.OnActivate
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = new IViewEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(viewEvents_SinkHelper, out pdwCookie);
|
||||
viewEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
viewEvents_SinkHelper.m_OnActivateDelegate = value;
|
||||
m_aEventSinkHelpers.Add(viewEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = (IViewEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (viewEvents_SinkHelper.m_OnActivateDelegate != null && ((viewEvents_SinkHelper.m_OnActivateDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(viewEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event IViewEvents_OnDeactivateEventHandler IViewEvents_Event.OnDeactivate
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = new IViewEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(viewEvents_SinkHelper, out pdwCookie);
|
||||
viewEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
viewEvents_SinkHelper.m_OnDeactivateDelegate = value;
|
||||
m_aEventSinkHelpers.Add(viewEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = (IViewEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (viewEvents_SinkHelper.m_OnDeactivateDelegate != null && ((viewEvents_SinkHelper.m_OnDeactivateDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(viewEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event IViewEvents_SizeEventHandler IViewEvents_Event.Size
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = new IViewEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(viewEvents_SinkHelper, out pdwCookie);
|
||||
viewEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
viewEvents_SinkHelper.m_SizeDelegate = value;
|
||||
m_aEventSinkHelpers.Add(viewEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = (IViewEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (viewEvents_SinkHelper.m_SizeDelegate != null && ((viewEvents_SinkHelper.m_SizeDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(viewEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
event IViewEvents_SizingEventHandler IViewEvents_Event.Sizing
|
||||
{
|
||||
add
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = new IViewEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(viewEvents_SinkHelper, out pdwCookie);
|
||||
viewEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
viewEvents_SinkHelper.m_SizingDelegate = value;
|
||||
m_aEventSinkHelpers.Add(viewEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
remove
|
||||
{
|
||||
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = (IViewEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (viewEvents_SinkHelper.m_SizingDelegate != null && ((viewEvents_SinkHelper.m_SizingDelegate.Equals(value) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(viewEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IViewEvents_EventProvider(object P_0)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_ConnectionPointContainer = (IConnectionPointContainer)P_0;
|
||||
}
|
||||
|
||||
public void Finalize()
|
||||
{
|
||||
bool lockTaken = default(bool);
|
||||
try
|
||||
{
|
||||
Monitor.Enter(this, ref lockTaken);
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 < count)
|
||||
{
|
||||
do
|
||||
{
|
||||
IViewEvents_SinkHelper viewEvents_SinkHelper = (IViewEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
m_ConnectionPoint.Unadvise(viewEvents_SinkHelper.m_dwCookie);
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (lockTaken)
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
Finalize();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void IViewEvents_OnActivateEventHandler();
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void IViewEvents_OnDeactivateEventHandler();
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[TypeLibType(TypeLibTypeFlags.FHidden)]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
public sealed class IViewEvents_SinkHelper : IViewEvents
|
||||
{
|
||||
public IViewEvents_OnActivateEventHandler m_OnActivateDelegate;
|
||||
|
||||
public IViewEvents_OnDeactivateEventHandler m_OnDeactivateDelegate;
|
||||
|
||||
public IViewEvents_SizeEventHandler m_SizeDelegate;
|
||||
|
||||
public IViewEvents_SizingEventHandler m_SizingDelegate;
|
||||
|
||||
public int m_dwCookie;
|
||||
|
||||
public void OnActivate()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_OnActivateDelegate != null)
|
||||
{
|
||||
m_OnActivateDelegate();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDeactivate()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_OnDeactivateDelegate != null)
|
||||
{
|
||||
m_OnDeactivateDelegate();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Size()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_SizeDelegate != null)
|
||||
{
|
||||
return m_SizeDelegate();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Sizing(int P_0, int P_1, int P_2, int P_3)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_SizingDelegate != null)
|
||||
{
|
||||
m_SizingDelegate(P_0, P_1, P_2, P_3);
|
||||
}
|
||||
}
|
||||
|
||||
internal IViewEvents_SinkHelper()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_dwCookie = 0;
|
||||
m_OnActivateDelegate = null;
|
||||
m_OnDeactivateDelegate = null;
|
||||
m_SizeDelegate = null;
|
||||
m_SizingDelegate = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate bool IViewEvents_SizeEventHandler();
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComVisible(false)]
|
||||
public delegate void IViewEvents_SizingEventHandler([In] int left, int top, int width, int height);
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[InterfaceType(1)]
|
||||
[Guid("A68BE455-C241-49C5-9F8A-070E4CBE430F")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public interface IWindowsMessageSink
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
bool WindowMessage(int HWND, short uMsg, int wParam, int lParam);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
void WindowMessageEnd();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("47761792-2520-4802-8548-5CA580697614")]
|
||||
[CoClass(typeof(InjectServiceClass))]
|
||||
public interface InjectService : IInjectService
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("FEFE5CAB-10E4-404F-AD4D-184BCB506099")]
|
||||
[TypeLibType(2)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public class InjectServiceClass : IInjectService, InjectService
|
||||
{
|
||||
[DispId(1)]
|
||||
public virtual extern object Site
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void InitPlugin([MarshalAs(UnmanagedType.IUnknown)] object pUnk);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 2)]
|
||||
public struct KeyState
|
||||
{
|
||||
public short vkey;
|
||||
|
||||
public short ctrl;
|
||||
|
||||
public short shift;
|
||||
}
|
||||
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Layer.cs
Normal file
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Layer.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(LayerClass))]
|
||||
[Guid("5B7E9D99-BB3A-475D-842D-43EBEA8284EA")]
|
||||
public interface Layer : ILayerSite
|
||||
{
|
||||
}
|
||||
119
Managed/Decal.Interop.Inject/Decal.Interop.Inject/LayerClass.cs
Normal file
119
Managed/Decal.Interop.Inject/Decal.Interop.Inject/LayerClass.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("6FEA2219-7438-4F76-8165-C47AA060D811")]
|
||||
public class LayerClass : ILayerSite, Layer
|
||||
{
|
||||
[DispId(1610678276)]
|
||||
public virtual extern PluginSite PluginSite
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678279)]
|
||||
public virtual extern tagRECT Position
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678281)]
|
||||
public virtual extern int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678282)]
|
||||
public virtual extern int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678283)]
|
||||
public virtual extern Layer Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678286)]
|
||||
public virtual extern bool Popup
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678287)]
|
||||
public virtual extern tagRECT ScreenPosition
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678290)]
|
||||
public virtual extern bool Transparent
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610678292)]
|
||||
public virtual extern int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
set;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Destroy();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void CreateChild(ref LayerParams @params, [MarshalAs(UnmanagedType.Interface)] ILayer pSink);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void GetSink(ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] ref object ppvItf);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Invalidate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Reformat();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void GetParentSink(ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] ref object ppvItf);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void CaptureKeyboard();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern bool IsChild([MarshalAs(UnmanagedType.Interface)] Layer pSite, bool bTestUnclipped = false);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void StartTimer(int nID, int nInterval);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void EndTimer(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void moveToFront();
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct LayerParams
|
||||
{
|
||||
public int ID;
|
||||
|
||||
public tagRECT pos;
|
||||
|
||||
public int render;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct MouseState
|
||||
{
|
||||
[MarshalAs(UnmanagedType.Interface)]
|
||||
public ILayer over;
|
||||
|
||||
public tagPOINT screen;
|
||||
|
||||
public tagPOINT client;
|
||||
|
||||
public short ctrl;
|
||||
|
||||
public short shift;
|
||||
}
|
||||
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Pager.cs
Normal file
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/Pager.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(PagerClass))]
|
||||
[Guid("BD9FC464-C0D8-4823-8255-E818F8836B08")]
|
||||
public interface Pager : IPager, IPagerEvents_Event
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("C79E2F76-06F8-4CD0-A613-4829237D297D")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[ComSourceInterfaces("Decal.Interop.Inject.IPagerEvents\0\0")]
|
||||
[TypeLibType(2)]
|
||||
public class PagerClass : IPager, Pager, IPagerEvents_Event, IControl
|
||||
{
|
||||
[DispId(2)]
|
||||
public virtual extern int ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(3)]
|
||||
public virtual extern int ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(4)]
|
||||
public virtual extern IControl Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610809346)]
|
||||
public virtual extern int Command
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809348)]
|
||||
public virtual extern tagPOINT Offset
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual extern int IControl_ID
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern int IControl_ChildCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern IControl IControl_Child
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
public virtual extern event IPagerEvents_DestroyEventHandler Destroy;
|
||||
|
||||
public virtual extern event IPagerEvents_ChangeEventHandler Change;
|
||||
|
||||
public virtual extern event IPagerEvents_GetNextPositionEventHandler GetNextPosition;
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void FinishCommand();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void ScrollTo(ref tagPOINT ppt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void CreateClient([MarshalAs(UnmanagedType.Interface)] ILayer pLayer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void IControl_DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(PluginAdapterV1Class))]
|
||||
[Guid("93D72C31-CBC3-4471-AE4B-395FBB4D3B45")]
|
||||
public interface PluginAdapterV1 : IPluginAdapterV1
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("3D837F6E-B5CA-4604-885F-7AB45FCFA62A")]
|
||||
[TypeLibType(2)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public class PluginAdapterV1Class : IPluginAdapterV1, PluginAdapterV1
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[CoClass(typeof(PluginSiteClass))]
|
||||
[Guid("E9D10D39-63A9-478B-81FE-0045BA0593EF")]
|
||||
public interface PluginSite : IPluginSite
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("B2FBD583-B64C-4DFC-BAAA-34B8C21482F8")]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public class PluginSiteClass : IPluginSite, PluginSite
|
||||
{
|
||||
[DispId(1610678287)]
|
||||
public virtual extern string ResourcePath
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678288)]
|
||||
public virtual extern object Plugin
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IDispatch)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678289)]
|
||||
public virtual extern object NetworkFilter
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IDispatch)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678291)]
|
||||
public virtual extern int HWND
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678292)]
|
||||
public virtual extern bool Focus
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678293)]
|
||||
public virtual extern int OldWndProc
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678295)]
|
||||
public virtual extern DecalCore Decal
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678296)]
|
||||
public virtual extern ACHooks Hooks
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610678298)]
|
||||
public virtual extern string FontName
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[TypeLibFunc(64)]
|
||||
public virtual extern void UnloadPlugin(int nID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern Canvas GetPrimarySurface();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
public virtual extern object Get3DDevice(ref Guid ifaceid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IImageCache LoadBitmapFile([MarshalAs(UnmanagedType.BStr)] string strFilename);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IIconCache GetIconCache(ref tagSIZE psz);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IImageCache LoadBitmapPortal(int nFile);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IFontCache DecalCreateFont([MarshalAs(UnmanagedType.BStr)] string szFaceName, int nHeight, int dwFlags);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void GetScreenSize(ref tagSIZE sz);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern Canvas CreateCanvas(ref tagSIZE psz);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern View CreateView([MarshalAs(UnmanagedType.BStr)] string Title, ref ViewParams pParams, [MarshalAs(UnmanagedType.Interface)] ILayer pLayer);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern View LoadView([MarshalAs(UnmanagedType.BStr)] string strSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IImageCache CreateBrushImage(int nColor);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IImageCache LoadImageSchema([MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern IFontCache CreateFontSchema(int nDefHeight, int nDefOptions, [MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern int LoadResourceModule([MarshalAs(UnmanagedType.BStr)] string strLibrary);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
public virtual extern View LoadViewObject([MarshalAs(UnmanagedType.IUnknown)] object pSchema);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern int QueryKeyboardMap([In][MarshalAs(UnmanagedType.BStr)] string bstrName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void RedrawBar();
|
||||
}
|
||||
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/View.cs
Normal file
10
Managed/Decal.Interop.Inject/Decal.Interop.Inject/View.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[Guid("A2AE18B7-85C9-451C-8CC3-D0FFE6B86EEB")]
|
||||
[CoClass(typeof(ViewClass))]
|
||||
public interface View : IView, IViewEvents_Event
|
||||
{
|
||||
}
|
||||
112
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ViewClass.cs
Normal file
112
Managed/Decal.Interop.Inject/Decal.Interop.Inject/ViewClass.cs
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[ComImport]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[ComSourceInterfaces("Decal.Interop.Inject.IViewEvents\0\0")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[Guid("19BF46E4-5CB8-4CFC-A17A-8E6673E60ABF")]
|
||||
public class ViewClass : IView, View, IViewEvents_Event
|
||||
{
|
||||
[DispId(1610743808)]
|
||||
public virtual extern IControl Control
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.Interface)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.Interface)]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743809)]
|
||||
public virtual extern object ControlEx
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.IUnknown)]
|
||||
get;
|
||||
}
|
||||
|
||||
[DispId(1610743811)]
|
||||
public virtual extern string Title
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[return: MarshalAs(UnmanagedType.BStr)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: MarshalAs(UnmanagedType.BStr)]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610743817)]
|
||||
public virtual extern tagRECT Position
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
[param: Out]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809346)]
|
||||
public virtual extern int Alpha
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809347)]
|
||||
public virtual extern bool Activated
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
[DispId(1610809349)]
|
||||
public virtual extern bool Transparent
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
get;
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[param: In]
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual extern event IViewEvents_OnActivateEventHandler OnActivate;
|
||||
|
||||
public virtual extern event IViewEvents_OnDeactivateEventHandler OnDeactivate;
|
||||
|
||||
public virtual extern event IViewEvents_SizeEventHandler Size;
|
||||
|
||||
public virtual extern event IViewEvents_SizingEventHandler Sizing;
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Alert();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void SetIcon(int icon, [Optional][MarshalAs(UnmanagedType.Struct)] object iconLibrary);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Activate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void Deactivate();
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern int LoadControl([MarshalAs(UnmanagedType.Interface)] Layer pParent, int nID, [MarshalAs(UnmanagedType.IUnknown)] object pXMLSource);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
public virtual extern void LoadSchema([MarshalAs(UnmanagedType.BStr)] string strXMLSchema);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct ViewParams
|
||||
{
|
||||
public int icon;
|
||||
|
||||
public int iconLibrary;
|
||||
|
||||
public int left;
|
||||
|
||||
public int top;
|
||||
|
||||
public int width;
|
||||
|
||||
public int height;
|
||||
|
||||
public int Alpha;
|
||||
|
||||
public int state;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct _RemotableHandle
|
||||
{
|
||||
public int fContext;
|
||||
|
||||
public __MIDL_IWinTypes_0009 u;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Pack = 4)]
|
||||
public struct __MIDL_IWinTypes_0009
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public int hInproc;
|
||||
|
||||
[FieldOffset(0)]
|
||||
public int hRemote;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eAlphaBlendOptions
|
||||
{
|
||||
eAlphaBlendSoftware = 1,
|
||||
eAlphaBlendGDIPlus
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eCombatState
|
||||
{
|
||||
ePeace = 1,
|
||||
eMelee = 2,
|
||||
eMissile = 4,
|
||||
eMagic = 8
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eDefaultControlType
|
||||
{
|
||||
eCtlButton,
|
||||
eCtlPager
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eDrawTextExFlags
|
||||
{
|
||||
eAA = 1,
|
||||
eOutlined
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eFontJustify
|
||||
{
|
||||
eFontLeft,
|
||||
eFontRight,
|
||||
eFontCenter
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eFontOptions
|
||||
{
|
||||
eFontBold = 1,
|
||||
eFontItalic = 2,
|
||||
eFontUnderline = 4
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eInputStatus
|
||||
{
|
||||
eInputIdle,
|
||||
eInputWaiting,
|
||||
eInputRunning,
|
||||
eInputPaused
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eManagerSinkCaps
|
||||
{
|
||||
eManagerSinkCapWindowMessage = 1,
|
||||
eManagerSinkCapPlugin = 2,
|
||||
eManagerSinkCapRender = 4,
|
||||
eManagerSinkCapRender3D = 8
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eMinMaxState
|
||||
{
|
||||
eStateMax,
|
||||
eStateMin
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eMouseInput
|
||||
{
|
||||
eMouseLeftClick,
|
||||
eMouseRightClick,
|
||||
eMouseLeftDoubleClick,
|
||||
eMouseRightDoubleClick
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum ePositionType
|
||||
{
|
||||
ePositionByIndex,
|
||||
ePositionByID
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eRenderOptions
|
||||
{
|
||||
eRenderClipped = 1,
|
||||
eRenderNext = 2,
|
||||
eRenderTransparent = 8,
|
||||
eRenderReformatNext = 0x20
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace Decal.Interop.Inject;
|
||||
|
||||
public enum eViewFlags
|
||||
{
|
||||
eTransparent = 1
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct tagPOINT
|
||||
{
|
||||
public int x;
|
||||
|
||||
public int y;
|
||||
}
|
||||
11
Managed/Decal.Interop.Inject/Decal.Interop.Inject/tagSIZE.cs
Normal file
11
Managed/Decal.Interop.Inject/Decal.Interop.Inject/tagSIZE.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Decal.Interop.Inject;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct tagSIZE
|
||||
{
|
||||
public int cx;
|
||||
|
||||
public int cy;
|
||||
}
|
||||
10
Managed/Decal.Interop.Inject/Properties/AssemblyInfo.cs
Normal file
10
Managed/Decal.Interop.Inject/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
[assembly: SecurityRules(SecurityRuleSet.Level2)]
|
||||
[assembly: TypeLibVersion(2, 0)]
|
||||
[assembly: PrimaryInteropAssembly(2, 0)]
|
||||
[assembly: Guid("3559e08b-827e-4dfe-9d33-3567246849cc")]
|
||||
[assembly: ImportedFromTypeLib("DecalPlugins")]
|
||||
[assembly: AssemblyVersion("2.9.8.3")]
|
||||
Loading…
Add table
Add a link
Reference in a new issue