Files
mxaccess/analysis/decompiled-interop/Interop.LmxProxy/Interop/LmxProxy/IMxUserConnection5.cs
T
Joseph Doherty fe2a6db786
rust / build / test / clippy / fmt (push) Has been cancelled
Initial project state: .NET reference, design, Rust port (M0+M1), evidence
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>
2026-05-05 06:21:00 -04:00

109 lines
8.3 KiB
C#

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Interop.LmxProxy;
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("4805D9B8-1BD4-4726-81F8-B70BEEB1D7AE")]
public interface IMxUserConnection5 : IMxUserConnection4
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new int UserRegisterReference([In][MarshalAs(UnmanagedType.Interface)] MxReference pMxReference, [In] bool IsIndirect, [In] bool IsReadable, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback, [In] int userData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserUnregisterReference([In] int hRef);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
new MxValue UserGetAttribute([In] int hRef, out short pMxDataQuality, out MxStatus pMxStatus, [MarshalAs(UnmanagedType.BStr)] out string pStatusDescription);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetAttribute([In] int hRef, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool userVerified, [In][MarshalAs(UnmanagedType.LPWStr)] string sourceName, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.BStr)]
new string UserGetQualityDescription([In] ref short mxDataQuality);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new int UserRegisterPreboundReference([In] int preboundReferenceHandle, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback, [In] int userData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetResponse([In] int callbackId, [In] ref MxStatus pMxStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetArrayAttributeByIndex([In] int hRef, [In] short arrayIndex, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool userVerified, [In][MarshalAs(UnmanagedType.LPWStr)] string sourceName, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
new MxValue UserGetArrayAttributeByIndex([In] int hRef, [In] short arrayIndex, out short pMxDataQuality, out MxStatus pMxStatus, [MarshalAs(UnmanagedType.BStr)] out string pStatusDescription);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetInteger([In] int hRef, out short DataQuality, out MxStatus MxStatus, out int plValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetBoolean([In] int hRef, out short DataQuality, out MxStatus MxStatus, out bool pbValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetFloat([In] int hRef, out short DataQuality, out MxStatus MxStatus, out float pfValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetDouble([In] int hRef, out short DataQuality, out MxStatus MxStatus, out double pdValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetQualifiedEnum([In] int hRef, out short DataQuality, out MxStatus MxStatus, out short ordinal);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetString([In] int hRef, out short DataQuality, out MxStatus MxStatus, [MarshalAs(UnmanagedType.BStr)] out string pbstrValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetBigString([In] int hRef, out short DataQuality, out MxStatus MxStatus, [MarshalAs(UnmanagedType.BStr)] out string pbstrValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetInternationalizedString([In] int hRef, out short DataQuality, out MxStatus MxStatus, [MarshalAs(UnmanagedType.BStr)] out string pbstrValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
new MxValue UserGetAttribute4([In] int hRef, out short pMxDataQuality, out _FILETIME pMxTime, out MxStatus pMxStatus, [MarshalAs(UnmanagedType.BStr)] out string pStatusDescription);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
new MxValue UserGetArrayAttributeByIndex4([In] int hRef, [In] short arrayIndex, out short pMxDataQuality, out _FILETIME pMxTime, out MxStatus pMxStatus, [MarshalAs(UnmanagedType.BStr)] out string pStatusDescription);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetAttribute4([In] int hRef, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, [In] short Quality, [In] _FILETIME Timestamp, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool userVerified, [In][MarshalAs(UnmanagedType.LPWStr)] string sourceName, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetArrayAttributeByIndex4([In] int hRef, [In] short arrayIndex, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, [In] short Quality, [In] _FILETIME Timestamp, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool userVerified, [In][MarshalAs(UnmanagedType.LPWStr)] string sourceName, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetAttributesSupportedProperties([In] int hRef, out int SupportedProperties, out MxStatus pMxStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetInteger4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, out int plValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetBoolean4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, out bool pbValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetFloat4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, out float pfValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetDouble4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, out double pdValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetQualifiedEnum4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, out short ordinal);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetString4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, [MarshalAs(UnmanagedType.BStr)] out string pbstrValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetBigString4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, [MarshalAs(UnmanagedType.BStr)] out string pbstrValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserGetInternationalizedString4([In] int hRef, out short DataQuality, out _FILETIME pMxTime, out MxStatus MxStatus, [MarshalAs(UnmanagedType.BStr)] out string pbstrValue);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void UserSetAttribute5([In] int hRef, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool userVerified, [In][MarshalAs(UnmanagedType.LPWStr)] string sourceName, [In][MarshalAs(UnmanagedType.LPWStr)] string reasonDescription, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback);
}