surveillance-client/SurveillanceClient/README.md
MaddoScientisto de077ca5d5 Add detailed analysis and documentation for RSNet.dll download functionality
- Introduced a comprehensive markdown document outlining the API surface of RSNet.dll related to downloading video files.
- Documented initialization, connection, record querying, and download processes.
- Provided insights into the exported functions, their parameters, and expected behaviors.
- Included practical implications and recommendations for implementing a downloader script using C# interop.
- Highlighted the necessary struct layouts and callback mechanisms for effective integration with the DLL.
2026-04-17 21:19:46 +02:00

1.6 KiB

SurveillanceClient

.NET 10 host for driving the vendor RSNet.dll (32-bit) to download recorded video from a surveillance NVR/DVR.

Layout

  • src/SurveillanceClient.Core — class library that wraps the RSNet.dll native exports behind a service interface (IRsNetClient).
  • src/SurveillanceClient.Cli — console host used for iterative, manual testing of the Core library against a real device.

Platform

RSNet.dll is a 32-bit Visual Studio DLL using __stdcall. Every project in this solution targets x86 via Directory.Build.props.

Running

The vendor DLL and its dependencies live in i:\Apps\Surveillance_client. The CLI sets that directory as the native DLL search path at startup so the DLL and its .ini config are found.

Credentials

Credentials are never committed. Configure them via .NET user secrets (recommended) or a appsettings.Local.json file (ignored by .gitignore).

cd src/SurveillanceClient.Cli
dotnet user-secrets set "Device:Host" "192.168.100.92"
dotnet user-secrets set "Device:Port" "9000"
dotnet user-secrets set "Device:Username" "admin"
dotnet user-secrets set "Device:Password" "your-password-here"

appsettings.Local.json (alternative)

Create src/SurveillanceClient.Cli/appsettings.Local.json:

{
  "Device": {
    "Host": "192.168.100.92",
    "Port": 9000,
    "Username": "admin",
    "Password": "your-password-here"
  }
}

Build / Run

cd SurveillanceClient
dotnet build
dotnet run --project src/SurveillanceClient.Cli