摘要: Creating a Security Descriptor for a New Object in C++The following example creates a security descriptor for a new registry key using the following process. Similar code can be used to create a security descriptor for other object types.The example fills an array of EXPLICIT_ACCESS structures with 阅读全文
posted @ 2011-10-26 16:22 韩冬冬 阅读(908) 评论(0) 推荐(0) 编辑
摘要: 注:这两个函数都是将字符串写到内存数组中char szA[100]; //An ANSI string bufferWCHAR szW[100]; //A Unicode string buffer//Normal sprintf:all strings are ANSIsprintf(szA, "%s","ANSI Str");//Converts Unicode string to ANSIsprintf(szA,"%S",L"Unicode Str");//Normal swprintf:all string 阅读全文
posted @ 2011-10-26 14:15 韩冬冬 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 拿vc6.0来说:1、首先创建一个简单的win32 Application。2、设置工程预定义了UNICODE而没有预定义_UNICODE(工程->设置->预定义栏添加UNICODE)3、在WinMain主函数所在CPP文件包含<TChar.h>4、当在WinMain里添加 TChAR str[6] = "123"时,TCHAR被解析为unsigned short类型,当调用函数_tcscpy时,参数被解析为char类型5、修改工程预定义_UNICODE而没有预定义UNICODE,当在WinMain里添加 TChAR str[6] = "1 阅读全文
posted @ 2011-10-26 12:03 韩冬冬 阅读(549) 评论(0) 推荐(0) 编辑