Architecture¶
The host loads one plugin per installation as a native DLL, in-process. You write the plugin in C# with PARO.HydroSym.PluginSDK or PARO.HydroMan.PluginSDK, published with NativeAOT as a 32-bit (win-x86) DLL. The SDK supplies the two unmanaged entry points; you subclass HydroSymPluginBase or HydroManPluginBase and override the methods you need.
graph LR
Host[Host Application] -->|"HydroSymPlugin_Invoke(method, JSON)"| DLL[Plugin DLL]
DLL -->|"Host.* callback (method, JSON)"| Host
Each host has its own SDK and its own export names: HydroSymPlugin_Invoke / HydroSymPlugin_SetHostCallback and HydroManPlugin_Invoke / HydroManPlugin_SetHostCallback. A HydroSym DLL will not load in HydroMan, or the reverse.
Register the published DLL in the host INI file. See HydroSym Build & Deploy or HydroMan Build & Deploy.
Calls in both directions¶
The host calls your plugin with a method name and a JSON request, and waits for the JSON response. While your method runs, it can call back into the host the same way through Host.*. The SDK serializes the C# request and response models on both sides, so you work with typed models in plugin code and never handle JSON yourself.
Every call is synchronous and runs on the host's UI thread. Long-running work freezes the host. Do not call Host.* from background threads. See Host API.
If an optional method is never called¶
The host calls an optional method only when its capability string is in GetInfo.capabilities. Overriding BeforeFileClose is not enough; beforeFileClose must also be in that list. Keep Capabilities = DeriveCapabilities() in GetInfo so the list always matches the methods you override.
Lifecycle methods (GetInfo, Initialize, Finalize) and menu methods (OnMenuAction, GetMenuItemState, ShowSettings) are always called and are not capability-gated.
| Capability | Method | HydroSym | HydroMan |
|---|---|---|---|
beforeFileOpen |
BeforeFileOpen |
Yes | Yes |
beforeFileClose |
BeforeFileClose |
Yes | Yes |
setProjectVariables |
SetProjectVariables |
Yes, with the attribute list on close | Yes, with an empty map on close |
getProjectVariables |
GetProjectVariables |
Yes, on open and CLI PDF export | Not a plugin method |
getFileStatus |
GetFileStatus |
Called on open if advertised; result unused | Not a plugin method |
saveFile |
SaveFile |
In the schema; never called | Not a plugin method |
A menu-only plugin that overrides none of these gets []. HydroMan has no plugin-side GetProjectVariables, but it does have Host.GetProjectVariables for reading the manifold's UserVarList.