c++
smwhotjay
色是无常,无常者是苦,苦者是无我,无我即非我所、非我,亦非自我
展开
-
判断字符串是否有中文
// hasch.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <windows.h>bool hasChinese(const std::wstring& src){ for(int i=0;i<src.size();i++) { WCHAR c=src.at(i); if(c >= 0x4E00 && c <= 0x9FCB |.原创 2020-08-13 11:39:52 · 302 阅读 · 0 评论 -
LSP编程之64位实现的一些经验。
以前32位时,lsp代码正常运行,但安装在win7后也能运行,但逐渐发现32位的lsp dll只能过滤32位的进程.64位的进程似乎没有影响。查看dll模块也没有我的lsp dll身影。百度了下资料。发现了几点。windows LSP 实现及多个lsp兼容安装的几个坑1、在64位系统中,针对32位程序和64位程序需要分别实现对应的LSP模块,即64位程序不会加载32位的lsp2、lsp模块最后放到系统盘的system32(64位 syswow64)下,否则可能导致某些程序加载不到对.原创 2020-06-08 03:23:41 · 1257 阅读 · 1 评论 -
控制台使用命名管道交互
// cmdpipe.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"//int _tmain(int argc, _TCHAR* argv[])//{// return 0;//}//#pragma comment(lib,"user32")#include <stdio.h>#include <string.h>...转载 2018-08-30 16:32:16 · 823 阅读 · 0 评论 -
Reading from a Mailslot/Writing to a Mailslot
The process that creates a mailslot can read messages from it by using the mailslot handle in a call to the ReadFilefunction. The following example calls the GetMailslotInfo function to determine转载 2018-02-04 09:31:50 · 329 阅读 · 0 评论 -
基于 ocr 的屏幕文字识别 开源
基于 ocr 的屏幕文字识别。运行时截屏区域,进行文字识别。下图为运行截图,识别网页内文字并输出到软件edit控件源码下载 点击打开链接或git https://github.com/344717871/img2text原创 2018-02-03 12:26:17 · 3445 阅读 · 1 评论 -
sqlite 网络版2 发布
近期研究了下sqlite. 发觉很好用,但无网络功能.于是自己封装了下c/s.完成了下面作品http://download.csdn.net/detail/smwhotjay/7111669sqlite 非常适合小型场合.对db io不高, access的用了很久,但发布时 遇到莫名其妙的问题.索性把mdb换成sqlite.绿色部署.简单多了.-----------------原创 2014-03-28 12:43:02 · 2427 阅读 · 1 评论 -
img2text 基于ocr的屏幕识别。。运行时截屏区域,进行文字识别
基于ocr的屏幕识别。。运行时截屏区域,进行文字识别https://github.com/344717871/img2text原创 2018-02-01 18:34:26 · 1085 阅读 · 0 评论 -
irrlicht 3d游戏编程1第三人称摄像机
近来有空,打算写点游戏编程的文章。今天第一篇,关于第三人称摄像机的。先看效果按下鼠标中键,左右可旋转,上下可倾斜。下面是代码#include #include // strcpy_s#include using namespace irr;using namespace core;using namespace scene;using namespace video原创 2018-01-02 15:14:44 · 493 阅读 · 0 评论 -
PictureEx.h PictureEx.cpp源码
//////////////////////////////////////////////////////////////////////// PictureEx.cpp: implementation of the CPictureEx class.//// Picture displaying control with support for the following formats转载 2017-12-03 18:51:12 · 964 阅读 · 0 评论 -
分享一个我写的io序列化类IOPack
#include /************************************************************************//* 一个io模版.来实现对结构体等对象的存储和加载 struct stCityInfo { char cityName[255]; POINT A; POINT B; }; IOP原创 2017-10-23 15:18:19 · 301 阅读 · 0 评论 -
邮槽接收简法,不使用GetMailslotInfo,直接ReadFile
int main(int argc, char* argv[]) { char szMailAddr[] = "\\.\Mailslot\mailslot_abc"; HANDLE hMailslot; char buffer[1024]; hMailslot = CreateMailslot(szMailAddr, 0, MAILSLOT_W原创 2018-02-04 09:44:08 · 462 阅读 · 0 评论 -
vnc开源相关记录
收集了几种vnc源码。winvnc - this is the VNC server for Win32tightvnc-2.6.4-src.zipultravnc.tar.gz原创 2019-08-17 21:36:36 · 237 阅读 · 0 评论 -
g711a音频编码记录
写了个安卓wav pcm http直播流的程序。客户端采用sdl2 直接播放pcm.工作的很好,但是,非常耗费带宽差不多100kb/s的网速。非常不利于外网的音频传输。尝试用zlib压缩,效果不尽理想。只压缩成90%。节约了1/10带宽遂放弃。尝试了安卓端mp3直播,效果不错,差不多带宽30kb/s 。但是mp3有个很大的问题,就是延迟增大了几秒。研究了下wav压缩音频格式,发觉还有g...原创 2019-07-12 14:30:48 · 902 阅读 · 0 评论 -
error C3861: “_ftelli64”: 即使使用参数相关的查找,也未找到标识符
用vs2003编译项目,结果遇到这个错误。显然是找不到api.解决办法:用vs2008,使用更新的api原创 2019-06-03 16:06:42 · 846 阅读 · 0 评论 -
解决wprintf unicode工程不显示的问题
#include <locale.h>setlocale(LC_ALL, "");设置下字符集就好了。#include <locale.h>#include <iostream>#include "tchar.h"using namespace std;int main(){ setlocale(LC_ALL, "");...原创 2019-03-19 10:12:43 · 416 阅读 · 0 评论 -
ansi unicode 字符串常用函数对照表
printf 宽字符版本 wprintf ,通用函数 _tprintfstrcmp 宽字符版本 wcscmp , 通用函数 _tcscmpsprintf 宽字符版本swprintf , 通用函数 wsprintf _stprintf_sstrcpy 宽字符版本wcscpy 通用函数 _tcscpystrcat 宽字符版本 w...原创 2019-03-18 19:17:22 · 393 阅读 · 0 评论 -
mfc 申请大于4g文件
//对文件进行写操作 CFile mFile( "user.dat" ,CFile::modeWrite|CFile::modeCreate); //mFile.Write(sRead,2); ULONGLONG len=ULONGLONG(5) * 1024 * 1024 * 1024 ; //5gb mFile.SetLength(len); mFile.Flush(); ...原创 2019-03-04 17:12:31 · 393 阅读 · 0 评论 -
win32截屏并rgb24转yuv420
void ScreenCap(void* buf, int w, int h){ HWND hDesk = GetDesktopWindow(); HDC hScreen = GetDC(hDesk); int width = w;//GetDeviceCaps(hScreen, HORZRES); int height = h;//GetDeviceC...原创 2018-09-23 17:11:26 · 414 阅读 · 0 评论 -
http parser库的使用方法
#include "http_parser.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <time.h>static http_parser *parser;int on_message_...原创 2018-09-09 20:36:00 · 4452 阅读 · 0 评论 -
rtmpsuck.cpp win32 源码
/* RTMP Proxy Server* Copyright (C) 2009 Andrej Stepanchuk* Copyright (C) 2009 Howard Chu** This Program is free software; you can redistribute it and/or modify* it under the terms of the G...原创 2018-09-11 12:22:09 · 365 阅读 · 0 评论 -
socket之重叠io
// 另一个重叠io.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"//#include #include #include #include #pragma comment(lib, "ws2_32.lib")// TODO: 在此处引用程序要求的附加头文件#define DATA_BUFSIZE 1024 //转载 2017-10-12 13:04:21 · 439 阅读 · 0 评论 -
网络流量监视悬浮窗口仿360界面
<br />网上找流量监视的软件,都TM egg pains,要么不好用,要么还有毒.没办法,作为程序员,还是自力更生吧.经过一天努力.把网络流量监视的软件写好了.<br /> <br />运行界面如下<br /> <br /><br /> <br /> <br />程序下载地址原创 2011-06-02 10:35:00 · 1710 阅读 · 1 评论 -
CMFCADO类
自己简单封装的ado使用方法如下#include "MFCADO.h"void test_query(CMFCADO& c){ if(c.GetRecordSet("select * from reward_def")) { while( RS_NOT_EOF(c.m_pRS) ) { printf("%s %d \n ", RS_GET_S原创 2017-09-11 10:47:52 · 672 阅读 · 0 评论 -
micro_httpd
/* micro_httpd - really small HTTP server**** Copyright ?1999,2005 by Jef Poskanzer .** All rights reserved.**** Redistribution and use in source and binary forms, with or without** modification转载 2015-01-17 10:44:08 · 1157 阅读 · 0 评论 -
tinyhttpd-0.1.0和win移植版
tinyhttpd-0.1.0 是个国外开源的小型http server.linux版 c代码/* httpd.c J. David's webserver *//* This is a simple webserver. * Created November 1999 by J. David Blackstone. * CSE 4344 (Network concepts原创 2015-01-17 10:42:44 · 1417 阅读 · 0 评论 -
cmd后门
// door.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h" #include #include "stdafx.h"#include #pragma comment(lib,"Ws2_32")void door();int main(int argc, char* argv[]){ door(); return 0;}转载 2015-01-14 21:17:12 · 1012 阅读 · 0 评论 -
bash: /home/x/.bash_profile: line 48: syntax error: unexpected end of file的解决
cygwin 配置时.运行cygwin.bat就有错. bash: $'\r': command not foundbash: $'\r': command not foundbash: $'\r': command not foundbash: $'\r': command not foundbash: $'\r': command not foundbash: $'原创 2014-03-24 10:46:48 · 2581 阅读 · 0 评论 -
TCHAR 宽字节的sprintf
TCHAR szMessage[128]=TEXT("");_sntprintf(szMessage,CountArray(szMessage),TEXT("第%d天登录,今天已xxx"), 1 );原创 2013-07-31 17:37:48 · 6156 阅读 · 0 评论 -
解决------------GetFieldValue 报错:无效的描述符索引
CRecordset GetFieldValue 有时报这个错.原因是访问列要顺序.不要先GetFieldValue后面的列.再GetFieldValue前面的列.那会导致前面的获取不到值.报这个错.即要按列顺序来访问原创 2013-07-24 15:53:51 · 991 阅读 · 0 评论 -
mfc ansi unicode转换
#include "ATLCONV.H" CString strValue;char temp[255]=""; USES_CONVERSION;//strcpy(temp,W2A( strValue.GetBuffer() ) );// mfc 工程 unicode编码. unicode -> ansi 反之A2W 使用 ATL 提供的转换宏。原创 2013-07-24 16:17:58 · 1252 阅读 · 0 评论 -
mfc 得到exe绝对路径
CString GetFilePath(){ char exepath[MAX_PATH]; CString strdir,tmpdir; memset(exepath,0,MAX_PATH); GetModuleFileName(NULL,exepath,MAX_PATH); tmpdir=exepath; strdir=tmpdir.转载 2013-07-14 15:32:45 · 566 阅读 · 0 评论 -
遍历所有hwnd窗口+标题
// 获得首个handle. HWND h = FindWindow(0,0); // 循环查找直到找到为给定进程ID的窗口句柄 while( h != NULL) { //检查窗口句柄是否为顶级窗口 if( ::GetParent(h) == NULL ) { char text[255]; ::GetWindowTextA(h,text,255原创 2013-05-21 13:45:09 · 3367 阅读 · 0 评论 -
c++ split
void split(const string& src, const string& separator, vector& dest){ string str = src; string substring; string::size_type start = 0, index; do { index = str.find_first_of(separator,转载 2013-05-20 13:05:15 · 604 阅读 · 0 评论 -
win32 sdk inputbox 输入框
//InputDialog.cpp #include "StdAfx.h"#include ".\inputdialog.h"CInputDialog::CInputDialog(void){}CInputDialog::~CInputDialog(void){} LRESULT CALLBACK InputBoxWndProc(HWND W转载 2013-05-17 19:33:55 · 1745 阅读 · 0 评论 -
raknet教程1
开源游戏通讯引擎RakNet Raknet是一个基于UDP网络传输协议的C++网络库,允许程序员在他们自己的程序中实现高效的网络传输服务。通常情况下用于游戏,但也可以用于其它项目。Raknet有以下好处:l 高性能 在同一台计算机上,Radnet可以实现在两个程序之间每秒传输25,000条信息;l 容易使用 Raknet有在线用户手册,视频教程原创 2015-01-15 22:59:10 · 1842 阅读 · 0 评论 -
irrlicht 赛车demo
http://download.csdn.net/detail/smwhotjay/8431601原创 2015-02-07 18:37:15 · 667 阅读 · 0 评论 -
[原创]irrlicht 3d游戏武器粒子特效的实现1
[原创]irrlicht 3d游戏武器粒子特效的实现3d游戏里的武器特效比如有粒子发光,火焰,或者是剑气散发出来。一般都可以用粒子来实现原创 2017-07-27 13:44:55 · 982 阅读 · 0 评论 -
[原创]irrlicht 3d游戏武器粒子特效的实现2
上次讲解了3d游戏里武器的粒子效果实现,今天继续讲解武器表面增强(加)一层纹理特效。先来看下效果 原来武器表面是没有这个七彩图片流动的效果的。 原武器的图片 这个技术用到了hlsl ,高阶着色器语言(High Level Shader Language,简称HLSL)irrlicht的 10.Shaders 就是hlsl的使用例子。hlsl又分多种语言原创 2017-08-16 16:47:13 · 505 阅读 · 0 评论 -
irrlicht 3d rpg demo 源码发布
https://github.com/344717871/3drpgdemo转载 2015-05-21 18:05:08 · 744 阅读 · 4 评论 -
游戏编程精粹 附带光盘
精粹5源代码.rar 精粹7源代码.rar 游戏编程精粹:e53413c00081a010e(1).iso游戏编程精粹:f33092a0004fd00ea.iso 游戏编程精粹:G898.2 T386(1).rar 游戏编程精粹:G898.2 T386(2).rar游戏编程精粹:G898.2 T386(4).rar 游戏编程精粹:G898.2 T386.rar http:/原创 2016-09-04 19:26:56 · 1818 阅读 · 1 评论