VC调用DELPHI编写的DLL,调用出错,
已知DELPHI编写的DLL提供给我 SourceClear_Fun(pIntComPort:LongInt):LongInt;stdcall;export;
而提供给我C#样列为[DllImport("DLL7000.dll")]
public static extern int SourceClear_Fun(int comPort);
我现在需要在VC中调用
typedef int (_cdecl *SourceClear_Fun_t)(int comPort);
HINSTANCE hinstDLL=NULL;
hinstDLL=LoadLibrary("DLL7000.dll");
if (hinstDLL!=NULL)
{
SourceClear_Fun_t Proc;
Proc = (SourceClear_Fun_t)GetProcAddress (hinstDLL,"SourceClear_Fun");
int tmp;
tmp=Proc(comPort);
FreeLibrary(hinstDLL);
return tmp;
}
else
{
AfxMessageBox("装载DLL失败");
return -2;
}
怎么调用后程序终止,帮帮我看看什么原因{{--
相关问答:
昨晚在Delphi数据库查询中遇到了一个疑惑。代码如下:
procedure TFormSearchAchievement.ComboBoxXYChange(Sender: TObject);
var
XY : string;
begin
XY := comboboxxy.Items[comboboxx ......
VC++ 中, &变量名。 是什么意思。 Delphi中 和他一样的符号 是哪个、?
大家都认为,C语言之所以强大,以及其自由性,很大部分体现在其灵活的指针运用上。因此,说指针是C语言的灵魂,一点都不为过。同时, ......
我的代码如下,怎么总提示连不成功:
type
GUID = record //申明调用RAS(创建VPN连接用)函数所需结构体
Data1: integer;
Data2: Shortint;
Data3: Shortint;
......
有什么构想讨论一下。
这类东西主要是人气和界面花哨,技术上没什么难点.
这我知道,那技术上的呢?有没有构想一下该怎么设计?主要是delphi自身能不能够完成,若同时大量客户登陆,反应速度如何等等。
引用
......
请问Delphi有树形控件吗?
怎样使用?
Ttreeview
treeview.items.addchild(nil(上级节点),'案发时发'(text));
raize 控件包里面有,csdn有下载的
查帮助TTreeView和TNode两个类
TTreeView ......