Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VCµ÷ÓÃDELPHI DLLÂÒÂë

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;
showmessage(sdoctorname);
showmessage(susername);
end;

exports
ShowForm;

begin



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" );



show³öÀ´µÄΪʲôÊÇÂÒÂ룿

thiscallÊÇɶ£¿

Õâ²»»¹ÊÇÄǸöÎÊÌâÂð£¬Äã°ÑÁ½±ß¶¼¸Ä³É stdcall,ÌýÎÒµÄ
¸Õ²Å´ò´íÁË£¬

stdcall³ö´í

delphi²à:
procedure ShowForm(DoctorName,UserName:string);stdcall;
vc²à:
typedef int(_stdcall *func)(const char*,const char*);



ÒÀÈ»³ö´í£¬ÒÀÈ»ÂÒÂë

¿ÉÒÔÁË£¬Ð»Ð»£¬¸öÈË·¸µÄ´íÎó£¬ÀÍ·³´ó¼ÒÁË

ÄÜ°ÑÄãµÄdll·¢µ½ÎÒÓÊÏäÂð£¬lxqiang123321@163.com


Ïà¹ØÎÊ´ð£º

VC Delphi ÄÚ´æËÙ¶È±È½Ï - VC/MFC / ·Ç¼¼ÊõÀà

VC ¿ØÖÆ̨³ÌÐò:
#include <iostream>
using namespace std;
int main()
{
const int def_buffer = 1024 * 4;
DWORD t;
BYTE b[def_buffer];
memset(b, 0, sizeof(b));
PBYTE p;
t = GetTickC ......

delphiµÄdll×Ó´°ÌåÎÊÌâµÄ½â¾ö - Delphi / ·Ç¼¼ÊõÇø

Ò»Ö±ÏëʹÓÃdll£¬µ«delphiµÄdll×Ó´°Ìå¾­³£Óи÷ÖÖÎÊÌ⣬±ÈÈçÖ÷´°¿ÚÓëdll×Ó´°¿ÚµÄ½¹µãÎÊÌ⣬×Ó´°¿ÚÖпؼþµÄtab¼ü¡¢Èȼü¡¢enter¼üµÈµÄÎÊÌ⣬×Ó´°¿ÚÍ˳öµÄÎÊÌ⡢ƽÃæ°´Å¥ÎÊÌâµÈµÈ£¬ÍøÕ¾ÉϽøÐÐÁËËÑË÷£¬Ã»ÓбȽÏÍêÃÀµÄ½â¾ö· ......

xml´´½¨ºóÈçºÎÏú»Ù? - Delphi / ÍøÂçͨÐÅ/·Ö²¼Ê½¿ª·¢

xml := CreateOleObject('Microsoft.XMLHTTP');
  xml.Open('GET','http://www.google.com', False);
  xml.Send;
  xml.responseText;
ʹÓÃxml.responseText¿ÉÒÔ»ñÈ¡ÍøÒ³Ô´Âë,µ«ÊÇÔÙ´Î ......

delphi ÎÊÌ⣿ - Delphi / ÓïÑÔ»ù´¡/Ëã·¨/ϵͳÉè¼Æ

1¡¢ÎÒÄÜ·ñÔÚdelphiÀïµ÷ÓÃÁíÍâÒ»¸öºǫ́³ÌÐò£¬µ«ÊÇÎÒ²»ÐèÒªµÈ´ýÕâ¸öºǫ́³ÌÐòÖ´ÐÐÍê³É£¬»¹¿ÉÒÔ¼ÌÐøÖ´ÐбðµÄ³ÌÐò¡£ÇëÎʾßÌåÔõôÑù²ÅÄÜʵÏÖ¡£
2¡¢ÎÒÄÜ·ñÔÚdelphiÉÏÖ´ÐÐÒ»¸ö¿ì½Ý¼ü£¬Ê¹delphi´°¿Ú³ÌÐòÄܹ»Ë¢ÐÂһϡ£[/size ......

Delphi Thread

Ö÷´°Ìå:
Delphi(Pascal) code:

procedure TfrmMain.btnResumeClick(Sender: TObject);
begin
myThread := TClientThread.Create(LeftPart(cbbServer.Text, ':'), StrToInt(RightPart(cbbServer.Text, ':')) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ