>I try this in VFP but does not works.
>
>PROCEDURE Init [Appl as Variant]
> TopoLKernel = GETINTERFACE(Appl, "ITopoLKernel", "TLKernel.dll")
> RETURN 1
>ENDPROC
Maybe it works, but how would you know unless you watch it in the debugger? The TopoLKernel variable is undeclared, therefore I assumed private to the procedure (.init() of what class?), and destroyed when the procedure exits.
I'd recommend that you create a property of your appl class, and assign the interface object reference to it:
this.TopoLKernel = GETINTERFACE(this, "ITopoLKernel", "TLKernel.dll")
This can as well be in appl.init(), or somewhere later. If this works, the .TopoLKernel property will hold a reference to the interface object. However, I don't think you should pass your appl object as the first parameter - it needs to be a reference to the COM object whose interface you are trying to get.