请教:DELPHI怎么调用C程序,又怎么关闭C程序?
解决方案 »
- 在ADOTABLE中设置connection连接数据模块如何使用uses ?
- 我想问问函数fn(s:string):integer和函数fn(var s:string):integer有什么区别?
- 请问上、下、左、右 键的ascii码是多少?
- 问个问题,很简单,要大家介绍介绍
- 怎样不让菜单上的快捷键出现啊!
- 请教:如何利用delphi在sql 2000server中建立数据库?
- 在delphi2010中安装indy10.5.7出错!!??
- 关于formula one 6.01 的问题
- 如何抓取網頁的內容以便做分析呢
- 在COM中如何通过接口中的函数返回一个自定义的记录,客户方如何调用?
- 用DELPHI6.0编一个七巧板的程序
- 那儿有面向对象建模工具?
2。在DOS下用C语言程序,编译成OBJ文件,离子:
程序: samp1.cpp
int iGlobal = 0
int _stdcall GetGlobalValue()
{return iGlobal}将C程序编译成objdelphi 程序: var Form1:TForm1;implementation
{$R *.dfm) {$L Samp1} //here's the inlcude of samp1.objfunction GetGlobalValue:integer;stdcall;external就可以使用的关键是{$L filename} delphi will link the file to exe,this is the static link
the default extension of file is .obj
也是连接静态库的方法//我找到的(·¥·)
TerminateProcess
CloseHandle
能不能使用winexec('c:\abc.exe');]
来通过DELPHI调用C程序?