RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInvokableClassRegistry.RegisterInvokableClass Method (TClass)

Registers the implementation class for an invokable interface.

Pascal
procedure RegisterInvokableClass(AClass: TClass; CreateProc: TCreateInstanceProc); overload;
procedure RegisterInvokableClass(AClass: TClass); overload;
C++
__fastcall RegisterInvokableClass(TClass AClass, TCreateInstanceProc CreateProc);
__fastcall RegisterInvokableClass(TClass AClass);

RegisterInvokableClass registers the class that implements an already-registered invokable interface. It is only needed on server applications that implement Web Services. The interface itself is registered by the RegisterInterface method. 

The invocation registry must be able to instantiate the implementation class. If the class has a virtual constructor that takes no arguments, you do not need to supply a method to create the class instance. If the constructor takes any arguments, of if it is not virtual, you must supply a method to instantiate the class as the value of the CreateProc argument. 

AClass is a class reference to the class being registered. In Delphi code, you need only supply the class name. In C++, you can obtain a class reference for a class using the __classid operator. 

CreateProc is a procedure that returns an instance of AClass. If CreateProc is nil (Delphi) or NULL (C++), then AClass must be a descendant of TInvokableClass

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!