直接上代码: ///////查看执行文件的路径下面是否有db文件夹,若没有则新建///////// CFileFind cff; if (cff.FindFile(_T("db")) == 0) //当前路径,没找到db文件夹 { CString strText; TCHAR exepath[MAX ...
分类:
编程语言 时间:
2016-11-22 22:28:43
阅读次数:
215
由于在win32中直接调用TRACE函数比较麻烦,需要引用MFC的头文件,容易错误,这里使用OutputDebugString函数的基础上封装,实现TRACE函数功能,具体函数如下: 注意由于,VS默认字符集是UNIcode,这种字符集下char不等于TCHAR,调试会不成功,此时要在项目属性->常 ...
1.方阵 2 99乘法表 3 字符串 4 not found ...
分类:
其他好文 时间:
2016-11-19 23:17:03
阅读次数:
156
Substring Given a set of pattern strings, and a text, you have to find, if any of the pattern is a substring of the text. If any of the pattern string ...
分类:
其他好文 时间:
2016-11-18 11:55:22
阅读次数:
205
注意事项打开编译器,运行代码代码如下//WinpCapTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<pcap.h>int_tmain(intargc,_TCHAR*argv[]){pcap_if_t*allAdapters;//适配器列表pcap_if_t*adapter;pcap_t*adapterHandle;//适配器句柄u_charpacket[10..
分类:
其他好文 时间:
2016-11-17 02:42:32
阅读次数:
159
//WinpCapTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<pcap.h>int_tmain(intargc,_TCHAR*argv[]){pcap_if_t*allAdapters;//适配器列表pcap_if_t*adapter;pcap_t*adapterHandle;//适配器句柄u_charpacket[1020];//待发送的数据封包charerrorBuffe..
分类:
其他好文 时间:
2016-11-17 02:39:35
阅读次数:
126
#include"stdafx.h"#include.h>int_tmain(intargc,_TCHAR*argv[]){pcap_if_t*allAdapters;//适配器列表pcap_if_t*adapter;pcap_t*adapterHandle;//适配器句柄u_charpacket[1020];//待发送的数据封包charerrorBuffer[PCAP_ERRBUF_SIZE];//错误信息缓冲区if(pcap_findalldevs_..
分类:
其他好文 时间:
2016-11-17 02:39:19
阅读次数:
233
通过对方的mac地址和ip地址用程序实现对其他电脑阻止上网,以下是实现代码://WinpCapTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<pcap.h>int_tmain(intargc,_TCHAR*argv[]){pcap_if_t*allAdapters;//适配器列表pcap_if_t*adapter;pcap_t*adapte..
分类:
其他好文 时间:
2016-11-17 02:28:57
阅读次数:
132
一、在VisualStudio2010软件中建立一个项目,配好相应的属性,将以下代码粘贴项目栏中,调试运行以下代码。//WinpCapTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<pcap.h>int_tmain(intargc,_TCHAR*argv[]){pcap_if_t*allAdapters;//适配器列表pc..
分类:
其他好文 时间:
2016-11-17 02:28:09
阅读次数:
265