Theater SDK Banner 

Art
[Previous][Next]

INSSAuthenticator::Initialize

Called by the server when the server is turned on.

Syntax

HRESULT Initialize (
INSSServerContext *pServerContext,
DWORD *dwFlags,
LPBSTR  pbstrDefaultRealm
);

Parameters

[in] pServerContext

Specifies a pointer to the server context. The server context contains name/value pairs of information (properties) about the server. These properties can be retrieved by using the IPropertyMap interface. The following properties are supported for the server context.

Property Description
NSS_SERVER_NAME A string value containing the server name.
NSS_VIRTUAL_SERVER_NAME A string value containing the server alias.
NSS_SERVER_VERSION_HI The high-order 32 bits of a 64-bit integer specifying the version of NetShow Theater Server. The most significant 16 bits of this property indicate the version. The least significant 16 bits of this property indicate the minor version.
NSS_SERVER_VERSION_LO The low-order 32 bits of a 64-bit integer specifying the version of NetShow Theater Server. The most significant 16 bits of this property indicate the minor version. The least significant 16 bits of this property indicate the build number.

[out] dwFlags

Specifies a pointer to a flag indicating the format of data passed between the client, the server, and the authenticator. The value NS_TEXT_WIRE_PROTOCOL indicates that the data is to be sent as a base 64 encoded string. Otherwise, the data is passed in binary form.

[Out] pbstrDefaultRealm

Specifies a pointer to the default realm. This realm string is passed to the user as part of every challenge. If an authenticator always uses the same realm for all users, it must specify a default realm. Using a default realm helps to boost the performance of the server. If, on the other hand, an authenticator uses different realms for different users, this parameter must return a NULL pointer. In this case, the GetChallenge method must be used to obtain the realm each time the server challenges the client.

Return Values

This method must return S_OK upon successful completion, or an HRESULT error code.

Remarks

Other properties can be added to the server context. The properties contained in the server context are available from the time the server is turned on until it is shut down.

The following sample code demonstrates a skeletal implementation of this method:

HRESULT CSampleAuthenticator::Initialize( 
    INSSServerContext * pServerContext,
    DWORD *dwFlags
    LPBSTR pbstrDefaultRealm )
{
  //
  // Do authenticator initialization here.
  //
  *dwFlags = NS_TEXT_WIRE_PROTOCOL; // Set for unencoded data
  return( S_OK );
}
[Previous][Next]



© 1996-1998 Microsoft Corporation. All rights reserved