自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

一步一步

没有热忱,世间便无进步。

  • 博客(15)
  • 资源 (3)
  • 收藏
  • 关注

原创 SDK关机

// test32.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include int _tmain(int argc, _TCHAR* argv[]){ HANDLE hToken = NULL; BOOL bResult = FALSE; TOKEN_PRIVILEGES tkp; bResult = ::OpenProcessToken(::GetCu

2010-06-24 15:11:00 969

原创 TemplateMethod模式

<br />// ProxyTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>using namespace std;//定义一个操作中的算法的骨架,而将一些步骤延迟到子类中。TemplateMethod 使得子类可以不改变一个算法的结构即可重定义该算法的某些特定步骤class AbstractClass{public:

2010-06-21 21:51:00 757

原创 Proxy模式

<br />// ProxyTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>using namespace std;//为其他对象提供一种代理以控制对这个对象的访问class ISubject{public: virtual int Add(int a, int b) = 0; virtual int Sub(i

2010-06-21 20:31:00 1127

原创 Decorator模式

<br />// DecoratorTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>//动态地给一个对象添加一些额外的职责。就增加功能来说,Decorator 模式相//比生成子类更为灵活class IShow{public: virtual void Singing(void) = 0;};class CT

2010-06-20 22:09:00 782

原创 Composite模式

<br />// compositeTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <Windows.h>//将对象组合成树形结构以表示“部分-整体”的层次结构。Composite使得用户对//单个对象和组合对象的使用具有一致性#include <list>#include <string>#include <algorithm>#

2010-06-20 16:01:00 868

原创 Bridge模式

<br />// builderTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"//实现类的抽象基类,定义了实现Abastraction的基本操作,而它的派生类实现这些接口class Implementor{public: virtual void Operation(void) = 0;};class CAImplementor : public

2010-06-19 23:26:00 654

原创 Adapt模式

// builderTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"class IAdd{public: virtual int Add(int a, int b) = 0;};//有一个类实现了这个功能(利用已有的轮子,避免重复发明)class COtherAdd{public: virtual int OtherAdd(int a, in

2010-06-19 22:39:00 1666

原创 Prototype模式

<br />class IOS {public: virtual IOS* Clone(void) const = 0;};class CWinodowXP : public IOS{public: virtual IOS* Clone(void) const { return new CWinodowXP(*this);//用了默认的拷贝构造函数 }};class CWindow7 : public IOS{public: virtua

2010-06-19 22:10:00 1299

原创 Builder模式

<br />// builderTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"//将一个复杂对象的构建与其表示相分离,使得同样的构建过程可以创建不同的表示。(GoF)class CDoor{};class CWindow{};class CWall{};class CFloor{};class CCeiling{};

2010-06-19 17:00:00 947

原创 远程线程dll注入

<br />// injectDll.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <Windows.h>#include <Shlwapi.h>int _tmain(int argc, _TCHAR* argv[]){ //获取要注入的dll路径,我这里是放在本模块同一个路径下 TCHAR szDllPath[MAX_PATH] = { 0 };

2010-06-10 13:55:00 1048

原创 windows64位系统判断

<br />typedef BOOL WINAPI FN_ISWOW64_PROC(HANDLE hProcess, PBOOL Wow64Process);BOOL Is64bitWindows(void);BOOL Is64bitWindows(void){ BOOL bRet = FALSE;#ifdef _WIN64 bRet = FALSE; goto Exit0;#else OSVERSIONINFOEX osex; osex.dwOSVersionInf

2010-06-08 21:04:00 917

原创 windows系统信息

<br />// sysinfoTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <windows.h>#include <iostream>using namespace std;int Greater(int nNum);enum LEG{ LESS = -1, EQUAL = 0, GREATER = 1,};int

2010-06-06 20:51:00 668

原创 gethostname和gethostbyname,inet_ntoa

<br />// socketTest.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <WinSock2.h>#include <iostream>using namespace std;int _tmain(int argc, _TCHAR* argv[]){ WSADATA wsData = { 0 }; int nRet = ::WSAS

2010-06-04 17:11:00 2645

原创 一个简单的线程池设计模型

<br />#pragma onceclass CXThreadJob{public: CXThreadJob(void); ~CXThreadJob(void);public: /* 用户对象纯虚函数 */ virtual void DoJob(void* pParam) = 0;};#pragma once#include <queue>#include "XThreadJob.h"class CXThreadPool{public:

2010-06-04 15:14:00 859

原创 windows服务程序初探

<br />// serviceProgram.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <Windows.h>//服务程序:当一个应用程序需要常驻系统,或者随时为其它应用程序提供服务时,可以使用服务应用程序SERVICE_STATUS g_SplSrvServieStatus;SERVICE_STATUS_HANDLE g_SplSrvService

2010-06-02 20:43:00 807

C++ SMTP协议发送邮件模块(支持身份验证)

解压后,添加所有文件到工程中,并且设置include路径即可 (这个也是我参考别人的东西,整理了一下,加入身份验证)

2010-09-17

cximage600_full.zip

开源的C++图像处理类,支持十几种格式的图片互转

2008-12-25

CListCtrl数据导入到Excel VC++封装

CListCtrl数据导入到Excel VC++封装

2008-09-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除