FOR DEVELOPERS / TECHNICAL REFERENCE

.NET caller for the native ABI preview

Build and run the .NET interop example for the experimental native C ABI.

Illustrated protocol guide → · Technical reference →

This is a small interop test for the experimental amw_preview_* C API. It does not replace AmoosedWeb.Reader. With no fixture environment it tests catalogue parsing; with the variables below it also opens hosted and external indexes, enumerates resource metadata, and downloads their verified entry resources. The hosted fixture checks that a protected resource returns the typed authentication failure with zero output for missing and wrong member keys, then succeeds with the matching raw key.

Build and install the C++ CMake project, then place its AmoosedWebGameReaderC.dll on the process DLL search path. From this folder:

dotnet run -c Release

The example checks the ABI revision, parses a catalogue, reads fixed-width values, queries and copies an item path into caller-owned memory, releases the handle, and rejects an invalid catalogue. To run the hosted/external fixture path, set AMW_PREVIEW_SITE_ORIGIN, AMW_PREVIEW_SITE_OUTPUT, AMW_PREVIEW_EXTERNAL_ORIGIN, AMW_PREVIEW_EXTERNAL_KEY_PATH, and AMW_PREVIEW_EXTERNAL_OUTPUT, plus AMW_PREVIEW_MEMBER_KEY_PATH, AMW_PREVIEW_MEMBER_OUTPUT, AMW_PREVIEW_PIXEL_ORIGIN, and AMW_PREVIEW_PIXEL_OUTPUT, AMW_PREVIEW_FRAME_ORIGIN, AMW_PREVIEW_FRAME_OUTPUT, AMW_PREVIEW_AUDIO_ORIGIN, and AMW_PREVIEW_AUDIO_OUTPUT. The output paths must be absent and inside a trusted local directory. npm run test:game-http builds suitable local sites, starts them on loopback, and runs this example with those variables.

It requires .NET 10 and the Windows x64 preview DLL built with the matching source. The preview ABI may change before 1.0. The Windows adapter handles PNG low-bit, AWF1/AWF2 sparse-frame, and WAV tone carriers in this fixture.