C# 在引用插件中 出现的问题| Csharp cite the plugin problem
背景:使用C#操纵鼠标进行重复性的工作
background: using Csharp to handle the keyboard or mouse to do the repetitive work.
问题:属性“DllImport”在该声明类型中无效。它只在“method”声明中有效。错误 1 属性“DllImport”在该声明类
Question:attribution “DllImport” is invalid in the declaration, it is just valid in the “method” declaration
解决方案:使用外部调用的方法
Solution:Use the external method
code example:
private static extern int mouse_event(
int dwFlags,// 下表中标志之一或它们的组合
int dx,
int dy, //指定x,y方向的绝对位置或相对位置
int cButtons,//没有使用
int dwExtraInfo//没有使用
);
extern is used to declare the method implemented externally, it is often used in the situation that interop (using System.Runtime.InteropServices) to call unmanaged code in and DllImport is used at the same time. At that time the method should declard as static.
C# 在引用插件中 出现的问题| Csharp cite the plugin problem的更多相关文章
- rcp(插件开发)插件B需要引用插件A中的jar包-如何处理依赖关系
如果插件B需要引用插件A中的jar 通常需要以下几步: 1.插件B要依赖插件A 2.在插件B的build path中添加插件A的jar包 3.插件A的runtime导出插件B中使用jar的packag ...
- SpringBoot使用thymeleaf的方式引用static中的静态资源
当我们在开发网站时为了快速完成,避免不了使用第三方的框架文件.这样我们就得引用框架中的各种资源文件.那么,在springboot中通过 thymeleaf如何在html中使用static文件夹下的静态 ...
- Dynamic CRM插件中记录日志-Nlog记录到文本
Dynamic CRM插件中记录日志的方式有多种 通常情况下分为ITracingService记录.单独日志表插入记录.文本记录三种. 之前整理过ITracingService记录的方式,但这种记录有 ...
- 详解jquery插件中;(function ( $, window, document, undefined )的作用
在jquery插件中我们经常看到以下这段代码 1 2 3 ;(function ( $, window, document, undefined ){ //函数体内具体代码 })(jQuery, wi ...
- 在eclipse的maven插件中搜寻本地仓库中的jar搜索不到的解决方案
在eclipse的maven插件中搜寻本地仓库中的jar搜索不到的解决方案 之前,用过maven管理项目的童鞋都知道本地会有一个${User_Home}.m2/repository仓库 是用来存放ja ...
- android插件中或者library中获取asstes文件
在插件中或者library的项目中把文件放在asstes,不能用context.getResources().getAssets().open(fileName)读取到流,会报FileNotFound ...
- struts2:遍历自定义字符串数组,遍历Action实例所引用对象中的数组
在struts2:OGNL表达式,遍历List.Map集合:投影的使用一文中已经讲述了OGNL遍历List.Map集合等功能. 本文简单写一个遍历数组的示范程序. 1. 遍历自定义字符串数组 < ...
- 如何在Exe和BPL插件中实现公共变量共享及窗口溶入技术Demo源码
如何在Exe和BPL插件中实现公共变量共享及窗口溶入技术Demo源码 1.Delphi编译方式介绍: 当我们在开发一个常规应用程序时,Delphi可以让我们用两种方式使用VCL,一种是把VCL中的申明 ...
- 引用类中的enum
引用类中的enum 引用类中的enum,需要加类的域class_name::value_in_enum_name 点击(此处)折叠或打开 #include <stdio.h> #inclu ...
随机推荐
- ehlib ado 删除选中记录 的方法
procedure TForm1.Button1Click(Sender: TObject); var I: Integer; begin do begin DBGridEh1.DataSource. ...
- POJ 1504 Adding Reversed Numbers
/*Sample Input 3 24 1 4358 754 305 Sample Output 34 1998 */ 值得总结的几点就是: 1.atoi函数将字符串转化为整型数字(类似于强制转换) ...
- LeetCode OJ:Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessa ...
- 数据结构(C语言)关于树、二叉树、图的基本操作。
1) 编写算法函数int equal(tree t1, tree t2),判断两棵给定的树是否等价: int equal(tree t1,tree t2) { int k; if(t1==NULL&a ...
- vector中erase用法注意事项
以前就发现了vector中的erase方法有些诡异(^_^),稍不注意,就会出错.今天又一次遇到了,就索性总结一下,尤其是在循环体中用erase时,由于vector.begin() 和vector.e ...
- jenkins自动化打包部署
请参考: http://m.blog.csdn.net/article/details?id=50518959 1.启动 jenkins.war ,打开首页 192.168.158.129:8080 ...
- Tomcat服务器启动失败:Could not publish server configuration for Tomcat v8.0 Server at localhost. Multiple Contexts have a path of
在eclipse中使用Tomcat8.0时,出现了如下错误: 解决办法: 在建立Tomcat服务时,eclipse会自动生成一个Servers的项目. 在这个项目中,找到你部署项目的服务文件夹. 在这 ...
- linux rinetd、socat端口转发部署(很实用的网络工具)
端口转发映射的程序叫rinetd,下载地址,直接manke编译安装即可. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [root@PortForward02 src] ...
- HDU 4240
http://acm.hdu.edu.cn/showproblem.php?pid=4240 题意:求最大流和流量最大的一条路径的流量的比值 题解:流量最大的路径的流量在dinic的dfs每次搜到终点 ...
- Python3下安装pip和MySQLdb
MySQLdb的安装更曲折了.还是按照正常方法安装,下载MySQL-python-1.2.5版本,解压后python setup.py install,发现怎么装都会报错“ConfigParser.N ...