===破了一个屏幕取 词(GetWord),谁告诉我怎么在C#引用它的.dll===

liuweijack 2018-03-07 08:54:47


链接: https://pan.baidu.com/s/1HU5erMsuse3jSt4DGUeDBA 密码: 9gy4
...全文
1039 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
threenewbee 2018-03-09
  • 打赏
  • 举报
回复
引用 4 楼 liuweijack 的回复:
[quote=引用 3 楼 caozhy 的回复:] 不是有官网么?问开发者啊
破解的能给你提供支持?[/quote] 谁破解的你找他去啊。破解的问题这里不允许讨论。
shoppo0505 2018-03-08
  • 打赏
  • 举报
回复
rar文件解不开么
泡泡龙 2018-03-08
  • 打赏
  • 举报
回复
开放一下源代码呗,省的反编译太乱了
吉普赛的歌 2018-03-08
  • 打赏
  • 举报
回复
有木马, 小心了!
liuweijack 2018-03-08
  • 打赏
  • 举报
回复 1


链接: https://pan.baidu.com/s/1UMMkD7XSfBk8_n5CUqwTtw
密码: agcp
liuweijack 2018-03-08
  • 打赏
  • 举报
回复


搞定!结贴。。。
橘子皮... 2018-03-08
  • 打赏
  • 举报
回复
复杂一点的可以识别么???
liuweijack 2018-03-08
  • 打赏
  • 举报
回复
引用 3 楼 caozhy 的回复:
不是有官网么?问开发者啊
破解的能给你提供支持?
threenewbee 2018-03-07
  • 打赏
  • 举报
回复
不是有官网么?问开发者啊
秋的红果实 2018-03-07
  • 打赏
  • 举报
回复
你也不了解人家的dll是用什么写的,不好弄 即使能正确引用dll也不一定能调用原来的功能,功能不一定都在dll内,还有人家的exe呢
liuweijack 2018-03-07
  • 打赏
  • 举报
回复
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace CSharp
{
    public partial class Form1 : Form
    {
        const string LICENSEID = "{00000000-0000-0000-0000-000000000000}";
        const string MOUSEHOOK_CAPTURE_OK_MSG = "MOUSEHOOK_CAPTUREOK_MSG-" + LICENSEID;
        const string HIGHLIGHT_CAPTURE_OK_MSG = "HIGHLIGHT_CAPTUREOK_MSG_XUFU_V1-" + LICENSEID;
        const int MOD_ALT = 0x0001;
        const int MOD_CONTROL = 0x0002;
        const int MOD_SHIFT = 0x0004;
        const int MOD_WIN = 0x0008;
        const int VK_LBUTTON = 0x01;
        const int VK_RBUTTON = 0x02;
        const int VK_MBUTTON = 0x04;

        const int SW_HIDE = 0;
        const int SW_SHOW = 5;
        UInt32 MOUSEHOOK_CAPTURE_OK = 0;
        UInt32 HIGHLIGHT_CAPTURE_OK = 0;
        const int HOTKEY_CAPTURE = 1000;
        const int MAX_OUTPUT_LEN = 4096;

        const int WM_HOTKEY = 0x0312;

        bool bGetWordUnloaded = false;

        [DllImport("user32.dll")]
        static extern uint RegisterWindowMessage(string lpString);

        [DllImport("user32.dll", SetLastError = true)]
        public static extern bool RegisterHotKey(IntPtr hWnd, int id, UInt32 fsModifiers, Keys vk);

        [DllImport("user32.dll", SetLastError = true)]
        public static extern bool UnregisterHotKey(IntPtr hWnd, int id);

        [DllImport("user32.dll", EntryPoint = "GetCursorPos")]
        public extern static bool GetCursorPos(out System.Drawing.Point lpPoint);

        [DllImport("user32.dll", EntryPoint = "ShowWindow", CharSet = CharSet.Auto)]
        public static extern int ShowWindow(IntPtr hwnd, int nCmdShow);

        [DllImport("kernel32.dll", EntryPoint = "Sleep")]
        public static extern void Sleep(int uMilliSec);

        [DllImport("kernel32.dll", EntryPoint = "FreeLibrary")]
        public static extern int FreeLibrary(int hLibModule);

        [DllImport("kernel32.dll", EntryPoint = "GetModuleHandle")]
        public static extern int GetModuleHandle(string lpModuleName);

        [DllImport("Oleaut32.dll", EntryPoint = "SysFreeString")]
        public static extern Int32 SysFreeString(string str);

        [DllImport("ICall.dll")]
        public static extern Int32 GetRealWindow(Int32 x, Int32 y);

        [DllImport("ICall.dll")]
        public static extern bool GetWord(Int32 hWndCap, Int32 x, Int32 y, [MarshalAs(UnmanagedType.LPWStr)] string pwstrout, Int32 nBufLen, ref Int32 nCursorPos);
        
        [DllImport("ICall.dll")]
        public static extern bool GetRectWord(Int32 hWndCap, Int32 left, Int32 top, Int32 right, Int32 bottom, [MarshalAs(UnmanagedType.LPWStr)] string pwstrout, Int32 nBufLen);

         [DllImport("ICall.dll")]
        public static extern bool GetWordEnableCap(bool bEnable);

        [DllImport("ICall.dll")]
        public static extern bool SetMouseHook(Int32 hWndNotify);

        [DllImport("ICall.dll")]
        public static extern bool RemoveMouseHook();

        [DllImport("ICall.dll")]
        public static extern void MouseSetDelay(Int32 uMilliSec);

        [DllImport("ICall.dll")]
        public static extern bool MouseEnableCap(bool Enable);

        [DllImport("ICall.dll")]
        public static extern bool GetHighlightText(Int32 hWndCap, [MarshalAs(UnmanagedType.BStr)] out string pwstrout);

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // register the message so that we can get the notification from mouse moving
        	MOUSEHOOK_CAPTURE_OK = RegisterWindowMessage(MOUSEHOOK_CAPTURE_OK_MSG);
            HIGHLIGHT_CAPTURE_OK = RegisterWindowMessage(HIGHLIGHT_CAPTURE_OK_MSG);

	        // set the global mouse hook
	        SetMouseHook(Handle.ToInt32());
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            bGetWordUnloaded = true;

            // unregister hotkey
            UnregisterHotKey(Handle, HOTKEY_CAPTURE);

            // remove the global mouse hook
            RemoveMouseHook();

            int dllhwnd = GetModuleHandle("ICall.dll");
            FreeLibrary(dllhwnd);
        }

		private void CaptureText()
		{
            // enable GetWord engine
            MouseEnableCap(true);
	        GetWordEnableCap(true);

			System.Drawing.Point ptCursor;
	        GetCursorPos(out ptCursor);

	        int nCursorPos = -1;
	        bool bOK = false;
            Int32 hWndCap = GetRealWindow(ptCursor.X, ptCursor.Y);
        	Char[] wstrOut = new Char[MAX_OUTPUT_LEN];
            string strtmp = new string(wstrOut);

            bOK = GetWord(hWndCap, ptCursor.X, ptCursor.Y,
                          strtmp, MAX_OUTPUT_LEN, ref nCursorPos);

	        if (bOK)	
	        {
                string strTotal = strtmp;
                textBoxAll.Text = strTotal;
                textBoxCursorPos.Text = nCursorPos.ToString();
		        
		        if (nCursorPos>=0)
		        {
                    string strCursor = strTotal.Substring(nCursorPos);
                    strCursor.TrimStart(null);
                    textBoxCursor.Text = strCursor;
		        }
		        else
		        {
			        textBoxCursor.Text = "";	
		        }
	        }
	        else					// failed 
	        {
	        }

            // disable GetWord engine
	        GetWordEnableCap(false);

	        // disable text-capturing with mouse cursor
	        MouseEnableCap(false);
		}

        private void CaptureHighlightText(IntPtr wParam, IntPtr lParam)
        {
            // enable GetWord engine
            MouseEnableCap(true);
            GetWordEnableCap(true);

            System.Drawing.Point ptCursor;
            GetCursorPos(out ptCursor);

            Int32 hWndCap = GetRealWindow(ptCursor.X, ptCursor.Y);

            bool bOK = false;
            string pbstr = "";
            bOK = GetHighlightText(hWndCap, out pbstr);

            if (bOK)
            {
                textHighlight.Text = pbstr;

                SysFreeString(pbstr);

            }
            else					// failed 
            {
                textHighlight.Text = "";
            }

            // disable GetWord engine
            GetWordEnableCap(false);

            // disable text-capturing with mouse cursor
            MouseEnableCap(false);
        }

        #region Window Procedure

        protected override void WndProc(ref Message msg)
        {
            if (!bGetWordUnloaded)
            {
                if (msg.Msg == WM_HOTKEY || msg.Msg == MOUSEHOOK_CAPTURE_OK)
                    CaptureText();
                else if (msg.Msg == HIGHLIGHT_CAPTURE_OK)
                    CaptureHighlightText(msg.WParam, msg.LParam);
            }

            base.WndProc(ref msg);
        }

        #endregion Window Procedure

        private void checkCursor_CheckedChanged(object sender, EventArgs e)
        {
            if (checkCursor.Checked)
            {
                timer.Start();
            }
            else
            {
                timer.Stop();
                MouseEnableCap(false);
            }

            checkHighlight.Checked = checkCursor.Checked;
        }

        private void checkHighlight_CheckedChanged(object sender, EventArgs e)
        {
            if (checkHighlight.Checked)
            {
                timer.Start();
            }
            else
            {
                timer.Stop();
                MouseEnableCap(false);
            }

            checkCursor.Checked = checkHighlight.Checked;
        }    

        private void checkHotkey_CheckedChanged(object sender, EventArgs e)
        {
            if (checkHotkey.Checked)
            {
		        // register hotkey
                RegisterHotKey(Handle, HOTKEY_CAPTURE, MOD_CONTROL|MOD_ALT, Keys.P);
	        }
	        else
	        {
		        // unregister hotkey
                UnregisterHotKey(Handle, HOTKEY_CAPTURE);
	        }
        }

        private void buttonCapture_Click(object sender, EventArgs e)
        {
            if (bGetWordUnloaded)
                return;

            int left, top, right, bottom;
            left = int.Parse(textBoxLeft.Text);
	        top = int.Parse(textBoxTop.Text);
	        right = int.Parse(textBoxRight.Text);
	        bottom = int.Parse(textBoxBottom.Text);

	        ShowWindow(this.Handle, SW_HIDE);
	        Sleep(100);

            GetWordEnableCap(true);

            //if want to capture a specified window, pass in the window handle
            //and the client rectangle of this window
            //if want to capture all the windows in a rectangle, pass in a 0 for
            //the window handle, and the screen rectangle
	        bool bOK = false;
            Char[] wstrOut = new Char[MAX_OUTPUT_LEN];
            string strtmp = new string(wstrOut);
            bOK = GetRectWord(0, left, top, right, bottom, strtmp, MAX_OUTPUT_LEN);
            if (bOK)	
            {
                textBoxRect.Text = strtmp;                
            }
            else					// failed 
            {
                textBoxRect.Text = "";
            }

            GetWordEnableCap(false);

            ShowWindow(this.Handle, SW_SHOW);
        }

        private void timer_Tick(object sender, EventArgs e)
        {
            MouseEnableCap(true);
        }

    }
}
3.3版的原码,官方发布的。 现在都5.0版了,3.3在win10编译不了 官方现在没发布5.0示例源码 只有它网站有一个API引用指南 http://www.textcapture.com/gb/api.htm
软件介绍 GetWord是一款专业的屏幕组件(控件),它可以帮助您在公司产品中快速便捷地集成屏幕功能,有效降低软件开发成本。 GetWord是世界上第一款也是目前唯一一款全面支持Windows和Adobe Acrobat/Acrobat Reader的专业屏幕引擎。GetWord支持单点、区域、选择等多种模式,支持Windows 2000/XP/Server2003/Vista/Server2008/Windows 7/Windows 8/Windows 10等各种主流操作系统,支持VB/VC/Delphi/C++ Builder/C#/.Net等各种常见开发环境。 目前,遍布世界各地的60多个国家和地区的众多客户都在使用GetWord。这些客户有:Apple(美国)、LEC(美国)、NetBrain(美国)、Autonomy(英国)、MJT Net(英国)、Linguatec(德国)、Issendis(法国)、Karolinska Insitutet(瑞典)、Caliber Multimedia(台湾)、MegaDict(泰国)、Matrix Development System(西班牙)、Future Electronics(新加坡)、支付宝(中国)、国泰君安(中国)、快鱼科技(中国)、爱科信(中国), 海(中国)等等. 支持的操作系统: Windows 2000/Windows XP/Windows Server 2003/Windows Vista/Windows Server 2008/Windows 7/Windows 8/Windows 10 支持的软件开发环境: GetWord支持所有主流的软件开发环境,如Visual Studio, Visual Studio .Net, Delphi , C++ Builder, Dev-Cpp,Java等等。 主要功能特征: 1. 支持英文, 简体中文, 繁体中文, 俄语, 法语, 日语, 德语, 西班牙语, 阿拉伯语, 朝鲜语, 土耳其语, 瑞典语, 挪威语, 意大利语, 拉丁语, 葡萄牙语, 波兰语, 印度语, 泰国语, 越南语等所有常见语言编码格式. 2. 支持Unicode. 3. 支持语境信息提和整句提,不仅可到光标所在处的,还可以到其前后的,便于智能识别和分析. 4. 支持区域抓,可以抓到给定区域内的所有文字(一行或多行). 5. 支持Adobe Acrobat/Acrobat Reader的PDF屏幕(已集成Adobe商用数字证书,该证书Adobe售价2500美金). 6. 支持选择(亦称高亮,划). 7. 支持命令行(Command Prompt). 8. 支持各种标准Windows组件,如对话框、工具栏、菜单、编辑框、组合框、列表框、树型控件等. 9. 支持各种常见办公软件,如微软Office、Outlook Express等. 10. 支持各种常见浏览器,如IE、FireFox、Mozilla、MyIE、Netscape等. 11. 支持鼠标、热键等多种模式. 支持ActiveX、Raw Dll等多种调用接口. 12. 封装程度高,使用方便,向现有应用程序中添加屏幕支持一般只需要十几行语句即可.
GetWord是一款专业的屏幕组件(控件),它可以帮助您在公司产品中快速便捷地集成屏幕功能,有效降低软件开发成本。 GetWord是世界上第一款也是目前唯一一款全面支持Windows和Adobe Acrobat/Acrobat Reader的专业屏幕引擎。GetWord支持单点、区域、选择等多种模式,支持Windows 2000/XP/Server2003/Vista/Server2008/Windows 7/Windows 8/Windows 10等各种主流操作系统,支持VB/VC/Delphi/C++ Builder/C#/.Net等各种常见开发环境。 目前,遍布世界各地的60多个国家和地区的众多客户都在使用GetWord。这些客户有:Apple(美国)、LEC(美国)、NetBrain(美国)、Autonomy(英国)、MJT Net(英国)、Linguatec(德国)、Issendis(法国)、Karolinska Insitutet(瑞典)、Caliber Multimedia(台湾)、MegaDict(泰国)、Matrix Development System(西班牙)、Future Electronics(新加坡)、支付宝(中国)、国泰君安(中国)、快鱼科技(中国)、爱科信(中国), 海(中国)等等. 支持的操作系统: Windows 2000/Windows XP/Windows Server 2003/Windows Vista/Windows Server 2008/Windows 7/Windows 8/Windows 10 支持的软件开发环境: GetWord支持所有主流的软件开发环境,如Visual Studio, Visual Studio .Net, Delphi , C++ Builder, Dev-Cpp,Java等等。 主要功能特征: 1. 支持英文, 简体中文, 繁体中文, 俄语, 法语, 日语, 德语, 西班牙语, 阿拉伯语, 朝鲜语, 土耳其语, 瑞典语, 挪威语, 意大利语, 拉丁语, 葡萄牙语, 波兰语, 印度语, 泰国语, 越南语等所有常见语言编码格式. 2. 支持Unicode. 3. 支持语境信息提和整句提,不仅可到光标所在处的,还可以到其前后的,便于智能识别和分析. 4. 支持区域抓,可以抓到给定区域内的所有文字(一行或多行). 5. 支持Adobe Acrobat/Acrobat Reader的PDF屏幕(已集成Adobe商用数字证书,该证书Adobe售价2500美金). 6. 支持选择(亦称高亮,划). 7. 支持命令行(Command Prompt). 8. 支持各种标准Windows组件,如对话框、工具栏、菜单、编辑框、组合框、列表框、树型控件等. 9. 支持各种常见办公软件,如微软Office、Outlook Express等. 10. 支持各种常见浏览器,如IE、FireFox、Mozilla、MyIE、Netscape等. 11. 支持鼠标、热键等多种模式. 支持ActiveX、Raw Dll等多种调用接口. 12. 封装程度高,使用方便,向现有应用程序中添加屏幕支持一般只需要十几行语句即可.
屏幕 使用 nhw32.dll 主要引出两个函数: 1. DWORD WINAPI BL_SetFlag32(UINT nFlag, HWND hNotifyWnd, int MouseX, int MouseY) 功能: 启动或停止。 参数: nFlag [输入] 指定下列值之一: GETWORD_ENABLE: 开始。在重画被区域前设置此标志。nhw32.dll是通过 重画单区域,截TextOutA, TextOutW, ExtTextOutA, ExtTextOutW等Windows API函数的参数来的。 GETWORD_DISABLE: 停止。 hNotifyWnd [输入] 通知窗口句柄。当到此时,向该通知窗口发送一登记消息:GWMSG_GETWORDOK。 MouseX [输入] 指定点的X坐标。 MouseY [输入] 指定点的Y坐标。 返回值: 可忽略。 2. DWORD WINAPI BL_GetText32(LPSTR lpszCurWord, int nBufferSize, LPRECT lpWordRect) 功能: 从内部缓冲区出单文本串。对英语文本,该函数最长出一行内以空格为界的三个英文单串,遇空格,非英文字母及除‘-’外的标点符号,则终止。对汉字文本,该函数最长出一行汉字串,遇英语字母,标点符号等非汉语字符,则终止。该函数不能同时出英语和汉语字符。 参数: lpszCurWord [输入] 目的缓冲区指针。 nBufferSize [输入] 目的缓冲区大小。 lpWordRect [输出] 指向 RECT 结构的指针。该结构定义了被所在矩形区域。 返回值: 当前光标在全部中的位置。 此外,WinNT/2000版 nhw32.dll 还引出另两个函数: 1. BOOL WINAPI SetNHW32() 功能: Win NT/2000 环境下的初始化函数。一般在程序开始时,调用一次。 参数: 无。 返回值: 如果成功 TRUE ,失败 FALSE 。 2. BOOL WINAPI ResetNHW32() 功能: Win NT/2000 环境下的去初始化函数。一般在程序结束时调用。 参数: 无。 返回值: 如果成功 TRUE ,失败 FALSE 。

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧