2009年12月21日

Calling Win32 DLLs in C# with P/Invoke(节录)

摘要: 最近,项目中经常需要Calling Win32 DLLs in C# 。1、use of P/Invoke for calling Windows API functions2、COM Interop 这里讨论1.A、Enter P/Invokesample:the Win32 MessageBeep function whose unmanaged declaration is shown in... 阅读全文

posted @ 2009-12-21 17:24 Acor 阅读(574) 评论(0) 推荐(0) 编辑

2009年12月14日

vc 获得文件相对路径

摘要: API函数PathRelativePathTo Requirements Version 4.71 and later of Shlwapi.dll Header: Declared in shlwapi.h. Import Library: shlwapi.lib.example:#include <windows.h>#include <iostream.... 阅读全文

posted @ 2009-12-14 19:34 Acor 阅读(881) 评论(0) 推荐(0) 编辑

2009年10月13日

C#关闭MessageBox消息框(转)

摘要: 最近写的一代码中.需要弹出一消息框.提示一下用户..,可如果用户长时间不做交互..程序就会出现点小问题..所以呢,,要在一定的时间内把MessageBox给关闭才行..从网上找了找也没什么太好的方法...所以只能借鉴网上的资料(主要是API函数).再加上自己的的思路..呵呵..看代码吧..首先引用:using System.Runtime.InteropServices;其次在所定义的类里面添加上... 阅读全文

posted @ 2009-10-13 13:11 Acor 阅读(6233) 评论(0) 推荐(0) 编辑

2009年9月8日

VC6 工程无法添加文件问题

摘要: 1、卸载先前版本,(包括安装目录delete掉)。2、安装新的(不安装interDev)。3、安装补丁。以前之所以出现问题,是因为先前安装的没有完全delete掉,还能够启动。导致新安装的版本缺少相应启动文件(比如MSDEV.EXE等)。SourceSafe原来单独安装在别的目录,不必重新安装。 阅读全文

posted @ 2009-09-08 08:57 Acor 阅读(1427) 评论(0) 推荐(0) 编辑

2009年8月17日

WCF 学习(一)

摘要: Jia.WCFService.Contract //dllJia.WCFService.Service//dllJia.WCFService.JiaHosting//exeJia.WCFService.Client //execode:Jia.WCFService.Contract/IDivide.csusing System;using System.Collections.Generic;us... 阅读全文

posted @ 2009-08-17 21:42 Acor 阅读(198) 评论(0) 推荐(0) 编辑

2009年8月13日

CopyFile

摘要: public void CopyFile(string sourcepath, string destpath){using (FileStream fs = new FileStream(sourcepath, FileMode.Open, FileAccess.Read)){using (FileStream fs2 = new FileStream(destpath, FileMode.Cr... 阅读全文

posted @ 2009-08-13 13:08 Acor 阅读(170) 评论(0) 推荐(0) 编辑

SharpZipLib使用示例

摘要: SharpZipLib是一个使用C#编写的Zip操作类库,在VB.NET、C#或其他的.NET语言中都可以使用它创建Zip文件、并进行读取和更新等操作。SharpZipLib目前的版本为0.85,下边通过几个例子来说明它的使用(使用前需引用命名空间ICSharpCode.SharpZipLib.Zip)。1.创建zip文件,无法添加文件夹using(ZipFilezip=ZipFile.Creat... 阅读全文

posted @ 2009-08-13 13:00 Acor 阅读(320) 评论(0) 推荐(0) 编辑

2009年8月7日

SQLExpress及其他(近期问题小结)

摘要: 1、SQLExpress 安装后,需在MS网站下载SSMSE(Sql Server Management Studio Express),具备企业管理器功能。2、安装过后,数据库不能使用,选定数据库,右键:属性->Options:collation(整理、校勘)改为: Chinese_PRC_CI_AS。3、存储过程,是一组命名的sql 语句,存储在数据库中,可以接收参数和输出参数。完成特定... 阅读全文

posted @ 2009-08-07 09:10 Acor 阅读(2015) 评论(0) 推荐(0) 编辑

2009年8月2日

C#中的@符号(转)

摘要: C#中的@符号  2005-7-27  Allen Lee  @符号是特殊而又实用的C#符号。  比如它在string中的应用。  1  字符@表示,其后的字符串是个“逐字字符串”(verbatim string)。 // 这个说法来自C# Primer 中文版(Stanley B. Lippman, 侯捷/陈硕合译)  2  对于逐字字符串字面变量(verbatim st... 阅读全文

posted @ 2009-08-02 10:42 Acor 阅读(1168) 评论(0) 推荐(0) 编辑

2009年8月1日

Memento 模式

摘要: 第三版:namespace DemoGame{ class GameRole { private int shenmingli; public int sml { get { return shenmingli; } set { shenmingli = value; } } private int gongjili; public int gjl { get { return gongjili;... 阅读全文

posted @ 2009-08-01 18:57 Acor 阅读(187) 评论(0) 推荐(0) 编辑

导航