INSSAuthenticator::CreateUserAuthentication

The INSSAuthenticator::CreateUserAuthentication method is used to create an uninitialized user-authentication connection object.

Syntax

HRESULT CreateUserAuthentication(
INSSUserAuthentication **ppUserCredential
);

Parameters

[out] ppUserCredential

Specifies the address of a pointer to the user-authentication object created.

Return Values

This method should return S_OK upon successful completion, or an HRESULT error value.

Remarks

The NetShow server calls this method each time a client connects. All authentication performed for this instance of the client connection is done through this user-authentication object.

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

HRESULT CSampleAuthenticator::CreateUserAuthentication( 
            INSSUserAuthentication **ppCtx )
{
  //
  // Create a new authentication context and initialize it.
  //
  CUserAuthentication * pContext = new CUserAuthentication();
  
  if( NULL == pContext )
  {
    return( E_OUTOFMEMORY );
  }
  HRESULT hr = pContext->Initialize( this );
  if( FAILED( hr ) )
  {
    delete pContext;
    return( hr );
  }
  *ppCtx = ( INSSUserAuthentication * )pContext;
  return( S_OK );
}

See Also

INSSUserAuthentication::GetAuthenticator

© 1996-1998 Microsoft Corporation. All rights reserved.