Recent

Author Topic: how to use timer components or API function when compile a dll ?  (Read 4541 times)

yalewang

  • Newbie
  • Posts: 2
when compiling a dll , i want to add timer or idletimer controls to it .
but not success . how can i do it ?
may someone help me and give me an exmple?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8799
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: how to use timer components or API function when compile a dll ?
« Reply #1 on: July 27, 2010, 06:45:08 am »
Please post your effort so far, rather than writing from scratch, someone might be able to fix your code.

yalewang

  • Newbie
  • Posts: 2
Re: how to use timer components or API function when compile a dll ?
« Reply #2 on: July 27, 2010, 10:08:21 am »
here is my dll  frame code :
library dlltest1;
uses
  SysUtils,
  Classes;
var
x,y,z:integer;
{$R *.res}
procedure dddd(str:string);/////////////here , is my process
begin
x:=random(100); y:=random(30);       
end;

procedure   ontimer();////here ,i need help ,to set a timer process ,
                              ////interval:=1,let dll run constantly
begin
     dddd("aaaa");//here , call my process

     function Add():integer;stdcall;////here define a export function
        begin
           z:=x+y;
            result:= z;
        end;

  end;

exports
Add;

begin
end.

 

TinyPortal © 2005-2018