国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

C# 在引用插件中 出現(xiàn)的問題| Csharp cite the plugin problem

2019-11-17 02:40:45
字體:
供稿:網(wǎng)友

C# 在引用插件中 出現(xiàn)的問題| Csharp cite the plugin PRoblem

背景:使用C#操縱鼠標(biāo)進(jìn)行重復(fù)性的工作

background: using Csharp to handle the keyboard or mouse to do the repetitive work.

問題:屬性“DllImport”在該聲明類型中無效。它只在“method”聲明中有效。錯(cuò)誤 1 屬性“DllImport”在該聲明類

Question:attribution “DllImport” is invalid in the declaration, it is just valid in the “method” declaration

解決方案:使用外部調(diào)用的方法

Solution:Use the external method

code example:

private static extern int mouse_event( int dwFlags,// 下表中標(biāo)志之一或它們的組合 int dx, int dy, //指定x,y方向的絕對(duì)位置或相對(duì)位置 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.


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 巧家县| 柯坪县| 龙口市| 岗巴县| 江津市| 绿春县| 庆安县| 兰西县| 尤溪县| 陆丰市| 兰溪市| 沅陵县| 循化| 东乌珠穆沁旗| 区。| 巴里| 宝丰县| 莱州市| 通渭县| 汝南县| 鄂伦春自治旗| 开原市| 开远市| 泰兴市| 云龙县| 彰化县| 界首市| 綦江县| 梓潼县| 桃园县| 会理县| 兰西县| 基隆市| 贵南县| 临汾市| 临洮县| 远安县| 宁晋县| 博爱县| 晴隆县| 桐柏县|