消息问题 一般消息发过来我们怎么来区分消息那些的数据那些是命令? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 数据一般放在wParam和lParam里,消息放在Msg参数里 数据放在wParam和lParam消息Msg结构内 问个弱弱的问题WParam是什么? 数据放在wParam和lParam 而消息存在Msg结构内 typedef struct _ipHeader{ UCHAR VersionHLen; UCHAR TOS; USHORT Length; USHORT Ident; USHORT FlagsOffset; UCHAR TTL; UCHAR Protocol; USHORT CheckSum; UINT SrcAddr; UINT DesAddr;}IpHeader,*PIpHeader;这个是IP首部的定义,这些是必须有的接在这个后面就是数据比如传输层传下来的TCP报文 ---------------------------------------------- | ip header | tcp header(or x header) | data | ---------------------------------------------- IP header structure: 4 8 16 32 bit |--------|--------|----------------|--------------------------------| | Ver | IHL |Type of service | Total length | |--------|--------|----------------|--------------------------------| | Identification | Flags | Fragment offset | |--------|--------|----------------|--------------------------------| | Time to live | Protocol | Header checksum | |--------|--------|----------------|--------------------------------| | Source address | |--------|--------|----------------|--------------------------------| | Destination address | |--------|--------|----------------|--------------------------------| | Option + Padding | |--------|--------|----------------|--------------------------------| | Data | |--------|--------|----------------|--------------------------------| TCP header structure: 16 32 bit |--------------------------------|--------------------------------| | Source port | Destination port | |--------------------------------|--------------------------------| | Sequence number | |--------------------------------|--------------------------------| | Acknowledgement number | |--------------------------------|--------------------------------| | Offset | Resrvd |U|A|P|R|S|F| Window | |--------------------------------|--------------------------------| | Checksum | Urgent pointer | |--------------------------------|--------------------------------| | Option + Padding | |--------------------------------|--------------------------------| | Data | |--------------------------------|--------------------------------| C++ 控制台运行很慢,怎么办? 菜鸟问一个VC6编译问题 如何获得一个edit控件所在dialog的句柄? chm 文件乱码的问题 在客户端的程序,通过什么样的方式,把在FTP服务器上的文件备份到另一个地方比较好? 请问下面的东西什么意思? 如何解决多语言编程? 关于vc++中调用excel模板生成报表的疑惑 图片格式的文件处理 _variant_t 是个什么东西? 如何在运行时改变BCGPro库中菜单项的文字? 如何把写好的VC程序变成安装文件
消息Msg结构内
WParam是什么?
{
UCHAR VersionHLen;
UCHAR TOS;
USHORT Length;
USHORT Ident;
USHORT FlagsOffset;
UCHAR TTL;
UCHAR Protocol;
USHORT CheckSum;
UINT SrcAddr;
UINT DesAddr;
}IpHeader,*PIpHeader;这个是IP首部的定义,这些是必须有的
接在这个后面就是数据
比如传输层传下来的TCP报文
| ip header | tcp header(or x header) | data |
---------------------------------------------- IP header structure:
4 8 16 32 bit
|--------|--------|----------------|--------------------------------|
| Ver | IHL |Type of service | Total length |
|--------|--------|----------------|--------------------------------|
| Identification | Flags | Fragment offset |
|--------|--------|----------------|--------------------------------|
| Time to live | Protocol | Header checksum |
|--------|--------|----------------|--------------------------------|
| Source address |
|--------|--------|----------------|--------------------------------|
| Destination address |
|--------|--------|----------------|--------------------------------|
| Option + Padding |
|--------|--------|----------------|--------------------------------|
| Data |
|--------|--------|----------------|--------------------------------| TCP header structure:
16 32 bit
|--------------------------------|--------------------------------|
| Source port | Destination port |
|--------------------------------|--------------------------------|
| Sequence number |
|--------------------------------|--------------------------------|
| Acknowledgement number |
|--------------------------------|--------------------------------|
| Offset | Resrvd |U|A|P|R|S|F| Window |
|--------------------------------|--------------------------------|
| Checksum | Urgent pointer |
|--------------------------------|--------------------------------|
| Option + Padding |
|--------------------------------|--------------------------------|
| Data |
|--------------------------------|--------------------------------|