Initial project state: .NET reference, design, Rust port (M0+M1), evidence
rust / build / test / clippy / fmt (push) Has been cancelled
rust / build / test / clippy / fmt (push) Has been cancelled
Layout:
- src/ .NET 10 x64 reference: MxNativeCodec, MxNativeClient,
MxAsbClient, probes, tests, harnesses. Executable spec.
- design/ Architectural plan for the Rust port (M0–M6), error
model, protocol invariants, risks (R1–R16), adversarial
review log (review.md).
- rust/ Rust workspace. M0 skeleton + M1 codec parity.
mxaccess-codec: 215 unit tests + 2 cross-implementation
parity tests (byte-identical against .NET reference).
Other crates are M0 stubs awaiting M2+.
- captures/ Frida + netsh + pcap evidence per CLAUDE.md
("captures are evidence, not throwaway logs").
- analysis/ Decompiled C# (frida/proxy/decompiled-*),
Ghidra exports for native DLLs (`exports/` only —
working state at `projects/` and AVEVA's input
binaries at `input/` are gitignored).
- docs/ Reverse-engineering reference docs.
- tools/ Setup-LiveProbeEnv.ps1 (Infisical credential fetcher),
Compute-Crc.ps1 (.NET parity helper).
- .github/workflows/ Rust CI: fmt + build + test + clippy on Windows.
- LICENSE MIT (Joseph Doherty, 2026).
Verified:
- cargo test --workspace → 217 passed (215 unit + 2 .NET parity), 0 failed
- cargo clippy --workspace -- -D warnings → clean
- cargo fmt --all -- --check → clean
- cargo publish --dry-run -p mxaccess-codec → packages cleanly
Excluded from history (see .gitignore):
- **/bin, **/obj, **/target — build artifacts
- analysis/ghidra/projects/ — Ghidra working state (regenerable)
- analysis/ghidra/input/ — AVEVA proprietary DLLs (vendor IP)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>ArchestrA.MxAccess</AssemblyName>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<TargetFramework>net20</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LangVersion>14.0</LangVersion>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
</Project>
|
||||
@@ -0,0 +1,46 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[Guid("CCE67FB7-EAFD-4367-9212-617043BF126D")]
|
||||
[TypeLibType(4160)]
|
||||
public interface ILMXProxyServer
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
int Register([In][MarshalAs(UnmanagedType.BStr)] string pClientName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
void Unregister([In] int hLMXServerHandle);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
int AddItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
void RemoveItem([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
void Advise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
void UnAdvise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
void Write([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
void WriteSecured([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
int AuthenticateUser([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUser, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUserPsw);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[Guid("020A8A87-69C5-497F-A893-B629E669FBFF")]
|
||||
public interface ILMXProxyServer2 : ILMXProxyServer
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
new int Register([In][MarshalAs(UnmanagedType.BStr)] string pClientName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
new void Unregister([In] int hLMXServerHandle);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
new int AddItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
new void RemoveItem([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
new void Advise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void UnAdvise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Write([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void WriteSecured([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new int AuthenticateUser([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUser, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUserPsw);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
int ArchestrAUserToId([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string UserIdGuid);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[Guid("57D006B6-F25E-4654-A81E-BCBAFD60FE59")]
|
||||
public interface ILMXProxyServer3 : ILMXProxyServer2
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
new int Register([In][MarshalAs(UnmanagedType.BStr)] string pClientName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
new void Unregister([In] int hLMXServerHandle);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
new int AddItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
new void RemoveItem([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
new void Advise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void UnAdvise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Write([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void WriteSecured([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new int AuthenticateUser([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUser, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUserPsw);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
new int ArchestrAUserToId([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string UserIdGuid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874880)]
|
||||
int AddItem2([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef, [In][MarshalAs(UnmanagedType.BStr)] string strItemCtxt);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[Guid("9DC0D5C1-9371-4E84-86F8-7091D316A66C")]
|
||||
public interface ILMXProxyServer4 : ILMXProxyServer3
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
new int Register([In][MarshalAs(UnmanagedType.BStr)] string pClientName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
new void Unregister([In] int hLMXServerHandle);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
new int AddItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
new void RemoveItem([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
new void Advise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void UnAdvise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Write([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void WriteSecured([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new int AuthenticateUser([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUser, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUserPsw);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
new int ArchestrAUserToId([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string UserIdGuid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874880)]
|
||||
new int AddItem2([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef, [In][MarshalAs(UnmanagedType.BStr)] string strItemCtxt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940416)]
|
||||
void Write2([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pItemTime, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940417)]
|
||||
void WriteSecured2([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pItemTime);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940418)]
|
||||
void Suspend([In] int hLMXServerHandle, [In] int hItem, out MxStatus pMxStatus);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940419)]
|
||||
void Activate([In] int hLMXServerHandle, [In] int hItem, out MxStatus pMxStatus);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940420)]
|
||||
void AdviseSupervisory([In] int hLMXServerHandle, [In] int hItem);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4160)]
|
||||
[Guid("ECEFF506-A752-46E3-9E31-0A8E257C9926")]
|
||||
public interface ILMXProxyServer5 : ILMXProxyServer4
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
new int Register([In][MarshalAs(UnmanagedType.BStr)] string pClientName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
new void Unregister([In] int hLMXServerHandle);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
new int AddItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
new void RemoveItem([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
new void Advise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
new void UnAdvise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
new void Write([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
new void WriteSecured([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
new int AuthenticateUser([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUser, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUserPsw);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
new int ArchestrAUserToId([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string UserIdGuid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874880)]
|
||||
new int AddItem2([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef, [In][MarshalAs(UnmanagedType.BStr)] string strItemCtxt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940416)]
|
||||
new void Write2([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pItemTime, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940417)]
|
||||
new void WriteSecured2([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pItemTime);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940418)]
|
||||
new void Suspend([In] int hLMXServerHandle, [In] int hItem, out MxStatus pMxStatus);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940419)]
|
||||
new void Activate([In] int hLMXServerHandle, [In] int hItem, out MxStatus pMxStatus);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940420)]
|
||||
new void AdviseSupervisory([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1611005952)]
|
||||
int AddBufferedItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef, [In][MarshalAs(UnmanagedType.BStr)] string strItemCtxt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1611005953)]
|
||||
void SetBufferedUpdateInterval([In] int hLMXServerHandle, [In] int lUpdateInterval);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[Guid("ECEFF506-A752-46E3-9E31-0A8E257C9926")]
|
||||
[CoClass(typeof(LMXProxyServerClass))]
|
||||
public interface LMXProxyServer : ILMXProxyServer5, _ILMXProxyServerEvents_Event
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[ClassInterface(0)]
|
||||
[ComSourceInterfaces("ArchestrA.MxAccess._ILMXProxyServerEvents\0ArchestrA.MxAccess._ILMXProxyServerEvents2\0\0")]
|
||||
[TypeLibType(2)]
|
||||
[Guid("C30B52F5-2CB5-4760-AF0A-3A344A7EB5DC")]
|
||||
public class LMXProxyServerClass : ILMXProxyServer5, LMXProxyServer, _ILMXProxyServerEvents_Event, _ILMXProxyServerEvents2_Event
|
||||
{
|
||||
public virtual extern event _ILMXProxyServerEvents_OnDataChangeEventHandler OnDataChange;
|
||||
|
||||
public virtual extern event _ILMXProxyServerEvents_OnWriteCompleteEventHandler OnWriteComplete;
|
||||
|
||||
public virtual extern event _ILMXProxyServerEvents_OperationCompleteEventHandler OperationComplete;
|
||||
|
||||
public virtual extern event _ILMXProxyServerEvents2_OnBufferedDataChangeEventHandler OnBufferedDataChange;
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743808)]
|
||||
public virtual extern int Register([In][MarshalAs(UnmanagedType.BStr)] string pClientName);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743809)]
|
||||
public virtual extern void Unregister([In] int hLMXServerHandle);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743810)]
|
||||
public virtual extern int AddItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743811)]
|
||||
public virtual extern void RemoveItem([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743812)]
|
||||
public virtual extern void Advise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743813)]
|
||||
public virtual extern void UnAdvise([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743814)]
|
||||
public virtual extern void Write([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743815)]
|
||||
public virtual extern void WriteSecured([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610743816)]
|
||||
public virtual extern int AuthenticateUser([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUser, [In][MarshalAs(UnmanagedType.BStr)] string VerifyUserPsw);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610809344)]
|
||||
public virtual extern int ArchestrAUserToId([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string UserIdGuid);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610874880)]
|
||||
public virtual extern int AddItem2([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef, [In][MarshalAs(UnmanagedType.BStr)] string strItemCtxt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940416)]
|
||||
public virtual extern void Write2([In] int hLMXServerHandle, [In] int hItem, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pItemTime, [In] int UserID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940417)]
|
||||
public virtual extern void WriteSecured2([In] int hLMXServerHandle, [In] int hItem, [In] int CurrentUserID, [In] int VerifierUserID, [In][MarshalAs(UnmanagedType.Struct)] object pItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pItemTime);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940418)]
|
||||
public virtual extern void Suspend([In] int hLMXServerHandle, [In] int hItem, out MxStatus pMxStatus);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940419)]
|
||||
public virtual extern void Activate([In] int hLMXServerHandle, [In] int hItem, out MxStatus pMxStatus);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1610940420)]
|
||||
public virtual extern void AdviseSupervisory([In] int hLMXServerHandle, [In] int hItem);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1611005952)]
|
||||
public virtual extern int AddBufferedItem([In] int hLMXServerHandle, [In][MarshalAs(UnmanagedType.BStr)] string strItemDef, [In][MarshalAs(UnmanagedType.BStr)] string strItemCtxt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1611005953)]
|
||||
public virtual extern void SetBufferedUpdateInterval([In] int hLMXServerHandle, [In] int lUpdateInterval);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
[Guid("A162D9E4-9019-42F3-A087-79264007E542")]
|
||||
public struct MXSTATUS_PROXY
|
||||
{
|
||||
public short success;
|
||||
|
||||
public MxStatusCategory category;
|
||||
|
||||
public MxStatusSource detectedBy;
|
||||
|
||||
public short detail;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
public enum MxDataType
|
||||
{
|
||||
MxDataTypeUnknown = -1,
|
||||
MxNoData,
|
||||
MxBoolean,
|
||||
MxInteger,
|
||||
MxFloat,
|
||||
MxDouble,
|
||||
MxString,
|
||||
MxTime,
|
||||
MxElapsedTime,
|
||||
MxReferenceType,
|
||||
MxStatusType,
|
||||
MxDataTypeEnum,
|
||||
MxSecurityClassificationEnum,
|
||||
MxDataQualityType,
|
||||
MxQualifiedEnum,
|
||||
MxQualifiedStruct,
|
||||
MxInternationalizedString,
|
||||
MxBigString,
|
||||
MxDataTypeEND
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct MxStatus
|
||||
{
|
||||
public short success;
|
||||
|
||||
public MxStatusCategory category;
|
||||
|
||||
public MxStatusSource detectedBy;
|
||||
|
||||
public short detail;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
public enum MxStatusCategory
|
||||
{
|
||||
MxStatusCategoryUnknown = -1,
|
||||
MxCategoryOk,
|
||||
MxCategoryPending,
|
||||
MxCategoryWarning,
|
||||
MxCategoryCommunicationError,
|
||||
MxCategoryConfigurationError,
|
||||
MxCategoryOperationalError,
|
||||
MxCategorySecurityError,
|
||||
MxCategorySoftwareError,
|
||||
MxCategoryOtherError
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
public enum MxStatusSource
|
||||
{
|
||||
MxSourceUnknown = -1,
|
||||
MxSourceRequestingLmx,
|
||||
MxSourceRespondingLmx,
|
||||
MxSourceRequestingNmx,
|
||||
MxSourceRespondingNmx,
|
||||
MxSourceRequestingAutomationObject,
|
||||
MxSourceRespondingAutomationObject
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[TypeLibType(4096)]
|
||||
[InterfaceType(2)]
|
||||
[Guid("848299B6-DD61-4A0D-A304-3947A564B89C")]
|
||||
public interface _ILMXProxyServerEvents
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void OnDataChange([In] int hLMXServerHandle, [In] int phItemHandle, [In][MarshalAs(UnmanagedType.Struct)] object pvItemValue, [In] int pwItemQuality, [In][MarshalAs(UnmanagedType.Struct)] object pftItemTimeStamp, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(2)]
|
||||
void OnWriteComplete([In] int hLMXServerHandle, [In] int phItemHandle, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(3)]
|
||||
void OperationComplete([In] int hLMXServerHandle, [In] int phItemHandle, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComImport]
|
||||
[Guid("C70A6FC4-09EF-4F31-8874-A049FEE87A95")]
|
||||
[TypeLibType(4096)]
|
||||
[InterfaceType(2)]
|
||||
public interface _ILMXProxyServerEvents2
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
||||
[DispId(1)]
|
||||
void OnBufferedDataChange([In] int hLMXServerHandle, [In] int phItemHandle, [In] MxDataType dtDataType, [In][MarshalAs(UnmanagedType.Struct)] object pvItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pwItemQuality, [In][MarshalAs(UnmanagedType.Struct)] object pftItemTimeStamp, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[TypeLibType(16)]
|
||||
[ComVisible(false)]
|
||||
[ComEventInterface(typeof(_ILMXProxyServerEvents2_0000), typeof(_ILMXProxyServerEvents2_EventProvider_0000))]
|
||||
public interface _ILMXProxyServerEvents2_Event
|
||||
{
|
||||
event _ILMXProxyServerEvents2_OnBufferedDataChangeEventHandler OnBufferedDataChange;
|
||||
}
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
internal sealed class _ILMXProxyServerEvents2_EventProvider : _ILMXProxyServerEvents2_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]
|
||||
{
|
||||
196, 111, 10, 199, 239, 9, 49, 79, 136, 116,
|
||||
160, 73, 254, 232, 122, 149
|
||||
});
|
||||
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out ppCP);
|
||||
m_ConnectionPoint = ppCP;
|
||||
m_aEventSinkHelpers = new ArrayList();
|
||||
}
|
||||
|
||||
public void add_OnBufferedDataChange(_ILMXProxyServerEvents2_OnBufferedDataChangeEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
_ILMXProxyServerEvents2_SinkHelper iLMXProxyServerEvents2_SinkHelper = new _ILMXProxyServerEvents2_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(iLMXProxyServerEvents2_SinkHelper, out pdwCookie);
|
||||
iLMXProxyServerEvents2_SinkHelper.m_dwCookie = pdwCookie;
|
||||
iLMXProxyServerEvents2_SinkHelper.m_OnBufferedDataChangeDelegate = P_0;
|
||||
m_aEventSinkHelpers.Add(iLMXProxyServerEvents2_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove_OnBufferedDataChange(_ILMXProxyServerEvents2_OnBufferedDataChangeEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
_ILMXProxyServerEvents2_SinkHelper iLMXProxyServerEvents2_SinkHelper = (_ILMXProxyServerEvents2_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (iLMXProxyServerEvents2_SinkHelper.m_OnBufferedDataChangeDelegate != null && ((iLMXProxyServerEvents2_SinkHelper.m_OnBufferedDataChangeDelegate.Equals(P_0) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(iLMXProxyServerEvents2_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public _ILMXProxyServerEvents2_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()
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 < count)
|
||||
{
|
||||
do
|
||||
{
|
||||
_ILMXProxyServerEvents2_SinkHelper iLMXProxyServerEvents2_SinkHelper = (_ILMXProxyServerEvents2_SinkHelper)m_aEventSinkHelpers[num];
|
||||
m_ConnectionPoint.Unadvise(iLMXProxyServerEvents2_SinkHelper.m_dwCookie);
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
Finalize();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComVisible(false)]
|
||||
[TypeLibType(16)]
|
||||
public delegate void _ILMXProxyServerEvents2_OnBufferedDataChangeEventHandler([In] int hLMXServerHandle, [In] int phItemHandle, [In] MxDataType dtDataType, [In][MarshalAs(UnmanagedType.Struct)] object pvItemValue, [In][MarshalAs(UnmanagedType.Struct)] object pwItemQuality, [In][MarshalAs(UnmanagedType.Struct)] object pftItemTimeStamp, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[TypeLibType(TypeLibTypeFlags.FHidden)]
|
||||
public sealed class _ILMXProxyServerEvents2_SinkHelper : _ILMXProxyServerEvents2
|
||||
{
|
||||
public _ILMXProxyServerEvents2_OnBufferedDataChangeEventHandler m_OnBufferedDataChangeDelegate;
|
||||
|
||||
public int m_dwCookie;
|
||||
|
||||
public void OnBufferedDataChange(int P_0, int P_1, MxDataType P_2, object P_3, object P_4, object P_5, ref MXSTATUS_PROXY[] P_6)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_OnBufferedDataChangeDelegate != null)
|
||||
{
|
||||
m_OnBufferedDataChangeDelegate(P_0, P_1, P_2, P_3, P_4, P_5, ref P_6);
|
||||
}
|
||||
}
|
||||
|
||||
internal _ILMXProxyServerEvents2_SinkHelper()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_dwCookie = 0;
|
||||
m_OnBufferedDataChangeDelegate = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComVisible(false)]
|
||||
[ComEventInterface(typeof(_ILMXProxyServerEvents_0000), typeof(_ILMXProxyServerEvents_EventProvider_0000))]
|
||||
[TypeLibType(16)]
|
||||
public interface _ILMXProxyServerEvents_Event
|
||||
{
|
||||
event _ILMXProxyServerEvents_OnDataChangeEventHandler OnDataChange;
|
||||
|
||||
event _ILMXProxyServerEvents_OnWriteCompleteEventHandler OnWriteComplete;
|
||||
|
||||
event _ILMXProxyServerEvents_OperationCompleteEventHandler OperationComplete;
|
||||
}
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Threading;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
internal sealed class _ILMXProxyServerEvents_EventProvider : _ILMXProxyServerEvents_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]
|
||||
{
|
||||
182, 153, 130, 132, 97, 221, 13, 74, 163, 4,
|
||||
57, 71, 165, 100, 184, 156
|
||||
});
|
||||
m_ConnectionPointContainer.FindConnectionPoint(ref riid, out ppCP);
|
||||
m_ConnectionPoint = ppCP;
|
||||
m_aEventSinkHelpers = new ArrayList();
|
||||
}
|
||||
|
||||
public void add_OnDataChange(_ILMXProxyServerEvents_OnDataChangeEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = new _ILMXProxyServerEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(iLMXProxyServerEvents_SinkHelper, out pdwCookie);
|
||||
iLMXProxyServerEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
iLMXProxyServerEvents_SinkHelper.m_OnDataChangeDelegate = P_0;
|
||||
m_aEventSinkHelpers.Add(iLMXProxyServerEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove_OnDataChange(_ILMXProxyServerEvents_OnDataChangeEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = (_ILMXProxyServerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (iLMXProxyServerEvents_SinkHelper.m_OnDataChangeDelegate != null && ((iLMXProxyServerEvents_SinkHelper.m_OnDataChangeDelegate.Equals(P_0) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(iLMXProxyServerEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void add_OnWriteComplete(_ILMXProxyServerEvents_OnWriteCompleteEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = new _ILMXProxyServerEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(iLMXProxyServerEvents_SinkHelper, out pdwCookie);
|
||||
iLMXProxyServerEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
iLMXProxyServerEvents_SinkHelper.m_OnWriteCompleteDelegate = P_0;
|
||||
m_aEventSinkHelpers.Add(iLMXProxyServerEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove_OnWriteComplete(_ILMXProxyServerEvents_OnWriteCompleteEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = (_ILMXProxyServerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (iLMXProxyServerEvents_SinkHelper.m_OnWriteCompleteDelegate != null && ((iLMXProxyServerEvents_SinkHelper.m_OnWriteCompleteDelegate.Equals(P_0) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(iLMXProxyServerEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void add_OperationComplete(_ILMXProxyServerEvents_OperationCompleteEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = new _ILMXProxyServerEvents_SinkHelper();
|
||||
int pdwCookie = 0;
|
||||
m_ConnectionPoint.Advise(iLMXProxyServerEvents_SinkHelper, out pdwCookie);
|
||||
iLMXProxyServerEvents_SinkHelper.m_dwCookie = pdwCookie;
|
||||
iLMXProxyServerEvents_SinkHelper.m_OperationCompleteDelegate = P_0;
|
||||
m_aEventSinkHelpers.Add(iLMXProxyServerEvents_SinkHelper);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove_OperationComplete(_ILMXProxyServerEvents_OperationCompleteEventHandler P_0)
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_aEventSinkHelpers == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 >= count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = (_ILMXProxyServerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
if (iLMXProxyServerEvents_SinkHelper.m_OperationCompleteDelegate != null && ((iLMXProxyServerEvents_SinkHelper.m_OperationCompleteDelegate.Equals(P_0) ? 1u : 0u) & 0xFFu) != 0)
|
||||
{
|
||||
m_aEventSinkHelpers.RemoveAt(num);
|
||||
m_ConnectionPoint.Unadvise(iLMXProxyServerEvents_SinkHelper.m_dwCookie);
|
||||
if (count <= 1)
|
||||
{
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
m_ConnectionPoint = null;
|
||||
m_aEventSinkHelpers = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public _ILMXProxyServerEvents_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()
|
||||
{
|
||||
Monitor.Enter(this);
|
||||
try
|
||||
{
|
||||
if (m_ConnectionPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int count = m_aEventSinkHelpers.Count;
|
||||
int num = 0;
|
||||
if (0 < count)
|
||||
{
|
||||
do
|
||||
{
|
||||
_ILMXProxyServerEvents_SinkHelper iLMXProxyServerEvents_SinkHelper = (_ILMXProxyServerEvents_SinkHelper)m_aEventSinkHelpers[num];
|
||||
m_ConnectionPoint.Unadvise(iLMXProxyServerEvents_SinkHelper.m_dwCookie);
|
||||
num++;
|
||||
}
|
||||
while (num < count);
|
||||
}
|
||||
Marshal.ReleaseComObject(m_ConnectionPoint);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
Finalize();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ComVisible(false)]
|
||||
[TypeLibType(16)]
|
||||
public delegate void _ILMXProxyServerEvents_OnDataChangeEventHandler([In] int hLMXServerHandle, [In] int phItemHandle, [In][MarshalAs(UnmanagedType.Struct)] object pvItemValue, [In] int pwItemQuality, [In][MarshalAs(UnmanagedType.Struct)] object pftItemTimeStamp, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[TypeLibType(16)]
|
||||
[ComVisible(false)]
|
||||
public delegate void _ILMXProxyServerEvents_OnWriteCompleteEventHandler([In] int hLMXServerHandle, [In] int phItemHandle, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[TypeLibType(16)]
|
||||
[ComVisible(false)]
|
||||
public delegate void _ILMXProxyServerEvents_OperationCompleteEventHandler([In] int hLMXServerHandle, [In] int phItemHandle, [In][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_RECORD)] ref MXSTATUS_PROXY[] pVars);
|
||||
@@ -0,0 +1,52 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ArchestrA.MxAccess;
|
||||
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
[TypeLibType(TypeLibTypeFlags.FHidden)]
|
||||
public sealed class _ILMXProxyServerEvents_SinkHelper : _ILMXProxyServerEvents
|
||||
{
|
||||
public _ILMXProxyServerEvents_OnDataChangeEventHandler m_OnDataChangeDelegate;
|
||||
|
||||
public _ILMXProxyServerEvents_OnWriteCompleteEventHandler m_OnWriteCompleteDelegate;
|
||||
|
||||
public _ILMXProxyServerEvents_OperationCompleteEventHandler m_OperationCompleteDelegate;
|
||||
|
||||
public int m_dwCookie;
|
||||
|
||||
public void OnDataChange(int P_0, int P_1, object P_2, int P_3, object P_4, ref MXSTATUS_PROXY[] P_5)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_OnDataChangeDelegate != null)
|
||||
{
|
||||
m_OnDataChangeDelegate(P_0, P_1, P_2, P_3, P_4, ref P_5);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnWriteComplete(int P_0, int P_1, ref MXSTATUS_PROXY[] P_2)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_OnWriteCompleteDelegate != null)
|
||||
{
|
||||
m_OnWriteCompleteDelegate(P_0, P_1, ref P_2);
|
||||
}
|
||||
}
|
||||
|
||||
public void OperationComplete(int P_0, int P_1, ref MXSTATUS_PROXY[] P_2)
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
if (m_OperationCompleteDelegate != null)
|
||||
{
|
||||
m_OperationCompleteDelegate(P_0, P_1, ref P_2);
|
||||
}
|
||||
}
|
||||
|
||||
internal _ILMXProxyServerEvents_SinkHelper()
|
||||
{
|
||||
//Error decoding local variables: Signature type sequence must have at least one element.
|
||||
m_dwCookie = 0;
|
||||
m_OnDataChangeDelegate = null;
|
||||
m_OnWriteCompleteDelegate = null;
|
||||
m_OperationCompleteDelegate = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: TypeLibVersion(3, 2)]
|
||||
[assembly: Guid("77e896ec-b3e3-4de4-b96f-f32570164211")]
|
||||
[assembly: PrimaryInteropAssembly(3, 2)]
|
||||
[assembly: ImportedFromTypeLib("LMXPROXYLib")]
|
||||
[assembly: AssemblyVersion("3.2.0.0")]
|
||||
Reference in New Issue
Block a user