Files
mxaccess/analysis/decompiled-interop/Interop.Lmx/Interop/Lmx/IAutomationObject4.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

132 lines
9.6 KiB
C#

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Interop.Lmx;
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("4E219836-F98F-407E-AE9D-627A8B50EF40")]
public interface IAutomationObject4 : IAutomationObject3
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Initialize([In][MarshalAs(UnmanagedType.LPWStr)] string Name, [In] int ObjectID, [In][MarshalAs(UnmanagedType.IUnknown)] object pAccessManager, [In][MarshalAs(UnmanagedType.IUnknown)] object pScheduler, [In][MarshalAs(UnmanagedType.Interface)] ICheckpointer pCheckpointer, [In][MarshalAs(UnmanagedType.Interface)] IAutomationObjectCheckpoint pAutomationObjectCheckpoint, [In][MarshalAs(UnmanagedType.Interface)] IDeployCompleteNotification pDeployCompleteNotification, [In][MarshalAs(UnmanagedType.Interface)] ISecurityChecker pSecurityChecker, [In][MarshalAs(UnmanagedType.Interface)] IUserAuthenticator pUserAuthenticator, [In][MarshalAs(UnmanagedType.Interface)] IEventPublisher pEventPublisher, [In][MarshalAs(UnmanagedType.IUnknown)] object objectSyncMgr);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Startup([In] ESTARTUPCONTEXT startupContext);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Shutdown();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Execute();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetAccessRights([In] ref VBGUID userId, [In] ref VBGUID userIdVerifier, [In] bool verifiedByUser, [In] ref MxAttributeHandle AttributeHandle, [ComAliasName("Interop.Lmx.MxAccessRights")] out MxAccessRights accessRights);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetAttribute([In][ComAliasName("Interop.Lmx.MxOperationContext")] MxOperationContext Context, [In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, out short pQuality, out MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SystemSetAttribute([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In][MarshalAs(UnmanagedType.Interface)] MxValue pDataOut, out MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetAttribute([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool verifiedByUser, [In][MarshalAs(UnmanagedType.LPWStr)] string engineName, out MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SupervisorySetAttribute([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] int callbackAttributeId, out MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Subscribe([In] ref MxAttributeHandle pMxAttributeHandle, [In] int index, out bool isDynamic);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Unsubscribe([In] ref MxAttributeHandle pMxAttributeHandle);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetSubscriptionChanges([In][MarshalAs(UnmanagedType.Interface)] IAccessManagerProvider pAccessManagerProvider);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetCheckpointChanges();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void OnHostScanStateChange([In] bool bEngineOnScan);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetStatusDescription([In] ref MxAttributeHandle pMxAttributeHandle, [In] ref MxStatus pStatus, [MarshalAs(UnmanagedType.BStr)] out string pDescription);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new IntPtr GetAttributeCollection([In] ref _RequestAttributeInfo pRequestAttributeInfo);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void NoReferencesOutstanding([In] ref MxAttributeHandle pMxAttributeHandle);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetAttributeData([In] ref MxAttributeHandle AttributeHandle, [Out] IntPtr attributeData);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetState(out ObjectStateEnum state);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UpdateAndCheckpointAttribute([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] ref MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetVersionIndependentCodebase([MarshalAs(UnmanagedType.BStr)] out string codeBase);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetRequiredHostFeature(out Guid hostFeature);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetObjectCategory(out int category);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void HasChangesToCheckpoint(out bool __MIDL__IAutomationObject0000);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SystemSetAttributeEx([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In][MarshalAs(UnmanagedType.Interface)] MxValue pDataOut, out MxStatus pStatus, int CallbackID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UserSetAttributeEx([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool verifiedByUser, [In][MarshalAs(UnmanagedType.LPWStr)] string engineName, out MxStatus pStatus, int CallbackID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetAttributeEx([In][ComAliasName("Interop.Lmx.MxOperationContext")] MxOperationContext Context, [In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, out short pQuality, out MxStatus pStatus, out uint GetAttributeStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void SetState([In] ObjectStateEnum state);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void ShutdownCachedObject();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void PrepareCachedObjectForStartup();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void UpdateAttributesFromRuntimeCheckpoint([In] int primitive, [In] uint bufSize, [In] ref byte buffer);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetPrimitiveCheckpointChanges([In] int primitive, [In][MarshalAs(UnmanagedType.Interface)] IStream stream);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void GetObjectId(out int ObjectID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
new void Invoke([In] int lMode, [In][MarshalAs(UnmanagedType.Struct)] ref object vPara);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetAttributeEx2([In][ComAliasName("Interop.Lmx.MxOperationContext")] MxOperationContext Context, [In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, out short pQuality, out _FILETIME pTime, out MxStatus pStatus, out uint GetAttributeStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SupervisorySetAttributeEx([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] short quality, [In] _FILETIME ftTime, [In] int callbackAttributeId, out MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void SystemSetAttributeEx2([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] short quality, [In] _FILETIME ftTime, [In][MarshalAs(UnmanagedType.Interface)] MxValue pDataOut, out short pQualityOut, out _FILETIME pTimeOut, out MxStatus pStatus, [In] int CallbackID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void UserSetAttributeEx2([In] ref MxAttributeHandle pMxAttributeHandle, [In][MarshalAs(UnmanagedType.Interface)] MxValue pValue, [In] short quality, [In] _FILETIME ftTime, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool verifiedByUser, [In][MarshalAs(UnmanagedType.LPWStr)] string engineName, out MxStatus pStatus, [In] int CallbackID);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetAttributesSupportedProperties([In] ref MxAttributeHandle pMxAttributeHandle, out uint pPropertyFlags, out MxStatus pStatus);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void GetDefaultTimestamp(out _FILETIME pTime);
}