求大神帮助!帮我把这段vc的代码翻译成易语言代码或VB代码!翻译不出来的话至少把意思告诉我!
CStringstr;m_edit.GetWindowText(str);str=CString(s)+str;m_edit.SetWindowText(str);DoE...
CString str;
m_edit.GetWindowText(str);
str=CString(s)+str;
m_edit.SetWindowText(str);
DoEvents();
}
int CXve7Dlg::conv(const char* fn, BOOL fast){
int i,l,r,peek[0x400],mn,type=0,pass,mb=0,res;
char buf[200]={0},bc[200];
FILE *fin,*fout,*flog=0;
struct tm *t;
time_t long_time;
time( &long_time );
t = localtime( &long_time );
sprintf(bc,"开始时间:%4d-%.2d-%.2d %.2d:%.2d:%.2d\r\n", t->tm_year+1900, t->tm_mon, t->tm_mday,t->tm_hour, t->tm_min, t->tm_sec);
disp(bc);
if(fast){
fin=fopen(fn,"rb+");
fseek(fin,0x200000,SEEK_SET);
for(i=0;i<0x400;i++)peek[i]=fgetc(fin);
mn=('L'-peek[1]+0x100)&0xff;
if(((peek[1]+mn)&0xff)=='L'&&((peek[2]+mn)&0xff)=='V'){
sprintf(bc,"打开文件%s\r\n",fn);
disp(bc);
disp("格式:flv\r\n");
disp("--启用1秒转换!--\r\n");
fseek(fin,0x200000,SEEK_SET);//向从文件开头移动0x200000
fputc('F',fin);//写“F”
for(i=1;i<4;i++)fputc((peek[i]+mn)&0xff,fin);
for(i=0;i<0x3fc;i++){
r=peek[i+4];
r=(r+mn)&0xff;
fputc(r,fin);
}
fseek(fin,0x20000A,SEEK_SET);
fputc(0x20,fin);
fseek(fin,0,SEEK_SET);
fputc(0x46,fin);//0
fputc(0x4C,fin);
fputc(0x56,fin);
fputc(0x1,fin);
fputc(0x5,fin);//4
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x9,fin);//8
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x0,fin);//C
fputc(0xFF,fin);
fputc(0x1F,fin);
fputc(0xFF,fin);
fputc(0xF1,fin);//10
fclose(fin);
sprintf(buf,"%s.flv",fn);
if(rename(fn,buf)!=0)disp("文件重命名失败,请手动改为.flv扩展名,或检查系统权限\r\n");
disp("转换完成\r\n");
goto fastexit; 展开
m_edit.GetWindowText(str);
str=CString(s)+str;
m_edit.SetWindowText(str);
DoEvents();
}
int CXve7Dlg::conv(const char* fn, BOOL fast){
int i,l,r,peek[0x400],mn,type=0,pass,mb=0,res;
char buf[200]={0},bc[200];
FILE *fin,*fout,*flog=0;
struct tm *t;
time_t long_time;
time( &long_time );
t = localtime( &long_time );
sprintf(bc,"开始时间:%4d-%.2d-%.2d %.2d:%.2d:%.2d\r\n", t->tm_year+1900, t->tm_mon, t->tm_mday,t->tm_hour, t->tm_min, t->tm_sec);
disp(bc);
if(fast){
fin=fopen(fn,"rb+");
fseek(fin,0x200000,SEEK_SET);
for(i=0;i<0x400;i++)peek[i]=fgetc(fin);
mn=('L'-peek[1]+0x100)&0xff;
if(((peek[1]+mn)&0xff)=='L'&&((peek[2]+mn)&0xff)=='V'){
sprintf(bc,"打开文件%s\r\n",fn);
disp(bc);
disp("格式:flv\r\n");
disp("--启用1秒转换!--\r\n");
fseek(fin,0x200000,SEEK_SET);//向从文件开头移动0x200000
fputc('F',fin);//写“F”
for(i=1;i<4;i++)fputc((peek[i]+mn)&0xff,fin);
for(i=0;i<0x3fc;i++){
r=peek[i+4];
r=(r+mn)&0xff;
fputc(r,fin);
}
fseek(fin,0x20000A,SEEK_SET);
fputc(0x20,fin);
fseek(fin,0,SEEK_SET);
fputc(0x46,fin);//0
fputc(0x4C,fin);
fputc(0x56,fin);
fputc(0x1,fin);
fputc(0x5,fin);//4
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x9,fin);//8
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x0,fin);
fputc(0x0,fin);//C
fputc(0xFF,fin);
fputc(0x1F,fin);
fputc(0xFF,fin);
fputc(0xF1,fin);//10
fclose(fin);
sprintf(buf,"%s.flv",fn);
if(rename(fn,buf)!=0)disp("文件重命名失败,请手动改为.flv扩展名,或检查系统权限\r\n");
disp("转换完成\r\n");
goto fastexit; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询