Windows
文章平均质量分 75
freeangeles
这个作者很懒,什么都没留下…
展开
-
C++Windows下如何让窗口进程只运行一个实例
为了方便我们新建一个名为MFCTest的MFC对话框项目然后打开找到CMFCTestApp::InitInstance()函数添加单实例检测代码:BOOL CMFCTestApp::InitInstance(){ ////////////////////////////////////////////////////////////////////////// //单实例检测 tr原创 2015-10-20 11:46:16 · 3084 阅读 · 1 评论 -
WSAEventSelectI/O模型中FD_WRITE事件的处理以及如何发送数据
网上很多人都在问什么时候才会触发FD_WRITE,触发了我该怎么发送数据,如果没有触发,我又该如何发数据?当第一次连接成功的时候会触发FD_WRITE,还有就是当send 返回SOCKER_ERROR并且 WSAGetLastError()返回 WSAEWOULDBLOCK 这时表示缓冲区已满,当数据发送出去,又有空闲的缓冲区时会触发FD_WRITE,表示缓冲区可写。也就是说只有缓原创 2014-05-20 10:30:10 · 2171 阅读 · 0 评论 -
利用OpenCV将图片反色
#include #include INT APIENTRY wWinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in LPWSTR lpCmdLine, __in int nShowCmd ){ //加载一张图片,随便找一张jpg图片放到跟Main.cpp同目录改成test.jpg即可 Ipl原创 2014-08-26 14:36:23 · 2812 阅读 · 0 评论 -
WIN7+VS2010下配置编译Boost_1.55
1.官方最新版下载地址:http://www.boost.org/2原创 2014-08-27 19:34:42 · 3385 阅读 · 0 评论 -
WIN7+VS2010下编译Lua_5.2.3
1.官方最新版Lua下载地址:http://www.lua.org/download.html2.编译步骤原创 2014-08-30 16:05:38 · 1295 阅读 · 0 评论 -
C++Windows下创建多级目录
#include #include #include #pragma comment( lib, "Shlwapi.lib" )#include bool CreateMultipleDirectory( LPCTSTR pDirectory ){ if( NULL == pDirectory ) { return false; } //目录或文件已存在 if( Path原创 2015-10-19 15:40:58 · 3893 阅读 · 0 评论 -
C++Windows下递归遍历多级目录
#include #include #include #pragma comment( lib, "Shlwapi.lib" )#include bool ForeachFileByDirectory( LPCTSTR pDirectory ){ if( NULL == pDirectory ) { return false;原创 2015-10-19 17:15:34 · 2312 阅读 · 0 评论 -
C++Windows下CONTAINING_RECORD宏的用法和详解
#include #include int main(){ struct ABCD { int a; int b; int c; int d; }; //CONTAINING_RECORD宏的作用就是根据结构体 //类型和结构体中成员变量地址和名称则可求出 //该变量所在结构体的指针 ABCD Abcd = { 1, 2, 3, 4 }; //假设我们知道AB原创 2015-10-20 10:44:52 · 5267 阅读 · 0 评论 -
C#实现http多线程下载文件
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.IO;using System.Net;using u32 = System.UInt32;using s32 = System.Int32;us原创 2016-05-30 23:49:22 · 8528 阅读 · 0 评论 -
C#实现http多线程断点续传下载文件
using System;using System.Collections.Generic;using System.IO;using System.Threading;using System.Net;using u8 = System.Byte;using u16 = System.UInt16;using s32 = System.Int32;using u32 = Syst原创 2016-05-31 22:21:05 · 3481 阅读 · 0 评论 -
C#使用SevenZipSharp库时如何去掉压缩文件中的目录文件夹
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) {原创 2016-06-02 22:20:34 · 4298 阅读 · 0 评论 -
C++Windows下SQLite简单封装
SQLiteCommand.h:#pragma once#include #include #include #include "sqlite3.h"class SQLiteCommand{ public: SQLiteCommand(); ~SQLiteCommand(); bool Connect(原创 2015-12-10 23:58:01 · 1538 阅读 · 0 评论