求救!CALLBACK函数是什么来的???
void CALLBACK ReadTheard(unsigned char *buf)
{
char ReadData[24];
char TempData[24];
char rbuf[20];
//memcpy(rbuf,buf);
memcpy(rbuf, buf, 20);
if (buf[2]==0) {
for ( int i=3;i<24;i++) {
TempData[i-3]=char(buf[i]);
// strcpy(ReadData,buf);
//ShowMessage(TempData[4]);
}
strcpy(ReadData,TempData);
Form1->LabelReadData->Caption= ReadData; //char(buf[2]);
}else{
Form1->LabelReadData->Caption= char(buf[2]);
}
if (rbuf[3]==8) {
Form1->LabelReadData->Caption
=IntToStr(rbuf[10]/16*10+(rbuf[10]%16))+" "+
IntToStr(rbuf[9]/16*10+(rbuf[9]%16))+ " "+
IntToStr(rbuf[8]/16*10+(rbuf[8]%16))+" "+
IntToStr(rbuf[7]/16*10+(rbuf[7]%16))+" "+
IntToStr(rbuf[6]/16*10+(rbuf[6]%16))+" "+
IntToStr(rbuf[5]/16*10+(rbuf[5]%16))+" "+
IntToStr(rbuf[4]/16*10+(rbuf[4]%16));
}
int i=StrToInt(Form1->LabelCounter->Caption)+1;
// Form1->LabelCounter->Caption=IntToStr(i);
if (rbuf[3]==1) {
Form1->LabelCounter->Caption=IntToStr(i);
Form1->LabelReadData->Caption
=IntToStr(rbuf[7])+
IntToStr(rbuf[8])+
IntToStr(rbuf[9])+
IntToStr(rbuf[10])+
IntToStr(rbuf[11])+
IntToStr(rbuf[12])+
IntToStr(rbuf[13])+
IntToStr(rbuf[14]);
}
}
各位高人,请问CALLBACK函数有什么用的,它返回什么的,还有我对这段程序的存储操作不是好明,我想请各高人们一一解释程序的各部分,多谢,高分求教!!