惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
Intezer
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
N
News | PayPal Newsroom
T
Tenable Blog
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
P
Privacy International News Feed
IT之家
IT之家
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
博客园_首页
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
NISL@THU
NISL@THU
I
InfoQ
D
DataBreaches.Net
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Security Latest
Security Latest
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic

博客园 - azhai

sqlserver 实现数据变动触发信息 优化网站 推荐一款UI设计软件Balsamiq Mockups ubuntu 添加公钥 ubuntu 10.10 安装 redmine 收藏常用正则表达式 - azhai - 博客园 ubuntu 10.10 安装步骤 - azhai ubuntu 搭建NAT、DHCP、VPN服务 - azhai ubuntu 10.10 网络连接消失问题解决办法 远程连接mysql超时的解决办法 ubuntu apache2 的负载均衡和反向代理 ubuntu 下的两个项目管理工具 jquery 图片轮询 netbeans 字体美化 windows7 安装 virtualbox和 ubuntu SSL on Ubuntu 8.10 Apache2 博文阅读密码验证 - 博客园 线程加载返回的XMLtoTClientDataSet 用IDHTTP 实现上传和返回XML
delphi 开发扩展(二)
azhai · 2009-11-03 · via 博客园 - azhai

library plug_in;

uses
  SysUtils,
  Classes,
  Unit3 in 'H:\test\Unit3.pas' {Form3};

exports GetForm,GetName;

{$R *.res}

begin
end. 

{要加载的窗体}

unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,ADODB, DB, Grids, DBGrids;

type
  TForm3 = class(TForm)
    Button1: TButton;
    ADOQuery1: TADOQuery;
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;
  ADO: TADOConnection;

  function GetName:string;StdCall;
  function GetForm(AHandle:THandle;adoconn:TADOConnection;ACaption:String):BOOL;StdCall;

implementation

{$R *.dfm}

function GetName:string;
begin
  result:='my dll';
end;

function GetForm(AHandle:THandle;adoconn:TADOConnection;ACaption:String):BOOL;
  var
    ShowForm:TForm3;
  begin
    Application.Handle:=AHandle;
    ADO:= adoconn;
    ShowForm :=TForm3.Create(Application);
    try
        if ACaption<>'' then
        ShowForm.Caption:=ACaption;
        ShowForm.ShowModal;
        Result:=False;
    finally  
        ShowForm.Free;
    end;  
  end;

procedure TForm3.Button1Click(Sender: TObject);
begin
  self.ADOQuery1.Connection:=ADO;
  with  self.ADOQuery1 do
  begin
     Connection:=ADO;
     close;
     SQL.Clear;
     SQL.Add('select top 1 * from master');
     open;
  end;
end;

end.