我在DLL库中定义了一个函数
function chage(a:string);integer;stdcall;
begin
Screen.cursor:=crhourclass;
//执行代码
........
end;为什么我在宿主程序中调用这个DLL中的函数,鼠标状态并没有改变,这是为什么啊?
解决方案 »
- 急:请问哪位DELPHI高手用过SPCOMM跟欧姆龙PLC通信?
- 求excel导入到StringGrid中的最简单方法。在线等待!谢!
- 检测sql连接,线程
- 能否对集合进行循环
- 日志钩子,检测到WM_KEYDOWN消息后,怎么获得按键的虚拟码(即VK_xxx对应的值)
- ADO与SQL的数据连接 (在线)
- Params.WndParent := GetDesktopWindow;导致的问题
- 我在TreeView中的节点Icon显示不全,好象被拉伸了,怎么回事?(一定给分)
- 怎么解决delphi中出错提示应用程序在当前操作中使用了错误类型的值
- 最后107悬赏Delphi高手
- 哪个组件能够像Listbox添加string那样添加bitmap?
- 难度问题:如何做一个最低层的Form,也就说其它程序可以在那个form上面,还有些其它条件,详见内!
2、DLL导出:
function DLLCursor(): Integer; stdcall;
begin
Screen.Cursor := crHourGlass;
end;exports
DLLCursor;3、在EXE中调用:type
TDLLCursor = function (): Interger; stdcall;procedure TForm1.Button1Click(Sender: TObject);
var
FFunc: TDLLCursor;
begin
// 取得DLL入口函数地址
FFunc := TDLLCursor(TSystemFunc.Instance.GetLibProcAddress('Project2.dll', 'DLLCursor'));
if Assigned(FFunc) then
FFunc();
end;应该没有多大问题吧??
TDLLCursor = function (): Interger; stdcall;这是什么调用方法啊?
TDLLCursor = function (): Interger; stdcall;// 函数类型指针