[DllImport("XXX.dll", EntryPoint = "PGIP_startup", SetLastError = true, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] private static extern int _PGIP_Startup([MarshalAs(UnmanagedType.LPArray)]string[] szPluginDirs, int nCount);
如果XXX.dll还有连接别的动态类,并挂到iis上的时候,可能需要加CallingConvention = CallingConvention.Cdecl