WallBreaker2 / op

Windows消息模拟,gdi,dx,opengl截图,找图,找字(OCR)
MIT License
424 stars 160 forks source link

C# 如何引用插件? #10

Closed Fire2Sky closed 4 years ago

Fire2Sky commented 4 years ago

1使用win10 X64系统,注册插件。 2使用vs2019创建C#项目,在引用只是发现opLib,没有op。 3使用python x64注册成功,使用demo是可以的。

jonathanpeng commented 4 years ago

系统需要注册,需要管理员模式运行。 !!!com接口方式调用:

regsvr32 -s op_x64.dll或者regsvr32 -s op_x86.dll

声明:opLib.IOpInterface op = new opLib.OpInterface();

调用方法:op.FindWindow(string.Empty, "无标题 - 记事本");

!!!DllImport方式调用:

`[DllImport(@"op_x64.dll", EntryPoint = @"?FindWindowW@libop@@QEAAJPEB_W0PEAJ@Z")]

public static extern IntPtr FindWindow(string className, string title);` 需要确定EntryPoint 的参数

WallBreaker2 commented 4 years ago

百度或者进群查看相应教程