大家可以去看看这个!
http://www.rsac.org/rsac/
http://www.rsac.org/rsac/
解决方案 »
- xp安装vs2008为何会失败,求解。
- 两个类相同结构如何进行赋值(=)
- 各位大虾帮帮小妹看看
- 求正则表达式<url>192.168.0.1/ppush/index.jsp</url><msg charset="gb2312">好,好好20好好</msg>
- C#讲解windows api的书
- 如何读取行合并过的excel
- [求助]C#的问题!DataGrid控件,不能编辑DataTable元素怎么办?
- 为什么找不到system.drawing.design.toolboxservice这个类
- M运行SDN上的例子都会出错!?
- 求助:关于水晶报表的打印问题!~!
- 关于System.Threading.Timer启动/停止的问题??高手指点一下!
- 请教,如何使用Soket进行端口监听?获取IE发送信息以及获取的地址?
ZoneIdentityPermission
在System.Security.Permissions中~关于权限,
也许对你有帮助?我没研究过~
我们是想开发同类的软件,可以借鉴,但是其中技术又有谁会说呢?
呵呵!
using System.Diagnostics ;
using System.Runtime.InteropServices;
using System.Collections;
using System.Net .Sockets ;
namespace fupip
{
public class geturl
{
public geturl()
{
}
[DllImport( "user32.dll ")]
public static extern int GetClassName(int hwnd, byte[] lpClassName,Int32[] nMaxCount);
[DllImport( "user32.dll ")]
public static extern int GetWindow(int hwnd,int wCmd);
[DllImport( "user32.dll ")]
public static extern int SendMessage(int hwnd,int wMsg,int wParam, byte[] lParam);
public const int GW_CHILD = 5;
public const int GW_HWNDNEXT = 2;
public const int WM_GETTEXT =13;
public const int WM_GETTEXTLENGTH = 14;
public static string[] GetIEURL(string args)
{
string[] urls;
Process[] ps =Process.GetProcessesByName(args);
urls=new string[ps.Length];
for(int i=0;i <ps.Length;i++)
{
int hwndIE=(int)ps[i].MainWindowHandle;
int hwndEdit=getkid(hwndIE);
urls[i]= gettext(hwndEdit);
}
return urls;
}
static int getkid(int hwnd)
{
byte[] str=new byte[100];
Int32[] len=new Int32[1];
int hwndkid=0;
string classname;
int handle=0;
len[0]=100;
ArrayList al=new ArrayList();
GetClassName(hwnd,str,len);
classname=System.Text.Encoding.ASCII.GetString(str);
if(classname.Substring(0,4)== "Edit ")
{
handle= hwnd;
}
hwndkid=GetWindow(hwnd,GW_CHILD);
while(hwndkid!=0)
using System.Diagnostics ;
using System.Runtime.InteropServices;
using System.Collections;
using System.Net .Sockets ;
namespace fupip
{
public class geturl
{
public geturl()
{
}
[DllImport( "user32.dll ")]
public static extern int GetClassName(int hwnd, byte[] lpClassName,Int32[] nMaxCount);
[DllImport( "user32.dll ")]
public static extern int GetWindow(int hwnd,int wCmd);
[DllImport( "user32.dll ")]
public static extern int SendMessage(int hwnd,int wMsg,int wParam, byte[] lParam);
public const int GW_CHILD = 5;
public const int GW_HWNDNEXT = 2;
public const int WM_GETTEXT =13;
public const int WM_GETTEXTLENGTH = 14;
public static string[] GetIEURL(string args)
{
string[] urls;
Process[] ps =Process.GetProcessesByName(args);
urls=new string[ps.Length];
for(int i=0;i <ps.Length;i++)
{
int hwndIE=(int)ps[i].MainWindowHandle;
int hwndEdit=getkid(hwndIE);
urls[i]= gettext(hwndEdit);
}
return urls;
}
static int getkid(int hwnd)
{
byte[] str=new byte[100];
Int32[] len=new Int32[1];
int hwndkid=0;
string classname;
int handle=0;
len[0]=100;
ArrayList al=new ArrayList();
GetClassName(hwnd,str,len);
classname=System.Text.Encoding.ASCII.GetString(str);
if(classname.Substring(0,4)== "Edit ")
{
handle= hwnd;
}
hwndkid=GetWindow(hwnd,GW_CHILD);
while(hwndkid!=0)