高手请进,应该怎么解决这个问题,关于参数不匹配
GetDataPacket()是激光控件的一个函数(定义见附注).我每次编译都通不过,求高手讲解.void CMyDlg::OnButton1()
{
// TODO: Add your control notification handler code here
m_MT2.SearchDevice();
m_jindu=m_MT2.GetDeviceSearchProgress();
m_shumu=m_MT2.GetTotalDeviceCnt();
m_shuju=m_MT2.GetDataPacket(1,1);
}
运行提示错误:F:\激光++++++++++++++++++++++\激光\激光Dlg.cpp(184) : error C2664: 'GetDataPacket' : cannot convert parameter 1 from 'const int' to 'short *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
附注:BSTR GetDataPacket(short* pDevIndex, short* pPacketTypeIndex)
Return the latest data packet in ASCII string format obtained from the specified device. Call
this function when you get NewDataPacket Event. The output parameter pPacketTypeIndex
is one of the following values to indicate the command type. The syntax of the return value is
described in each Get methods.
-1 TELEMETRY 0 DISPLAY_MODE 1 UPPER_LIMIT
2 LOWER_LIMIT 3 UNITS 4 FILTER
5 USER_CAL 6 CAL_SIGN 8 CONTRAST
9 INTENSITY 11 CUT_TIME 12 BAUD
13 ADDR 16 AUTO_ZERO 17 LASER
18 TELEM_DEST_ADDR 19 TELEM_TIMER 20 HEAD_MODEL