DANSrv Reference
GetServerRegistryDef Method
See Also  Send Feedback
NSPluginNet4 Assembly > NSPlugin Namespace > AppPlugin Class : GetServerRegistryDef Method

Glossary Item Box

This method is called from the generic server at startup for normal operation or for registration. It provides server registry information for this application required for DCOM registration. The DANSrv registers the OPC server accordingly. The XDASrv XML DA server ignores most of the registration information.
This method does typically not have to be changed. The wizard generated the GUIDs for this server and inserts the server names as defined in the wizard dialog.

The default implementation in IGeneric.cs/vb initializes default values and tries to read the configuration definitions from the file DANSrv.exe.config respectively web.config for XML DA servers. The method can be replaced by defining an overload in ServerAdapt.cs/vb.
The definitions can be made in the code to prevent them from being changed without a recompilation.

Syntax

Visual Basic (Usage)Copy Code
Dim instance As AppPlugin
Dim value As SrvRegDef
 
value = instance.GetServerRegistryDef()
C# 
public new SrvRegDef GetServerRegistryDef()

Return Value

Definition structure

Remarks

The default implementation in IGeneric.cs/vb tries to read the definitions for the following configuration definitions from the DANSrv.exe.config respectively web.config file. The following are sample definitions values.

<add key="ClsidServer" value = "{FD588D18-E4AD-4F5D-8B5B-D54541913F0D}" />
<add key="ClsidServer" value = "{38E22F8D-F91D-49F1-86FD-E47740A4F1D3}" />
<add key="ServerProgID" value = "TS.CSMinimalDA" />
<add key="CurrServerProgID" value = "TS.CSMinimalDA.1" />
<add key="ServerName" value = "TS.CSMinimalDA DA Server" />
<add key="CurrServerName" value = "TS.CSMinimalDA DA Server" /> The XDASrv returns this definitionin the GetStatus client call.
<add key="CompanyName" value = "Advosol Inc." />

The CLSID definitions need to be unique and can be created with the Visual Studio Create GUID tool.

The DANSrv/XDASrv project generation wizards create a file with unique CLSIDs and the definitions from the wizard dialog. The default values in the code are the same as in the config file.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2017 Copyright Advosol Inc. All Rights Reserved.