紫雨轩 .Net, DNGuard HVM , .Net VMProtect

DNGuard HVM - Advanced .NET Code Protection Technology

常用链接

统计

积分与排名

友情连接

最新评论

2006年7月13日 #

在 C# 中动态调用 native dll 的导出函数

摘要: 在 C++ 中我们能够通过 LoadLibrary, GetProcAddress 来动态调用 dll 的导出函数.
在 C# 中也能够用这样的方式吗?
阅读全文

posted @ 2006-07-13 14:28 紫雨轩 .Net 阅读(3410) 评论(17) 编辑

Visual Studio 2005 不能调试的问题

家里的 vs 2005 不能调试了.
提示:
        无法启动调试 绑定句柄无效
在网上搜索了一下
解决方法两个
1. 开启 Terminal Services 服务.

允许用户以交互方式连接到远程计算机。远程桌面、快速用户切换、远程协助和终端服务器依赖此服务 - 停止或禁用此服务会使您的计算机变得不可靠。要阻止远程使用此计算机,请在“系统”属性控制面板项目上清除“远程”选项卡上的复选框。

看来这个服务还是要开启的.

2. 在项目属性里面

在“Debug”(调试)一项里,把“Enable the Visual Studio hosting process”(启用Visual Studio 宿主进程)前的钩去掉。

posted @ 2006-07-13 11:28 紫雨轩 .Net 阅读(3715) 评论(4) 编辑

从 DataGridView 控件 托放数据 到 TreeView控件(二)

摘要: 前面我们只处理了 DataGridView 的mousedown事件, 现在要处理 mousedown, mousemove, mouseup这三个事件来完成这个任务.
大致过程如下:

在MouseDown事件里面和之前一样处理,只是不启动拖放操作.
而是保存要拖放的数据, 以及建立一个小的矩形框(根据系统DragSize信息).

然后在 MouseMove 事件里面判断
是否已经准备好拖放了,如果准备好了,就启动拖放操作.
(注:鼠标在小矩形框范围内的移动不启动拖放操作)

MouseUp里面清除哪些标记量.

这样就能处理左键单击的选择和 左键拖放了阅读全文

posted @ 2006-07-13 10:15 紫雨轩 .Net 阅读(1849) 评论(1) 编辑

从 DataGridView 控件 托放数据 到 TreeView控件

实现方法,在datagridview的mousedown事件中开始 托放。
然后在treeview 的 DragEnter 中接收托放。
最后在treeview的 DragDrop 中处理托放结果。
注:treeview的allowdrop属性要设置为 true。

 1private void dataGridView1_MouseDown(object sender, MouseEventArgs e)
 2        {
 3            if (e.Button == MouseButtons.Right)
 4            {
 5                DataGridView.HitTestInfo info = dataGridView1.HitTest(e.X, e.Y);
 6                
 7                if (info.RowIndex >= 0)
 8                {
 9                    DataGridViewRow dr = (DataGridViewRow)
10                           dataGridView1.Rows[info.RowIndex];
11                    if (dr != null)
12                        dataGridView1.DoDragDrop(dr, DragDropEffects.Copy);
13                }

14            }

15        }

16
17        private void treeView1_DragEnter(object sender, DragEventArgs e)
18        {
19            e.Effect = DragDropEffects.Copy;
20        }

21
22        private void treeView1_DragDrop(object sender, DragEventArgs e)
23        {
24            if (e.Data.GetDataPresent(typeof(DataGridViewRow)))
25            {                
26                Point p = treeView1.PointToClient(new Point(e.X, e.Y));
27                TreeViewHitTestInfo index = treeView1.HitTest(p);
28
29                if (index.Node != null)
30                {
31
32                    DataGridViewRow drv = (DataGridViewRow)e.Data.GetData(typeof(DataGridViewRow));
33                    index.Node.Text = "Drop: " + drv.Cells[0].ToString();
34             
35                }

36            }

37        }

posted @ 2006-07-13 01:28 紫雨轩 .Net 阅读(3948) 评论(4) 编辑