home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 July
/
Chip_2002-07_cd1.bin
/
zkuste
/
delphi
/
kolekce
/
d3456
/
AWSCRIPT.ZIP
/
awScript
/
d4_example
/
Unit2.pas
< prev
Wrap
Pascal/Delphi Source File
|
1999-04-07
|
1KB
|
42 lines
unit Unit2;
{
A simple Automation object to demonstrate scripting. It was created
by going to File>>New then selecting ActiveX>>AutomationObject. The
class was given the name awScriptTest and then it's methods and
properties were defined using the type library editor. Finally, the
code was filled in below to implement the methods and properties.
}
interface
uses
ComObj, ActiveX, Project1_TLB;
type
TawScriptTest = class(TAutoObject, IawScriptTest)
protected
function Get_Name: WideString; safecall;
procedure AddToList(const Msg: WideString); safecall;
{ Protected declarations }
end;
implementation
uses ComServ, Unit1;
function TawScriptTest.Get_Name: WideString;
begin
Result := 'awScriptTest';
end;
procedure TawScriptTest.AddToList(const Msg: WideString);
begin
Form1.ListBox1.Items.Add(Msg);
end;
initialization
TAutoObjectFactory.Create(ComServer, TawScriptTest, Class_awScriptTest,
ciMultiInstance, tmApartment);
end.