博客园  :: 首页  :: 新随笔  :: 订阅 订阅  :: 管理

2012年4月16日

摘要: BOOL WINAPI funname(char *pFileName,char *pID);这是C++写的一个DLL里面的函数我现在想用delphi调用这个函数静态:function funname(var pFileName:pchar;var pID:pchar):integer;stdcall;external 'DLLNAME.dll' name 'funname';动态:OneHandle := LoadLibrary(DLLNAME.dll'); //动态载入DLL,并返回其句柄tryif oneHandle<>0 then@f 阅读全文

posted @ 2012-04-16 18:44 wind2012 阅读(326) 评论(0) 推荐(0)

摘要: //打印文本文件procedure PrintText(fieldName:String);var F:TextFile; //要打印的文本文件 RPrinter:TextFile; //打印机 s:String ;begin if FileExists(fieldName) then begin MessageBox('提示:',fieldName+'文件不存在,打印失败!',1); exit ; end; if FileExists('LPT1') then begin MessageBox('提示:','LPT1 端 阅读全文

posted @ 2012-04-16 18:37 wind2012 阅读(153) 评论(0) 推荐(0)