// CONNECTION
[DllImport("CLIENTAPI10M.DLL", EntryPoint = "ClntApiSilentConnect", CallingConvention = CallingConvention.Cdecl)]
private static extern int ClntApiSilentConnect(string user, string password, string host, string pcms_install, string db_name, string db_pword, string db_node);
I got exception during runtime, how to resolve this
If this DLL will be used in Global, it must be placed in the system path. Otherwise, it can be placed directly in the bin directory or root directory of the application.
Another thing you need to pay attention to is that if the application is 32-bit and the DLL is 64-bit, this problem will also occur. It is recommended that you check the version of the application and DLL.
User contributions licensed under CC BY-SA 3.0