如何用VC++进行缓冲区截断部分数据的编程

来源:百度知道 编辑:UC知道 时间:2024/05/26 04:05:10
本人的必设课题是用VC++进行数据的采集并进行显示。数据地接受可以实现,数据接受后放入缓存区内,必须对接受所数据进行截断后,即接受1000个字节的数据后停止接受,然后读取缓存区中的数据进行显示。否则容易造成电脑的死机,达不到预期效果。哪位高手能帮我便一段程序来完成缓存区内的数据截断编程。多谢了!!!有高高的奖赏的!!本人的QQ号是409593149。等待你的联系,急需你的帮助!!!!

*
* Finally, function prototypes for the GSSAPI routines.
*/

#if defined (_WIN32) && defined (_MSC_VER)
# ifdef GSS_DLL_FILE
# define GSS_DLLIMP __declspec(dllexport)
# else
# define GSS_DLLIMP __declspec(dllimport)
# endif
#else
# define GSS_DLLIMP
#endif
...........
/*
* The implementation must reserve static storage for a
* gss_OID_desc object containing the value
* {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"},
* corresponding to an object-identifier value of
* {iso(1) member-body(2) United States(840) mit(113554)
* infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.
* The constant GSS_C_NT_MACHINE_UID_NAME should be
* initialized to point to that gss_OID_desc.
*/
GSS_DLLIMP extern gss_OID GSS_C_NT_MACHINE_UID_NAME;

还有下面:

#ifndef KRB5_CALLCONV
#d