Dll问题,已知道类型和参数,该怎么调用呀?????(20分)

  • 主题发起人 主题发起人 cntiny
  • 开始时间 开始时间
C

cntiny

Unregistered / Unconfirmed
GUEST, unregistred user!
nhw32.dll 主要引出两个函数:<br><br>1. DWORD WINAPI BL_SetFlag32(UINT nFlag,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HWND hNotifyWnd,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int MouseX, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int MouseY)<br>&nbsp; &nbsp;功能:<br> 启动或停止取词。<br>&nbsp; &nbsp;参数:<br>&nbsp; &nbsp; &nbsp; &nbsp;nFlag <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [输入] 指定下列值之一:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GETWORD_ENABLE: 开始取词。在重画被取单词区域前设置此标志。nhw32.dll是通过<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 重画单词区域,截取TextOutA, TextOutW, ExtTextOutA, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ExtTextOutW等Windows API函数的参数来取词的。<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GETWORD_DISABLE: 停止取词。<br>&nbsp; &nbsp; &nbsp; &nbsp;hNotifyWnd <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [输入] 通知窗口句柄。当取到此时,向该通知窗口发送一登记消息:GWMSG_GETWORDOK。<br>&nbsp; &nbsp; &nbsp; &nbsp;MouseX <br> [输入] 指定取词点的X坐标。<br>&nbsp; &nbsp; &nbsp; &nbsp;MouseY <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [输入] 指定取词点的Y坐标。<br>&nbsp; &nbsp; 返回值:<br>&nbsp; &nbsp; &nbsp; &nbsp;可忽略。<br>2. DWORD WINAPI BL_GetText32(LPSTR lpszCurWord, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int nBufferSize, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LPRECT lpWordRect)<br>&nbsp; &nbsp; 功能:<br> 从内部缓冲区取出单词文本串。对英语文本,该函数最长取出一行内以空格为界的三个英文单词串,遇空格,非英文字母及除‘-’外的标点符号,则终止取词。对汉字文本,该函数最长取出一行汉字串,遇英语字母,标点符号等非汉语字符,则终止取词。该函数不能同时取出英语和汉语字符。<br>&nbsp; &nbsp; 参数:<br>&nbsp; &nbsp; &nbsp; &nbsp;lpszCurWord<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [输入] 目的缓冲区指针。<br>&nbsp; &nbsp; &nbsp; &nbsp;nBufferSize<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [输入] 目的缓冲区大小。<br>&nbsp; &nbsp; &nbsp; &nbsp;lpWordRect<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [输出] 指向 RECT 结构的指针。该结构定义了被取单词所在矩形区域。<br>&nbsp; &nbsp; 返回值:<br>&nbsp; &nbsp; &nbsp; &nbsp; 当前光标在全部词中的位置。<br><br><br><br>我如何在Delphi中调用里面的函数呀????????<br>
 
function BL_SetFlag32(nFlag: UINT; hNotifyWnd: HWND; MouseX, MouseY: integer): DWORD; stdcall; external 'x.dll';<br><br>type LPRECT = ^TRect;<br>function BL_GetText32(lpszCurWord: pchar; nBufferSize: integer; lpWordRect: LPRECT): DWORD; stdcall; external 'x.dll';
 
to:zw84611<br>先谢谢呀,我在网吧.不能用Delphi<br>可以的话,分你分呀.<br>btw:大哥,你还是业余的呀????都排名第2了,争取第一呀!<br><br>你知道哪有屏幕取词98下的源码吗?????<br>只要是搜索引擎,我都搜了,就是没有delphi下的屏幕取词源码呀!!
 
接受答案了.
 
后退
顶部