- 博客(33)
- 资源 (27)
- 收藏
- 关注
转载 VC++中字符串编码的转换
http://www.cnblogs.com/luxiaoxun/p/3454733.html 在以前VC++6.0中默认的字符集是多字节字符集(MBCS:Multi-Byte Character Set),而VS2005及以后默认的字符集是Unicode,这样导致以前在VC6.0中非常简单实用的各类字符操作和函数在VS2010环境下运行时会报各种各样的错误。字符集可以通过工程属性修改
2014-10-30 00:29:09 913
转载 CTime之Format
The format argument consists of one or more codes; as in printf, the formatting codes are preceded by a percent sign (%). Characters that do not begin with% are copied unchanged to strDest. The
2014-10-28 23:06:46 1259
转载 C++时间与字符串转换
1、常用的时间存储方式1)time_t类型,这本质上是一个长整数,表示从1970-01-01 00:00:00到目前计时时间的秒数,如果需要更精确一点的,可以使用timeval精确到毫秒。2)tm结构,这本质上是一个结构体,里面包含了各时间字段struct tm { int tm_sec; /* seconds after the minute - [0,59]
2014-10-28 21:58:46 3870
转载 C++时间标准库时间time和系统时间的使用
http://www.cnblogs.com/yukaizhao/archive/2011/04/29/cpp_time_system_time.html1. C++标准库中的时间需要引用time.h,可以取的本地时间或者格林威治时间,只能精确到秒
2014-10-28 21:51:24 1028
转载 CString,TCHAR ,string,char等数据类型转换
由于我习惯用的是VS2008,也提醒初用它的朋友: VS中默认的是在UNICODE字符编码,所以字符串数据要用(TEXT)或_T转换下如:CString str=_T("good luck with you!");。平时我们用到的一些数据类型需要转换才可以正常使用,下面简单的介绍下常用的数据类型转换:string 转 CStringCString.format(”%s”, stri
2014-10-28 10:45:55 1123
转载 string与wstring转换
方法一:MultiByteToWideChar、WideCharToMultiByteBOOL StringToWString(const std::string &str,std::wstring &wstr) { int nLen = (int)str.length(); wstr.resize(nLen,L' '); i
2014-10-28 10:37:03 911
转载 POS DES MAC 算法
http://hudeyong926.iteye.com/blog/1928324DES和MAC加解密算法,已经在多个产品中得到了实际应用,不需任何修改就可使用本文根据《中国银联直联POS终端规范》的阐述,用C语言编程实现,该算法在实际的商业POS终端中使用。POS终端采用ECB的加密方式,简述如下:a) 将欲发送给POS中心的消息中,从消息类型(MTI)到63域之间的
2014-10-27 23:53:13 1874
转载 POS终端MAC算法-C语言实现
本文根据《中国银联直联POS终端规范》的阐述,用C语言编程实现,该算法在实际的商业POS终端中使用。POS终端采用ECB的加密方式,简述如下:a) 将欲发送给POS中心的消息中,从消息类型(MTI)到63域之间的部分构成MAC ELEMEMENT BLOCK (MAB)。b) 对MAB,按每8个字节做异或(不管信息中的字符格式),如果最后不满8个字节,则添加“0X00”。
2014-10-27 23:40:55 2507
转载 Crypto API 学习笔记一
http://www.pediy.com/kssd/pediy08/pediy8-364.htmCrypto API 学习笔记一微软公司在NT4.0以上版本中提供了一套完整的Crypto API的函数,支持密钥交换,数据加密解密,数字签名,给程序员带来了很大方便,用户在对软件进行保护的时候可以直接利用Crypto API来完成这些工作,比如计算注册码,检查程序的完整性等。
2014-10-27 18:50:18 1254
转载 Cryptopp使用
http://blog.csdn.net/lee353086/article/details/7594165#pragma once/*本模块功能: AES加解密,SHA256生成内容文摘,RSA非对称加解密。測試環境: [1]VS2008 SP1 [2]WinXP SP3 [3]cryptopp561測試時間: [1]2012-7 by kagula更新
2014-10-27 18:24:28 2720 1
转载 使用c++11标准库转换字符编码
#include #include #include const std::string ws2s( const std::wstring& src ){ std::locale sys_locale(""); const wchar_t* data_from = src.c_str(); const wchar_t* data_from_end = src.c_str() +
2014-10-27 14:15:28 1852
转载 Named Pipe Server Using Completion Routines
The following example is a single-threaded pipe server that creates a message-type pipe and uses overlapped operations. It uses the extended functions ReadFileEx and WriteFileEx to perform overlappe
2014-10-21 11:31:55 1119
转载 [多线程命名管道服务器]Multithreaded Pipe Server
http://msdn.microsoft.com/en-us/library/aa365588(v=vs.85).aspxThe following example is a multithreaded pipe server. It has a main thread with a loop that creates a pipe instance and waits fo
2014-10-21 11:16:43 1630
转载 [命名管道客户端]Named Pipe Client
http://msdn.microsoft.com/en-us/library/aa365592(v=vs.85).aspx
2014-10-21 10:11:05 1612
转载 [使用重叠IO的命名管道服务器示例]Named Pipe Server Using Overlapped I/O
http://msdn.microsoft.com/en-us/library/aa365603(v=vs.85).aspx
2014-10-21 10:04:28 2190
原创 关于Visual Studio 2013 编译多字节字符集的解决方法
Visual Studio 2013 编译旧的 multi-byte character set MFC 出现DE >Error 1 error MSB8031: Use of MBCS encoding in MFC projects require an additional library to be downloaded and installed. Please s
2014-10-20 00:08:28 5613 1
转载 ISO8583接口的详细资料
ISO8583包(简称8583包)是一个国际标准的包格式,最多由128个字段域组成,每个域都有统一的规定,并有定长与变长之分。8583包前面一段为位图,用来确定包的字段域组成情况。其中位图是8583包的灵魂,它是打包解包确定字段域的关键,而了解每个字段域的属性则是填写数据的基础。 1、 位图描述如下: 位图位置:1 格式:定长 类型:B16(二进制16位,
2014-10-16 14:17:27 2750
转载 轻松掌握ISO8583报文协议
最开始时,金融系统只有IBM这些大的公司来提供设备,象各种主机与终端等。在各个计算机设备之间,需要交换数据。我们知道数据是通过网络来传送的,而在网络上传送的数据都是基于0或1这样的二进制数据,如果没有对数据进行编码,则这些数据没有人能够理解,属于没有用的数据。起初的X.25、SDLC以及现在流行的TCP/IP网络协议都提供底层的通讯编码协议,它们解决了最底层的通讯问题,能够将一串字符从一个地方传送
2014-10-16 10:22:32 1345
原创 vc++ 2013 中字符串处理示例
#include#include#include#includevoid main(){ char *s1 = "[string1]", *s2="[string2]", *dest; int len = (int)strlen(s1) + (int)strlen(s2)+1; dest = (char*)malloc(len); memset(dest, 0, len); s
2014-10-15 23:01:01 1069
原创 WIN32编程--用Windows API实现Windows NT服务的程序框架
#include #include //变量声明 char ServiceName[]="NTService"; SERVICE_STATUS ssStatus; SERVICE_STATUS_HANDLE ServiceStatusHandle; //前向声明 void ShowHelp(); void InsallService(); void RemoveServi
2014-10-13 15:51:30 1113
转载 基于visual c++之windows核心编程代码分析(56)使用winsock搜索蓝牙设备
蓝牙,是一种支持设备短距离通信(一般10m内)的无线电技术。能在包括移动电话、PDA、无线耳机、笔记本电脑、相关外设等众多设备之间进行无线信息交换。利用“蓝牙”技术,能够有效地简化移动通信终端设备之间的通信,也能够成功地简化设备与因特网Internet之间的通信,从而数据传输变得更加迅速高效,为无线通信拓宽道路。蓝牙采用分散式网络结构以及快跳频和短包技术,支持点对点及点对多点通信,工作在全
2014-10-13 13:59:48 1107
转载 delphi编程里的bool跟boolean类型有什么区别
bool是LongBool类型。 Delphi中定义了四种布尔类型:Boolean,ByteBool,WordBool和LongBool。后面三种布尔类型是为了与其他语言兼容而引入的,一般情况下建议使用Boolean类型。这四种类型的布尔值占用内存的数量如下:Boolean 1 ByteByteBool 1 ByteWordBool 2 Bytes(1 Word)
2014-10-10 16:39:14 1500
转载 Delphi与C语言类型转换对照
When converting C function prototypes to Pascal equivalent declarations, it's important to substitute the C function and argument types with the correct Pascal types. I often use a Type Translatio
2014-10-10 14:31:03 3087
转载 VC com开发中实现IObjectSafety
打开工程名Ctl.h搜索class C工程名Ctrl : public COleControl在其上面添加#include 搜索DECLARE_DYNCREATE(C工程名Ctrl)下面添加DECLARE_INTERFACE_MAP() BEGIN_INTERFACE_PART(ObjSafe, IObjectSafety) STDMETHOD_(H
2014-10-10 10:07:42 1065
转载 Delphi开发标记为安全的ActiveX控件
实现IObjectSafety即可,示例代码参照如下:Delphi(Pascal) code
2014-10-10 09:58:04 1654
转载 ATL开发一个ActiveX
原文地址:http://www.cnblogs.com/chinadhf/archive/2010/09/03/1817336.html本文描述了使用ATL开发一个ActiveX控件的完整过程。一、创建项目单击起始页中的“New Project…”,选择“ATL”分类下的“ATL Project”项目,项目名称为“Calculator”。在随后出现的项目向导中,使用默认配置即可
2014-10-09 22:51:48 1071
转载 如何解决win8.1中IE11浏览器网银无法输入密码?
windows xp将在今年4月8号退出windows系统的舞台,我想现在大家都装上win8系统了吧,话说最新的不一定就是最好的,也不一定是最实用的,这不,今天我就发现了一个问题,本来是想去网上淘点东西,可是在使用网银的时候出现问题了,下载了“中国银行网上银行登录安全控件”,关闭IE11浏览器窗口以后进行安装,安装成功以后依然显示“您尚未安装密码安全控件或控件版本太低,请通过登录页面底部
2014-10-08 23:09:51 2493
转载 Visual Studio 2013 Update 3
Visual Studio 2013 Update 3除了修复Bug、解决用户反馈问题、对性能和稳定性进行完善,还对大量组件和功能进行了更新,涉及CodeLens、CodeMap、Debugger、性能和诊断、IntelliTrace、Windows Store应用、Visual Studio IDE、测试、发布管理、Web工具、Azure工具、C++、图形诊断、应用程序分析、ClickO
2014-10-06 23:34:55 1748
转载 Delphi 通过IConnectionPointContainer响应COM事件的例子,Internet Explorer 事件响应
原文地址:http://www.swissdelphicenter.ch/torry/showcode.php?id=2058
2014-10-04 21:22:52 1737
转载 delphi中register, pascal, cdecl, stdcall, safecall
注: 使用错误,或者在该加的地方没有加,可能会出现"privileged instruction"错误,或者地址访问错误。常见的调用惯例有register, pascal, cdecl, stdcall, safecall。函数的调用管理决定了参数如何传递给子过程,并从堆栈中退出,以及寄存器在参数传递中的使用,错误和异常的处理。Delphi中默认的调用惯例是register。1)
2014-10-04 21:14:06 1590
Microsoft.Silverlight.5.Building.Rich.Enterprise.Dashboards
2012-03-02
iPhone and iPad Apps for Absolute Beginners iOS 5 Edition
2012-03-01
Wrox.Professional.CSharp.4.and.NET.4.Mar.2010
2012-02-25
VMware ESX Server: Advanced Technical Design Guide
2012-02-04
Professional Windows Phone 7 Application Development
2011-12-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人