2010年2月18日

sql选取第n高的选项

摘要: select * from sc where score=(select max(score) from sc where score<>(select max(score) from sc))不灵活 select *from (select row_number() over (order by score desc) as idx, * from sc ) as tmptablew... 阅读全文

posted @ 2010-02-18 11:05 无法显示此网页 阅读(245) 评论(0) 推荐(0) 编辑

2009年12月3日

Visual C++ 使用 __declspec(dllexport) 从 DLL 导出 (到C#)

摘要: 由于各种的原因, 如何把unmanaged 的 c++ DLL 转换成 managed C# 是一个问题。 方法有3个. Ø 使用.def文件 Ø 可以不用.def文件, 使用__declspec(dllexport)关键字, 特别是针对Visual C++编译器的时候 Ø 直接用MC++写 什么时候用.def文件? .def的意思是module-definition... 阅读全文

posted @ 2009-12-03 17:26 无法显示此网页 阅读(5474) 评论(0) 推荐(1) 编辑

2009年12月2日

Visual C++ 在windows 7 上预编译头错误unexpected precompiled header error, simply rerunning the compiler might fix this problem

摘要: Visual C++ 在windows 7 上预编译头错误unexpected precompiled header error, simply rerunning the compiler might fix this problem之前有人在win7上遇到了类似的错误,Error 1 fatal error C1859: 'Debug\CppDllExport.pch' unexpected ... 阅读全文

posted @ 2009-12-02 15:59 无法显示此网页 阅读(9282) 评论(4) 推荐(2) 编辑

2009年11月27日

DirectorySecurity & FileSystemAccessRule

摘要: http://developers.de/blogs/damir_dobric/archive/2007/06/18/directory-security-and-access-rules.aspx设置文件夹权限时遇到的问题:1. 文件夹读写被拒绝但是文件还是可以读写: InheritanceFlags的使用, 见链接2. 拒绝比允许优先级高, 所以要remove掉之前的权限, 否则, 拒绝-&g... 阅读全文

posted @ 2009-11-27 17:47 无法显示此网页 阅读(757) 评论(0) 推荐(0) 编辑

CreateFileMapping, MapViewOfFile 实现文件共享

摘要: using System;using System.IO;using System.Runtime.InteropServices;using System.Text;using System.Threading;namespace Mem1{ class Program { static void Main(string[] args) { Mem m = new Mem(); string t... 阅读全文

posted @ 2009-11-27 17:45 无法显示此网页 阅读(2685) 评论(0) 推荐(0) 编辑

导航