[解决方法] 对上述程序改动如下: 发送端: MMM SendBag ZeroMemory(&SendBag,sizeof(SendBag)) ............. int send = 0 while(send<sizeof(MMM)) { int nCharSend=send(m_hSocket,(char*)(&SendBag+send),sizeof(MMM)-send,0) send+=nCharSend } 接收端: MMM RecvBag ZeroMemory(&RecvBag,sizeof(RecvBag)) recv写法同上while... 此方法适合传送结构体的实现. 赶快试试看.
标签: SendBag ZeroMemory sizeof MMM
上传时间: 2013-12-03
上传用户:三人用菜
词法分析 1 试验目的 设计,编制并调试一个此法分析程序,加深对此法分原理的理解. 2 试验要求 1)待分析的简单语言的词法 * 关键字: begin if then while do end 所有关键字都是小写. 2)运算符和界符: : = + * - / < <= <> > >= = ( ) # 3)其他单词是标识符(ID)和整数型常数(NUM),通过一下正规式定义: ID=letter (letter|digit)* NUM=digit digit* 4)空格由空白,制表符和换行符组成,空格一般用来分隔ID,NUM,运算符,界符和关键字,此法分析阶段通常被忽略. 3 各种单词符号对应的种别码如表所示
上传时间: 2017-01-08
上传用户:dongqiangqiang
Introduction Computer security is undeniably important, and as new vulnerabilities are discovered and exploited, the perceived need for new security solutions grows. "Trusted computing" initiatives propose to solve some of today s security problems through hardware changes to the personal computer. Changing hardware design isn t inherently suspicious, but the leading trusted computing proposals have a high cost: they provide security to users while giving third parties the power to enforce policies on users computers against the users wishes -- they let others pressure you to hand some control over your PC to someone else. This is a "feature" ready-made for abuse by software authors who want to anticompetitively choke off rival software. It needn t be this way: a straightforward change to the plans of trusted computing vendors could leave the security benefits intact while ensuring that a PC owner s
标签: vulnerabilities Introduction discovered undeniably
上传时间: 2014-01-05
上传用户:yph853211
The worm will produce Arod.exe and " get to C: \WINDOWS catalogue . After starting the machine again , will put worm shelf Arod.exe into C: \, C:\WINDOWS,In zip file under WINDOWS \system32 , these three catalogues ,. As the user opens Outlook Express, the worm will search Outlook Express and accept a mail while inserting , and falsely use the person who sends one name and send the addressee for this mail of worm s mail automatically.
标签: catalogue starting produce WINDOWS
上传时间: 2013-12-18
上传用户:wang5829
用pascal编一个年历具体要求是:设计电子月历的程序 一、任务内容(task) 1.设计的程序应具有以下功能: (1)任意输入某年的某一月份,屏幕应能显示该月的月历; (2)应允许多次从键盘输入某月份,并自行设置结束标志。 (3)如在屏幕上输入2007年12月份的信息,屏幕的显示形式如下: month Sun. Mon. Tue. Wed. Thu. Fri. Sat. 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (4)备注:输出界面也可以是其它形式,另外还可对输出界面进行必要的修饰(如:加入表格线)。 2.程序设计要求: 1)采用结构化的程序设计方法进行编程; 2)用case控制语句实现选择分支结构; 3)用while \repeat…until\for语句实现循环结构; 4)利用标准过程readkey实现程序执行暂停; 5)利用标准过程 clrscr实现清屏操作。
上传时间: 2014-01-07
上传用户:franktu
PC与单片机双向通讯智能温控程序 #include <AT89X51.H> #include <intrins.h> #define Key_UP P1_0 #define Key_DOWN P1_1 #define Key_SET P1_2 #define RelayOutPort P2_0 #define LEDPort P0 #define DELPort P2_1 #define LEDTwoC P3_6 #define LEDThreeC P3_7 #define TMPort P2_7 #define INBUF_LEN 5 //数据长度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 , 0 } //发送缓冲区 unsigned char inbuf2[50] //接收缓冲区 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr TMOD |= 0x20 //TMOD: timer 1, mode 2, 8-bit reload PCON |= 0x80 //SMOD=1 TH1 = 0xFA //Baud:4800 fosc=11.0592MHz IE |= 0x90 //Enable Serial Interrupt TR1 = 1 // timer 1 run } //向串口发送一个字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
标签: include intrins define Key_UP
上传时间: 2014-11-29
上传用户:风之骄子
VB遥控播放器红外遥控解码 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sbit beep=P2^1 //sbit RELAY=P2^0 #define INBUF_LEN 4 //数据长度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 } //发送缓冲区 unsigned char inbuf2[50] //接收缓冲区 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr T2CON=0x30 TH2=0x00 TL2=0x00 RCAP2H=0xFF RCAP2L=0xDC TR2=1 } //向串口发送一个字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
标签: include 110592 120000 define
上传时间: 2013-12-21
上传用户:yph853211
LXI Standards Documents are developed within the LXI Consortium and LXI Technical Working Groups sponsored by the LXI Consortium Board of Directors. The LXI Consortium develops its standards through a consensus development process modeled after the American National Standards Institute, which brings together volunteers representing varied viewpoints and interests to achieve the final product. Volunteers are not necessarily members of the Consortium and serve without compensation. while the LXI Consortium administers the process and establishes rules to promote fairness in the consensus development process, the LXI Consortium does not exhaustively evaluate, test, or verify the accuracy of any of the information contained in its standards.
标签: LXI Consortium Documents Standards
上传时间: 2013-12-23
上传用户:sxdtlqqjl
这个是我调通的在2410下运行文件系统的程序. 用2410驱动sd卡来实现fat文件系统. 欢迎大家来测试. 用法很简单, 如下 FILE *fp // 文件指针 unsigned char temp[24]="3.wav" // 文件明需要放在数组里 while(!initialize_media()) // 初始化sd卡 { Uart_Printf("sd initializing....\n") } Uart_Printf("sd ready\n") fp=fopen(temp, READ) // 打开文件就可以用了, 函数和标准c中的一样,所以不能加载stdio.h if(!fp) { Uart_Printf("open file wrong\n") while(1) } Uart_Printf("open file successed\n")
上传时间: 2013-12-30
上传用户:xlcky
MCPU is a minimal cpu aimed to fit into a 32 Macrocell CPLD - one of the smallest available programmable logic devices. while this CPU is not powerful enough for real world applications it has proven itself as a valuable educational tool. The source code is just a single page and easily understood. Both VHDL and Verilog versions are supplied. The package comes with assembler, emulator and extensive documentation.
标签: Macrocell available smallest programm
上传时间: 2017-03-11
上传用户:mikesering