//更新对象列表 void ReLoadObjList() { cmbObjList.Items.Clear(); cmbObjList.Items.Add("NONE"); cmbObjList.Items.Add("ALL"); byte[,] szObjList = new byte[100, 50]; byte[] objname = new byte[50]; int n = 0; int nRet = CSharpInterface.HS_GetObjList(szObjList, ref n); if (0 == nRet) { for (int i = 0; i < n; ++i) { for (int t = 0; t < 50; t++) { objname[t] = szObjList[i, t]; } cmbObjList.Items.Add(Encoding.Default.GetString(objname)); } } CSharpInterface.HS_SelectObjects(null, false); this.cmbObjList.SelectedValue = 0;//选择第一项 }