VC静态调用DELPHI DLL
Delphi(Pascal) code:
library Smart;
uses
SysUtils,
Classes,
Forms,
Dialogs,
Windows,
SmartWord in 'SmartWord.pas' {frmSmartWord},
pub in 'pub.pas';
{$R *.res}
var
AppDLL:TApplication;
ScrDLL:TScreen;
//
procedure MyDLLProc(Reason:Integer);
begin
try
if Reason=DLL_PROCESS_DETACH then
begin
Application:=AppDLL;
Screen:=ScrDLL;
end;
except
on e:Exception do
begin
ShowMessage(e.Message);
end;
end;
end;
//function SmartWord(App:TApplication;Scr:TScreen;DoctorName,UserName:PChar):Boolean;stdcall;
function SmartWord(DoctorName,UserName:PChar):Boolean;stdcall;
begin
//Application:=App;
//ScrDLL:=Screen;
//showmessage(doctorname);
//showmessage(username);
sDoctorName:=DoctorName;
sUserName:=UserName;
if not Assigned(frmSmartWord) then
Application.CreateForm(TfrmSmartWord,frmSmartWord);
frmSmartWord.Show;
end;
exports
SmartWord;
begin
try
AppDLL:=Application;
ScrDLL:=Screen;
DLLProc:=@MyDLLProc;
except
on e:Exception do
ShowMessage(e.Message);
end;
end.
用delphi来静态调用没有问题
Delphi(Pascal) code:
function SmartWord(DoctorName,UserName:PChar):Boolean;stdcall;ex
相关问答:
已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试
在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......
xml := CreateOleObject('Microsoft.XMLHTTP');
xml.Open('GET','http://www.google.com', False);
xml.Send;
xml.responseText;
使用xml.responseText可以获取网页源码,但是再次 ......
各位好!!
假设我有两个text文件
一个名叫 1.text
内容:
I like PC....
另外一是2.text
内容:
function yk as string
endfunction
globals
endglobals
***********************分界线********** ......
例子程序见附件,用Delphi 7进行编译
问题代码为
Delphi(Pascal) code:
if Node.ChildNodes <> nil then
begin
for i := 0 to Node.ChildNodes.Count - 1 do
begin
cNode := N ......
分不够再加,急求
http://topic.csdn.net/u/20091214/22/37554f7c-831f-486b-ab58-6b50532c47ab.html
原帖在这,都说一楼的方法是正确的,但是我这按楼主方法出错
DELPHI的代码如下
Delphi(Pascal) code:
li ......