上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 19 下一页

2019年8月28日

C++ com 组件 事件 备忘

摘要: 上面只是创建了一个函数指针回调,也算是可以用了但并非标准windows事件。 创建标准windows事件步骤如下: Adding Connection Points to an existing class: 阅读全文

posted @ 2019-08-28 11:51 空明流光 阅读(523) 评论(0) 推荐(0)

2019年8月8日

c# 跨应用程序域通讯

摘要: public class MyTask { public class MyEventArgs : EventArgs { public object EventData { get; private set; } public MyEventArgs(object eventData) ... 阅读全文

posted @ 2019-08-08 10:13 空明流光 阅读(859) 评论(0) 推荐(0)

2019年6月27日

c++ 加载资源文件

摘要: int _tmain(int argc, _TCHAR* argv[]) { HRSRC hRsrc = FindResource(NULL, MAKEINTRESOURCE(IDR_DATA1), L"DATA"); DWORD dwSize = SizeofResource(NULL, hRsrc); HGLOBAL hGlobal = LoadResource(NU... 阅读全文

posted @ 2019-06-27 16:16 空明流光 阅读(1079) 评论(0) 推荐(0)

2019年6月25日

c++中byte数组与字符串的转化

摘要: c++中通常用 unsigned char 代表字节,所以有 typedef unsigned char byte; 我们不讨论与字符集有关的内容,只讨论在字节流传递过程中的问题。 我们在做一系统操作时会需要使用到数据流,比如接收网络数据,文件数据,图片数据,原始数据大多是以byte数组的形式提供, 阅读全文

posted @ 2019-06-25 15:04 空明流光 阅读(44796) 评论(0) 推荐(2)

2019年6月24日

c# AES128 加解密算法

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using System.IO; using System.Security 阅读全文

posted @ 2019-06-24 16:51 空明流光 阅读(1656) 评论(0) 推荐(0)

C# DES 加解密

摘要: using System; using System.Text; using System.Security.Cryptography; using System.Diagnostics; using System.IO; using System.Reflection; using System.Windows.Forms; namespace FirstEliteCSFileEncoder... 阅读全文

posted @ 2019-06-24 15:57 空明流光 阅读(278) 评论(0) 推荐(0)

2019年6月14日

Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib 的一种情形

摘要: 没有引用任何.net 4.5的东西,也没有引用 Newtonsoft.dll,原因是引用了微软的tlb类型库,引用方法如 https://www.cnblogs.com/nanfei/p/10879800.html 解决办法:删除掉这个引用就好了,如果确实用到了其中的东西,那再找其它方案吧 阅读全文

posted @ 2019-06-14 09:57 空明流光 阅读(1543) 评论(0) 推荐(0)

2019年5月27日

IIS Express 使用方法

摘要: 配置文件位置: "%userprofile%\My Documents\IISExpress\config\applicationhost.config" 站点配置节: 启动站点(32位): start "Woo!" "C:\Program Files (x86)\IIS Express\iisex 阅读全文

posted @ 2019-05-27 10:44 空明流光 阅读(424) 评论(0) 推荐(0)

2019年5月25日

c# 排列组合代码类

摘要: 枚举出键盘所有组合键代码: 阅读全文

posted @ 2019-05-25 18:40 空明流光 阅读(261) 评论(0) 推荐(0)

c# 匿名委托递归

摘要: Func, int> GetVirtualCode = null; // 递归不能直接=,要赋初值。微软得优化啊,这语法糖不够甜 GetVirtualCode = delegate(List args) { if (args.Count == 0) r... 阅读全文

posted @ 2019-05-25 17:54 空明流光 阅读(354) 评论(0) 推荐(0)

获取哪些键正在被按下

摘要: [DllImport("user32.dll", EntryPoint = "keybd_event")] private static extern void keybd_event( byte bVk, //虚拟键值 byte bScan,// 一般为0 int dwFlags, //这里是整数类... 阅读全文

posted @ 2019-05-25 09:49 空明流光 阅读(136) 评论(0) 推荐(0)

2019年5月24日

判断Ctrl Shift Alt 键当前是否被按下

摘要: 以此类推 阅读全文

posted @ 2019-05-24 13:07 空明流光 阅读(652) 评论(0) 推荐(0)

2019年5月19日

cross appdomain access

摘要: result: 阅读全文

posted @ 2019-05-19 08:25 空明流光 阅读(138) 评论(0) 推荐(0)

2019年5月17日

c# 动态加载tlb为程序集

摘要: private enum RegKind { RegKind_Default = 0, RegKind_Register = 1, RegKind_None = 2 } [DllImport("oleaut32.dll", CharSet = CharSet.Unicode,... 阅读全文

posted @ 2019-05-17 10:03 空明流光 阅读(1095) 评论(0) 推荐(0)

2019年5月16日

获取当前进程当前runtime加载的appdomain

摘要: using System.Runtime.InteropServices; // Add the following as a COM reference - C:\WINDOWS\Microsoft.NET\Framework\vXXXXXX\mscoree.tlb using mscoree; public sta... 阅读全文

posted @ 2019-05-16 17:23 空明流光 阅读(262) 评论(0) 推荐(0)

2019年5月13日

C++ 命名管道示例

摘要: 想做一个 Hook CreateFile 重定向到内存的功能,貌似可以假借命名管道实现这个功能。不熟悉命名管道,做了几个demo,如下: Server: Client: Server & Client: 阅读全文

posted @ 2019-05-13 18:37 空明流光 阅读(3403) 评论(0) 推荐(0)

2019年5月10日

C#模块初始化注入

摘要: 这个功能可以实现很多很有用的功能,比如程序集加密,Hook安装等。英文转载备忘。 原地址:https://www.coengoedegebure.com/module-initializers-in-dotnet/ Creating a module initializer in .NET This 阅读全文

posted @ 2019-05-10 11:02 空明流光 阅读(1266) 评论(0) 推荐(0)

2019年5月9日

c++调用c#代码

摘要: 此项目加入了Reactor加壳保护,在编译后事件中添加命令: "C:\Program Files (x86)\Eziriz\.NET Reactor\dotNET_Reactor.Console.exe" -file "$(TargetPath)" -targetfile "<AssemblyLoc 阅读全文

posted @ 2019-05-09 15:57 空明流光 阅读(1002) 评论(0) 推荐(0)

.net refactor 命令行

摘要: VS中设置项目的编译后事件命令(此命令会在程序集生成后自动在原位置加密,覆盖原来的程序集): "C:\Program Files (x86)\Eziriz\.NET Reactor\dotNET_Reactor.Console.exe" -file "$(TargetPath)" -targetfi 阅读全文

posted @ 2019-05-09 15:50 空明流光 阅读(347) 评论(0) 推荐(0)

2019年4月30日

C# picturebox 加载图片后透明显示在另一控件之上

摘要: 这个方法只能保证picturebox仅对其父控件透明 阅读全文

posted @ 2019-04-30 15:41 空明流光 阅读(1242) 评论(0) 推荐(0)

2019年4月29日

Linux 开发备忘(visualGDB)

摘要: 1. 查看所有正在运行的进程:ps -A 2. 运行一个可执行文件(切换到目标目录下,LinuxProject3为可执行文件名):./LinuxProject3 3. VisualGDB 引用 so库(非源码项目) 时,在 “项目” 上右键单击,在上下文菜单中选择 “属性”,在弹出窗口中依次选择 “ 阅读全文

posted @ 2019-04-29 17:20 空明流光 阅读(309) 评论(0) 推荐(0)

2019年4月19日

c# 公元转农历

摘要: 代码如下: void Main() { //农历转阳历 var lunar = new System.Globalization.ChineseLunisolarCalendar(); var date = lunar.ToDateTime(2020, 1, 1, 0, 0, 0, 0); //将2 阅读全文

posted @ 2019-04-19 17:12 空明流光 阅读(258) 评论(0) 推荐(0)

2019年4月9日

c# 坑人的发邮件组件

摘要: System.Net.Mail 在服务器25端口被封禁的情况下,无法使用其它诸如SSL 465端口发送。用过时的System.Web.Mail却可以。是微软更新速度太快呢,还是标准不一致呢。 阅读全文

posted @ 2019-04-09 18:30 空明流光 阅读(217) 评论(0) 推荐(0)

2019年4月7日

生成拼音

摘要: void Main() { var index = 0; var count = CM_BookPages.Count(p=>p.PinYin == null || p.PinYin == ""); this.Connection.Open(); foreach (var page in CM_BookPages.Where(p=>p.PinYin == null... 阅读全文

posted @ 2019-04-07 21:30 空明流光 阅读(200) 评论(0) 推荐(0)

2019年4月5日

FileDb

摘要: filedb filedb FileDB - A C# database to store files FileDB is a free, fast, lightweight C# (v3.5) DLL project to store, retrive and delete files using 阅读全文

posted @ 2019-04-05 22:41 空明流光 阅读(655) 评论(0) 推荐(0)

2019年3月19日

WMI tester

摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文

posted @ 2019-03-19 10:13 空明流光 阅读(131) 评论(0) 推荐(0)

2019年3月15日

c# 纯代码调用 webservice

摘要: 其中调用和解析的xml样式,请参照接口中格式中的内容。 阅读全文

posted @ 2019-03-15 16:57 空明流光 阅读(334) 评论(0) 推荐(0)

2019年2月28日

c# 中 利用 CookieContainer 对 Cookie 进行序列化和反序列化校验

摘要: private void Form1_Load(object sender, EventArgs e) { var cookieStr = @".CNBlogsCookie=1BE76122E154E07DE50B06784B57B7DB80CC4B6DD088F0799C7C8BF7E2700B1C4FCF7A5BEAFDF80C1C49583EAB16... 阅读全文

posted @ 2019-02-28 11:33 空明流光 阅读(807) 评论(0) 推荐(0)

2019年2月27日

在经过身份验证的服务中不支持跨域 javascript 回调

摘要: 在 asp.net web forms 站点中做了一个 wcf restful service 接口,开启了webforms 身份认证。 当 webforms 站点用户登录之后,访问 restful 接口会报如标题所述的错误。 解决方案如下: 方法1:关闭 webforms 身份认证。但大多数情况不 阅读全文

posted @ 2019-02-27 16:17 空明流光 阅读(307) 评论(0) 推荐(0)

2019年2月21日

c# 使用 namedpipe 通信

摘要: using System; using System.IO; using System.IO.Pipes; using System.Diagnostics; using System.Threading.Tasks; using System.Linq; using System.Threading; class PipeServer { static void Main() ... 阅读全文

posted @ 2019-02-21 11:31 空明流光 阅读(516) 评论(0) 推荐(0)

2019年2月19日

c++ 创建线程以及参数传递

摘要: //创建线程,传递参数 DWORD dwThreadID = 0; HANDLE hThread = CreateThread(NULL, 0, MonitorThreadFunction, this , 0, &dwThreadID); //线程过程定义及参数接收 DWORD WINAPI MonitorThreadFunction(LPVOID lpParam) { CValid... 阅读全文

posted @ 2019-02-19 09:24 空明流光 阅读(845) 评论(0) 推荐(0)

c#函数地址传入c++

摘要: c# c++ 传入: 阅读全文

posted @ 2019-02-19 09:15 空明流光 阅读(781) 评论(0) 推荐(0)

2019年2月18日

c++中函数指针作为int传递

摘要: int f() { return 0; } typedef int (*method)(); int _tmain(int argc, _TCHAR* argv[]) { int value = (int)&f; std::cout >a; return 0; } 阅读全文

posted @ 2019-02-18 17:05 空明流光 阅读(493) 评论(0) 推荐(0)

2019年2月13日

visual studio 2017 中默认无法开发 Android 8.0 及以上系统的解决方案

摘要: 一般默认比较旧有两个原因,系统版本过旧,Visual Studio 版本过旧。 第一步,将windows 更新到最新版,必须是windows 10 并且更新到最新。 第二步,将visual studio -> 工具 -> 扩展和更新 ,安装完所有更新。这个时候应该已经可以开发 android 9.0 阅读全文

posted @ 2019-02-13 14:04 空明流光 阅读(339) 评论(0) 推荐(0)

2019年1月21日

c# 枚举安卓系统中所有目录及文件名

摘要: 如果是android 6.0 以上系统,须代码主动申请权限,此时需要Android.Support.v4。 nuget command : Install-Package Xamarin.Android.Support.v4 -Version 28.0.0.1 阅读全文

posted @ 2019-01-21 16:28 空明流光 阅读(295) 评论(0) 推荐(0)

visual studio 2017 创建 android 本地共享库(.so) 并从 C# android 项目中调用

摘要: Developing Xamarin Android Native Applications ★★★★★ ★★★★ ★★★ ★★ ★ <!-- .entry-header --> February 23, 2015 by Ankit Asthana // 11 Comments Share 0 0 阅读全文

posted @ 2019-01-21 13:47 空明流光 阅读(2883) 评论(0) 推荐(0)

2019年1月14日

长数据类

摘要: public class LongNumber { public enum NumberFlag { /// /// 负数 /// Negative, /// ... 阅读全文

posted @ 2019-01-14 18:37 空明流光 阅读(216) 评论(0) 推荐(0)

2019年1月10日

C++ Boost库分类总结

摘要: c# 程序员写c++,各种不适应。尤其是被内存操作和几十种字符串类型的转换,简直疯了,大小写转换竟然要手动写代码实现。 Boost看介绍不错,也不知道能不能跨平台。过几天要上linux写c++, 也不知道这东西能不能用。 转自: https://blog.csdn.net/svap1/article 阅读全文

posted @ 2019-01-10 15:52 空明流光 阅读(6268) 评论(0) 推荐(0)

2019年1月4日

c# 获取 com组件 引用真实组件地址

摘要: 1.根据guid获取 var clsid = new Guid("63EA2B90-C5A8-46F4-8A6E-2F2436C80003").ToString("B"); var registryKey = Registry.ClassesRoot.OpenSubKey(@"Wow6432Node 阅读全文

posted @ 2019-01-04 10:19 空明流光 阅读(921) 评论(0) 推荐(0)

2018年12月18日

c++ 调用 wmi 获取数据

摘要: #define _WIN32_DCOM #include using namespace std; #include #include #include # pragma comment(lib, "wbemuuid.lib") string GetBiosSerialNumber() { string result(""); HRESULT hres; ... 阅读全文

posted @ 2018-12-18 10:59 空明流光 阅读(786) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 19 下一页

导航