12 2013 档案

c# webBrowser控件与js的交互
摘要:转自:http://blog.csdn.net/sd2131512/article/details/7467564[c-sharp] view plaincopyprint?[System.Runtime.InteropServices.ComVisibleAttribute(true)] 这是为了将该类设置为com可访问 Url属性:WebBrowser控件显示的网页路径 ObjectForScripting属性:该对象可由显示在WebBrowser控件中的网页所包含的脚本代码访问 JavaScript通过window.external调用C#公开的方法。即由ObjectForScrip.. 阅读全文

posted @ 2013-12-23 12:32 空明流光 阅读(508) 评论(0) 推荐(0) 编辑

c#强制执行内存回收
摘要:[DllImport("psapi.dll")]private static extern int EmptyWorkingSet(int hProcess);GC.Collect();GC.WaitForPendingFinalizers();EmptyWorkingSet(Process.GetCurrentProcess().Handle.ToInt32());效果十分的显著 阅读全文

posted @ 2013-12-18 10:51 空明流光 阅读(1299) 评论(0) 推荐(0) 编辑

vb6通send和recv请求网络资源
摘要:最近为了弄清楚send和recv的用法,特意用vb6测试了一下,头文件冗余的比较多:Option ExplicitPrivate Declare Function setsockopt Lib "wsock32.dll" (ByVal s As Long, ByVal Level As Long, ByVal optname As Long, optval As Any, ByVal optlen As Long) As LongPrivate Declare Function getsockopt Lib "wsock32.dll" (ByVal s 阅读全文

posted @ 2013-12-13 17:30 空明流光 阅读(1313) 评论(1) 推荐(0) 编辑

c# 获取 webbrowser 完整 cookie
摘要:下面的代码实现的功能确实如标题所言,但要求是获取的是当前进程内的webbrowser,跨进程或引用的ShellWindows对象无效, 哎我本来两种情况都要用,只把前者代码先记下:internal sealed class NativeMethods { #region enums public enum ErrorFlags { ERROR_INSUFFICIENT_BUFFER = 122, ERROR_INVALID_PARAMETER = 87, ERROR_NO_MORE_ITEMS = 259 } public enum... 阅读全文

posted @ 2013-12-10 20:48 空明流光 阅读(2378) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示