
技术
zhirom
这个作者很懒,什么都没留下…
展开
-
启动和暂停services(C#)
/// /// ensure the service is on local computer /// /// service name /// true or false public bool IsServiceExisted(string serviceName) {原创 2009-06-15 17:46:00 · 688 阅读 · 0 评论 -
远程更改防火墙(windows)规则(C#)
自windows的vista之后的版本中,可以直接使用dcom的方式调用另外一台机器上的firewall.dll更改相应的规则,当然需要grouppolicy的支持,也可以自己添加一天规则,应许你的这台计算机在另一台计算机上做相应操作,如下实现了一个更改firewall规则的方法: /// /// Uing Firewallapi.dll to Set the firewal原创 2009-06-15 17:54:00 · 2858 阅读 · 0 评论 -
圆整(roundup)--数据块对齐,内存对齐
static int roundup(int x, int y) { return ((((x) + (y) - 1) / (y)) * (y)); }或者 static int roundup(int x, int y) { return ((((x) - 1) / (y)+1) * (y));转载 2009-07-01 12:40:00 · 2481 阅读 · 0 评论 -
GSS-API 与Kerberos 的关系
Kerberos 是GSS-API 的实现,当然也有其他的实现如NTLm,dce之类的,如下图所适: ----------------------------------- 应用程序(APP)----------------------------------- RPC(可选)------------------------------------转载 2009-06-29 19:01:00 · 6086 阅读 · 0 评论 -
memset用法详解(转)
memset用法详解(转) memset用法详解(转)2007-01-31 20:00memest原型 (please type "man memset" in your shell) void *memset(void *s, int c, size_t n); memset:作用是在一段内存块中填充某个给定的值,它对较大的结构体或数组进行清零操作转载 2009-06-30 23:25:00 · 598 阅读 · 0 评论