RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRemoteDataModule.UpdateRegistry Method

Registers the remote data module in the system registry as an automation server.

Pascal
class procedure UpdateRegistry(Register: Boolean; const ClassID: string; const ProgID: string); override;
C++
virtual __fastcall UpdateRegistry(Boolean Register, const AnsiString ClassID, const AnsiString ProgID);

The protected UpdateRegistry is called automatically when you register or unregister the application server as an automation server. 

The Register parameter is true when registering an application server, false when unregistering. 

The ClassID and ProgID parameters specify the server's ClassID and ProgID respectively.

Note: If your application server pools remote data modules, you must override this method to call the global RegisterPooled procedure when the Register parameter is true and UnregisterPooled when the Register parameter is false.
 

Delphi Examples: 

 

{
The following UpdateRegistry method adjusts a pooled remote
data module accessed from a
TWebConnection component. This allows the resources of the 
data module to be freed when it is not in use, while 
optimizing the use of existing remote data modules by letting
clients share them.  The UpdateRegistry method also comments
out the calls to DisableSocketTransport and EnableSocket 
transport that are added by the Remote Data Module Wizard. 
This prevents socket-based connections, which do not provide
for a secure connection, from using the remote data module.
} 
class procedure TPooledRDM.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);
begin
  if Register then
  begin
    inherited UpdateRegistry(Register, ClassID, ProgID);
    EnableSocketTransport(ClassID);
    EnableWebTransport(ClassID);
  end else
  begin
    DisableSocketTransport(ClassID);
    DisableWebTransport(ClassID);
    inherited UpdateRegistry(Register, ClassID, ProgID);
  end;
end;

 

RegisterPooled 

UnregisterPooled 

Pooling Remote Data Modules

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