private void HotKey_Closed(object sender, EventArgs e) { bool bResult; int LastErrCode; bResult = SUSI_API.SusiDllUnInit(); if (bResult != true) { LastErrCode = SUSI_API.SusiDllGetLastError(); MessageBox.Show(LastErrCode.ToString()); } }
private void SetHotKey5Btn_Click(object sender, EventArgs e) { bool bResult = false; int LastErrCode; if (platform_name == "TREK-72x") { bResult = SUSI_API.SusiIICHotKeyREGSetting(4, (byte)Convert.ToInt16(HotKey5MapTxt.Text)); } else { bResult = SUSI_API.SusiVCHotKeyREGSetting(4, (byte)Convert.ToInt16(HotKey5MapTxt.Text)); } if (bResult != true) { LastErrCode = SUSI_API.SusiDllGetLastError(); MessageBox.Show(LastErrCode.ToString()); } }
private void HotKey_Load(object sender, EventArgs e) { bool bResult; int LastErrCode; bResult = SUSI_API.SusiDllInit(); if (bResult != true) { LastErrCode = SUSI_API.SusiDllGetLastError(); MessageBox.Show(LastErrCode.ToString()); } UInt32 Size; SUSI_IMC_API.IMC_CORE_GETPLATFORMNAME Parm_PN = new SUSI_IMC_API.IMC_CORE_GETPLATFORMNAME(); unsafe { Parm_PN.PlatformName = null; Parm_PN.size = &Size; if (IMC_ERR_NO_ERROR == SUSI_IMC_API.CORE_GetPlatformName(ref Parm_PN)) { UnicodeEncoding encodeW = new UnicodeEncoding(); Size = Size * 2; byte[] name = new byte[Size]; fixed(byte *p = name) { Parm_PN.PlatformName = (char *)p; SUSI_IMC_API.CORE_GetPlatformName(ref Parm_PN); platform_name = encodeW.GetString(name, 0, (int)Size); } } else { return; } } }