C++头文件/* administrative messages layer  */
typedef void (CALL_MODE *POnLogon)(const int nInstanceID, /* instance identification*/
 const int nSessionID);  /* session identification */
/* OnLogon : Notification of a session successfully logging on */
API_MODE int CALL_MODE SetOnLogon(const POnLogon pOnLogon);C#申明 #region Logon
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate void POnLogon(int nInstanceID, int nSessionID);
        [DllImport("YSSFIXEngine.dll", EntryPoint = "SetOnLogon", ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
        public static extern int SetOnLogon(POnLogon pOnLogon);
        #endregion
C#调用
  public partial class Form1 : Form
    {
 YSSFIXEngine.POnLogon POnLogon = null;
 public Form1()
        {
            InitializeComponent();
            POnLogon = new YSSFIXEngine.POnLogon(OnLogon);
}
 public void OnLogon(int nInstanceID, int nSessionID)
        {
            MessageBox.Show("登录成功");
        }
}
不知道什么原因不回调,大家帮忙看看吧