delphi dll ʵÀý Óë dll´°ÌåʵÀý
delphi dll ʵÀý Óë dll´°ÌåʵÀý
±¾¶¯Ì¬Á´½Ó¿â·½·¨ÓÐ
Min,Max,SynAPP,ShowForm,showmyform
dll¹¤³ÌÎļþ
Library Project1;
uses
dllUnit1 in 'dllUnit1.pas' {Form1};
function Min(X, Y: Integer): Integer; export;
begin
if X < Y then Min := X else Min := Y;
end;
function Max(X, Y: Integer): Integer; export;
begin
if X > Y then Max := X else Max := Y;
end;
procedure showmyform();export;
begin
Form1 := TForm1.Create(nil);
Form1.ShowModal;
end;
exports
Min,Max,SynAPP,ShowForm,showmyform;
begin
end.
´°Ìåµ¥ÔªÎļþ£º
unit dllUnit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure SynAPP(App:THandle);stdcall;
procedure ShowForm;stdcall;
implementation
{$R *.dfm}
procedure SynAPP(App:THandle );stdcall;
begin
Application.Handle := App;
end;
procedure ShowForm;stdcall;
begin
Form1 := TForm1.Create (Application);
// Form2 := TForm2.Create(Application);
Form1.ShowModal;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
close;
end;
end.
Ïà¹ØÎĵµ£º
Èç¹û²ÎÊýÔÚº¯ÊýÖв»¿ÉÄÜÐÞ¸Ä, Ò»¶¨ÒªÊ¹Óà const;
²»È», ±àÒëÆ÷¾Í»á:
¼Ù¶¨ÏÈÐÞ¸Ä, ÏÈÒª±¸·Ý; ʹÓÃÇ°ºóÒªÔö¼õÒýÓüÆÊý; »¹ÒªÌ×ÉÏ try finally.
Ö¸¶¨ÁË const ¾Í¿ÉÒÔ±ÜÃâÒÔÉϹý³Ì´Ó¶øÌá¸ßЧÂÊ.
unit
Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs ......
×î½ü¾³£»áÄ£ÄâÍøÒ³Ìá½»·µ»ØÍøÒ³Ô´Â룬Ȼºó»ñµÃÍøÒ³ÖÐÏàÓ¦µÄÔªËØ£¬ÓÚÊÇÐèÒª³£³£½âÎöHtmlÖÐÏàÓ¦µÄ¸÷ÖÖÔªËØ£¬ÍøÂçÊǸöºÃ¶«Î÷£¬ËÑË÷Ò»·¬£¬¾ÍÕÒµ½ÁË
ºÃ¼¸¸öDelphi°æ±¾µÄHtmlParserµÄÀà¿â£¬ÊÔ×ÅʹÓÃÁ˼¸¸ö£¬·¢ÏÖ½âÎöÆðÀ´¶¼²»ÍêÕû£¬»ò¶à»òÉٵĻسöÏÖһЩÎÊÌ⣡ÓÚÊÇÏëµ½ÁËÈç¹û½çÃæÉÏÓÐÒ»¸öä¯
ÀÀÆ÷£¬ÎÒÃÇ¿ÉÒÔͨ¹ýWebBrowserµÄDocu ......
ÓÉÓÚÏîÄ¿µÄÐèÒª£¬½üÆÚ¿ªÊ¼Ñ§Ï°ÓÃdelphi¿ª·¢Ò»¸öÈíµç»°¿Ø¼þ¡£
ÒÔÇ°½Ó´¥¹ýһЩdelphi¿ª·¢·½ÃæµÄ¶«Î÷£¨µ±È»¶¼ÊÇЩƤëÀ²£©£¬µ«Ã»½Ó´¥¹ýocx¿Ø¼þµÄ¿ª·¢£¬ÔÚ´Ë°ÑһЩ¼òµ¥µÄ¶«Î÷¼ÇÏÂÀ´£¬Ò»·½ÃæÒÔºó×Ô¼º¿ÉÒÔÔÙѧϰ£¬ÁíÒ»·½ÃæÏ£Íû¶Ô¸Õ¸Õѧϰdelphi¿ª·¢ocx¿Ø¼þµÄ³õѧ ......
½«Ô¶³Ì¿ØÖÆÓ¦ÓÃÓÚ½ÌѧÖУ¬ÒѳÉΪĿǰ¼ÆËã»ú»¯½ÌѧµÄÖØÒªÊֶΡ£Ò»¶¨ÓкܶàµÄÍø³æÏëÁ˽âÕâÖÖÍøÂç½Ìѧ·½Ê½µÄ±à³ÌÔÀí°É¡£ÔÚ´ËÎÒÃǾÍÒÔÒ»¸ö¼òµ¥µÄÔ¶³Ì¿ØÖƳÌÐò×÷ΪʾÀý£¬ËµÃ÷ÕâÖÖÍøÂç±à³ÌµÄ»ù±¾ÔÀí¡£±¾³ÌÐòÒÔDelphi±à³ÌΪÀý¡£
¡¡¡¡Æäʵ¸Ã³ÌÐòµÄ¹¤×÷»úÖƺܼòµ¥£¬ÊÜ¿Ø·½ÔËÐÐÒ»¸ö³ÌÐò£¬ÓÃÓÚÕìÌý¶Ë¿Ú²¢½ÓÊÕÊý¾Ý°ü£¬¶øÖ÷¿Ø·½Í¨¹ý¶ ......
type
TCharStack = class(TStack)
private
function GetTop: Char;
public
function Pop: Char;
function Push(Item: Char): Char;
property Top: Char read GetTop;
end;
const
FindSet = ['(',')'];
implementation
{$R *.dfm}
{ TCharStack }
......