Some problem with Delphi

Started by andrei, June 15, 2005, 02:25:45 AM

Previous topic - Next topic

andrei

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?

dbaxter

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.