Âé·³¸ßÊÖ¸øÐ´¸öVC¸ßÓÃDELPHI DLLµÄ³ÌÐò
·Ö²»¹»ÔÙ¼Ó£¬¼±Çó
http://topic.csdn.net/u/20091214/22/37554f7c-831f-486b-ab58-6b50532c47ab.html
ÔÌûÔÚÕ⣬¶¼ËµÒ»Â¥µÄ·½·¨ÊÇÕýÈ·µÄ£¬µ«ÊÇÎÒÕâ°´Â¥Ö÷·½·¨³ö´í
DELPHIµÄ´úÂëÈçÏÂ
Delphi(Pascal) code:
library HealthDocDll;
uses
SysUtils,
Classes,
Forms,
Dialogs,
Windows,
HealthDoc in 'HealthDoc.pas' {frmHealthDoc},
pub in 'pub.pas';
{$R *.res}
procedure ShowForm(DoctorName,UserName:string);
begin
sDoctorName:=DoctorName;
sUserName:=UserName;
if not Assigned(frmHealthDoc) then
TfrmHealthDoc.Create(nil);
frmHealthDoc.Show;
end;
exports
ShowForm;
begin
end.
Ö»ÓÐÒ»¸ö´°¿Ú£¬SHOW³öÀ´¾ÍÐÐ
VCµÄµ÷ÓôúÂëÈçÏÂ
C/C++ code:
HINSTANCE hDll;
hDll=LoadLibrary( _T("HealthDocDLL.DLL") );
typedef int(*func)(const char*,const char*);
func SmartWord= (func)GetProcAddress( hDll , "ShowForm" );
SmartWord( "aaaaaa" , "b" );
´íÎóÈçÏÂ
"0x7c9313c0"Ö¸ÁîÒýÓÃ"0x004d0055"ÄÚ·á¡£¸ÃÄÚ´æ²»ÄÜΪ"written"
Ó¦¸ÃÊǵØÖ·Ô½½çÀàµÄ´íÎó°É£¬ÇëÎÊÓ¦¸ÃÈçºÎÐ޸ģ¿
procedure ShowForm(DoctorName,UserName:string);
´Ë´¦¸ÄΪ
procedure ShowForm(DoctorName,UserName:pchar);
µ÷Ó
Ïà¹ØÎÊ´ð£º
ÎÒ±¾À´ÔÚѧУÊÇŪµÄJ2EE
×òÌìÈ¥Á˳¤É³Ò»¼Ò¹«Ë¾Ó¦Æ¸ ˵ÊÇÓÐÒ»¸öÏîÄ¿ delphiµÄ
ʵϰÆÚÒ»¸öÔ ËÄÌì°ëµÄdelphiÅàѵ ºóÃæ25Ìì¸øÄãÒ»¸öÉè¼ÆÎĵµ×Ô¼º×öÒ»¸öÏîÄ¿
×ߺ󲻾ôòµç»°¹ýÀ´½ÐÎÒÐÇÆÚһȥ±¨µ½
¿´µ½delphiµ ......
//DLL ·ÅÔÚEXEÖÐûÎÊÌâ
function SkinForm(var skfrm:TForm):Integer;stdcall;
var
skf:TbsBusinessSkinForm;
nskfrm:TForm;
begin
frmUUMain:=skfrm;
skf:=TbsBus ......
°ÑÕâ¶Î´úÂë·ÒëΪc#ÊÇʲôÑùµÄÂé·³°ï°ïæ
Delphi(Pascal) code:
unit SMSHTTP;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
type
GetInMessa ......
Delphi(Pascal) code:
library HealthDocDll;
uses
SysUtils,
Classes,
Forms,
Dialogs,
Windows,
HealthDoc in 'HealthDoc.pas' {frmHealthDoc},
pub in 'pub.pas';
{$R *.res}
proced ......
delphi ÈçºÎ°ÑÊý¾Ýµ¼³öµ½EXCELÖУ¿ÄÄλÄܸøÎÒ¸öÀý×Ó£¿¶àл
´ÓÍøÉÏÕÒÁËЩ×ÊÁÏ£¬ËµÐèÒªÒýÈëEXCEL×é¼þ¶Ô°É£¿ÄÇÑùµÄ»°×îÖÕÈí¼þÉú³ÉEXEʱÕâ¸ö×é¼þÊǵ¥¶ÀµÄÎļþ°É£¿
ÓÐûÓа취×îÖÕ²»Éú³É¶ÀÁ¢ÎļþµÄÇé¿öϵ¼³öEXCEL£¿
² ......