📄 unit1.cpp
字号:
//---------------------------------------------------------------------------
#pragma hdrstop
#include <vcl.h>
//---------------------------------------------------------------------------
#pragma argsused
#include "buffer.h"
#include <time.h>
struct ftptemp
{
unsigned char *head;
};
class ftp
{
public:
unsigned char head[10];
ftptemp *m_ftptemp;
};
class temp
{
private:
public:
unsigned char tmp[1600];
ftp *m_ftp;
protected:
};
#define LEN sizeof(temp)+sizeof(ftp)
int main(int argc, char* argv[])
{
temp *t=new temp;
t->m_ftp = new ftp;
CBUFFER tempbuffer;
TDateTime Dt;
unsigned short HH=0,MM=0,SS=0,MS=0;
do{
printf("begin while................ \n\n");
Dt = Dt.CurrentTime();
Dt.DecodeTime(&HH,&MM,&SS,&MS);
printf("%d%d\n",SS,MS);
memset(t->tmp,0xA0,1600);
memset(t->m_ftp->head,0xB0,10);
for(int i=0;i<10000;i++)
tempbuffer.WriteData((unsigned char *)t,LEN);
for(int i=0;i<9999;i++)
tempbuffer.ReadData();
unsigned char *tempdata=tempbuffer.ReadData(9999);
printf("%02x \n",tempdata[0]);
Dt = Dt.CurrentTime();
Dt.DecodeTime(&HH,&MM,&SS,&MS);
printf("%d%d\n\n",SS,MS);
printf("end while................ \n\n");
Sleep(1000);
}while(1);
delete t;//*/
return 0;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -