예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            callBack = new eventCallBack(engineCallBack);;
            int ret = initEngine(@"..\grammar\tv_main.dat", "tv_main", callBack);

            if (ret == 0)
            {
                IntPtr temp    = getVersion();
                string version = Marshal.PtrToStringAnsi(temp).ToString();
                this.Text = "云知声 " + version;
                MessageBox.Show("初始化成功!");
            }
            else
            {
                MessageBox.Show("初始化失败!");
            }
        }
예제 #2
0
 static extern void setCallBack(eventCallBack callBack);
예제 #3
0
 static extern int initEngine(string grammerPath, string tagName, eventCallBack callBack);