Historically, some versions of the OPC Core Components (including the library containing opcnetapidll ) had buffer overflow vulnerabilities (e.g., CVE-2017-17669). Attackers could send a malformed OPC request that crashes the DLL and executes arbitrary code on the SCADA server.
When using this DLL in a Visual Studio project, the workflow typically looks like this: opcnetapidll
If your app is 64-bit, you must ensure you have the 64-bit Core Components installed, or set your project to "Prefer 32-bit". Historically, some versions of the OPC Core Components