COPYDATASTRUCT使用
先贴一下COPYDATASTRUCT在MSDN里的介绍:
COPYDATASTRUCT Members
dwData
Specifies up to 32 bits of data to be passed to the receiving application.
cbData
Specifies the size, in bytes, of the data pointed to by the lpData member.
lpData
Pointer to data to be passed to the receiving application. This member can be NULL.
我的问题是如果把lpData设NULL,然后将cbData当作第二个DWORD来使用,那么接收方在知道lpData为NULL
以后还会不会依然申请一个以cbData为大小的buffer,按理说是不会了,来求证一下。