zhiye_wang

向星空仰望的越深,越发现自己的渺小

博客园 首页 新随笔 联系 订阅 管理

2016年2月23日 #

摘要: 1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 #include "string" 5 6 using namespace std; 7 8 char* mystrcat(char* dest, const ch 阅读全文
posted @ 2016-02-23 10:26 zhiye_wang 阅读(142) 评论(0) 推荐(0) 编辑

摘要: 1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 5 using namespace std; 6 7 int mystrcmp(const char* dest, const char* src) 8 { 9 a 阅读全文
posted @ 2016-02-23 10:26 zhiye_wang 阅读(113) 评论(0) 推荐(0) 编辑

摘要: 1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 5 using namespace std; 6 7 char* mystrncpy(char* dest, const char* src, int n) 8 { 阅读全文
posted @ 2016-02-23 10:25 zhiye_wang 阅读(192) 评论(0) 推荐(0) 编辑

摘要: 1 #include "stdafx.h" 2 #include "iostream" 3 4 using namespace std; 5 6 int isechol (const char* str) 7 { 8 int length = strlen(str); 9 for (int i=0; 阅读全文
posted @ 2016-02-23 10:25 zhiye_wang 阅读(173) 评论(0) 推荐(0) 编辑

摘要: 1 #include "stdafx.h" 2 #include "iostream" 3 #include "assert.h" 4 5 using namespace std; 6 7 char* mystrcpy(char* dest, const char* src); // 1 const 阅读全文
posted @ 2016-02-23 10:24 zhiye_wang 阅读(147) 评论(0) 推荐(0) 编辑

摘要: 1 /* 2 * ===================================================================================== 3 * Filename: userGroup.cpp 4 * Description: add user 5 阅读全文
posted @ 2016-02-23 10:23 zhiye_wang 阅读(984) 评论(0) 推荐(0) 编辑

摘要: 调用API函数NetShareAdd()将文件夹设置为共享,调用此函数后如果不做其他设置,网络用户是无法访问共享文件夹的,因为此文件夹在NTFS分区中,同时受到NTFS文件系统的访问控制,因此还需要第2步;调用DOS命令cacls,赋予Guest用户组读写权限;如果要取消文件共享,直接调用API函数 阅读全文
posted @ 2016-02-23 10:19 zhiye_wang 阅读(499) 评论(0) 推荐(0) 编辑

摘要: 二 创建策略并设置给指定用户 1 打开“组策略管理”(在这里创建策略) cmd下输入GPMC.MSC 打开组策略管理 随后在域上右键选择“在这个域中创建GPO并在此处链接”,输入名字“磁盘管理策略”, 右键”编辑“,设置"隐藏磁盘分区(1)"中添加的策略“仅仅禁用F盘“ 右键“磁盘管理策略”,勾选强 阅读全文
posted @ 2016-02-23 10:17 zhiye_wang 阅读(1621) 评论(0) 推荐(0) 编辑

摘要: 创建键 RegCreateKeyEx int SetRecordVideoSavedDays(int newSavedDays) 2 { 3 HKEY hSubKey = NULL; 4 LONG lRet = 0; 5 DWORD dwType = 0; 6 int iRet = 0; 7 8 d 阅读全文
posted @ 2016-02-23 10:14 zhiye_wang 阅读(541) 评论(0) 推荐(0) 编辑

摘要: 在服务端数据库的处理当中,涉及中文字符的结构体字段,需要转为Utf8后再存储到表项中。从数据库中取出包含中文字符的字段后,如果需要保存到char *类型的结构体成员中,需要转为Ansi后再保存。从数据库中取出类型数字的字段后,如果需要保存到int型的结构体成员中,需要调用atoi函数进行处理后再保存 阅读全文
posted @ 2016-02-23 10:12 zhiye_wang 阅读(2926) 评论(1) 推荐(1) 编辑

摘要: 一 说明 mysql.lib 提供了很多方便的操作,同时结合 vector 使用十分方便。二 使用 1 声明需要用到的变量 static MYSQL s_mysql[DATABASE_CONNECTION_NUM]; static char mysql_user[50]="root"; static 阅读全文
posted @ 2016-02-23 10:00 zhiye_wang 阅读(593) 评论(0) 推荐(0) 编辑

摘要: 摘要----项目需要对服务器上的某个路径下的目录,修改权限:给Users用户组的用户添加修改写入权限。原理----通过批处理脚本实现,命令使用 icacls 修改ACL 来达到修改权限的目的。操作----想要对 D:\test directory 路径添加User用户组的修改权限,可用如下语句 ic 阅读全文
posted @ 2016-02-23 09:49 zhiye_wang 阅读(323) 评论(0) 推荐(0) 编辑