********dll代码:library Project1;uses
Unit1 in 'Unit1.pas';{$R *.res}
exports test;begin
end.*********Unit1.pas代码
unit Unit1;interfaceuses windows;procedure test(hwnd:longint);stdcall;implementation
procedure test(hwnd:longint);stdcall;
begin
messagebox(hwnd,'测试Dll','标题',64);
end;
end.**********VB中的声明和调用Private Declare Sub test Lib "Project1.dll" (a As Long)Private Sub Command1_Click()
test (Me.hWnd)
End Sub问题就是那个句柄是错的,导致消息框弹不出来!怎么回事
解决方案 »
- 多少人在用 delphi for php?
- 谁能回答,我送200分
- fastreport 在运行时,调整页高度!
- 在线等,散分啦!SQL数据库能不能存JPG格式图片?如何做啊??
- 我的设想:一个万能的报表解决方案,适用C/S,B/S,跨平台,请大家指教。
- 如何在combobox控件下嵌套treeview控件
- 在delphi下串口通信使用何种控件?能同时进行多个串口通信的
- 如何解决SQL语句中短日期(smalldatetime类型)转化的问题?
- webbrowser打开网页延迟的问题
- 应用程序和Dll共享TDatabase.Databasename的问题?
- Exel文件的行数!!!高手快来啊!!!急死我了!!!!
- 用reportbuilder怎么打印stringgrid的内容?
Private Declare Sub test Lib "Project1.dll" (ByVal a As Long)Private Sub Command1_Click()
test (Me.hWnd)
End Sub
VB的ByVal相当于Delphi等当中的const