X10 Community Forum

🖥️ActiveHome Pro => SDK => Topic started by: andrei on June 15, 2005, 02:25:45 AM

Title: Some problem with Delphi
Post by: andrei on June 15, 2005, 02:25:45 AM
Hey!
Anyone knows how I can
using "X10.ActiveHome" object in Delphi 6.0.
I try to create COM object with follow
function: "var IX10: Variant; IX10:=
CreateOleObject('X10.ActiveHome');". And
take the windows messages "Access violation
at address 77FCC9DC in module 'ntdll.dll'.
Read of address 00D7675D." What's happen?
Title: Re: Some problem with Delphi
Post by: dbaxter on March 11, 2006, 04:29:31 PM
You need to install it as an ActiveX component. Then it will appear on your tool pallet and you can drop it on your project form. You probably want to make it invisible. Then it's as simple as:
procedure TForm1.DoPower(Address: string; PwrOn: boolean);
var
    s: string;
begin
     If PwrOn then s := Address + ' on' else s := Address + ' off';
     ActiveHome1.SendAction('sendplc', s);
end;

The receive function that shows in the components event list is problematic, however.