Previous | Next |
Used to create an initialized user-authentication connection object.
Syntax
HRESULT CreateUserAuthentication(
INSSUserAuthentication **ppUserAuthen
);
Parameters
[out] ppUserAuthen
Specifies the address of a pointer to the user-authentication object that has been created.
Return Values
This method must return S_OK upon successful completion, or an HRESULT error code.
Remarks
The server running Windows Media Services calls this method each time a client connects. This user authentication performs all authentication for this instance of the client connection.
The following sample code demonstrates a skeletal implementation of this method:
HRESULT CSampleAuthenticator::CreateUserAuthentication(
INSSUserAuthentication **ppCtx )
{
//
// Create a new instance of an authentication context object
//
CUserAuthentication * pContext = new CUserAuthentication();
if( NULL == pContext )
{
return( E_OUTOFMEMORY );
}
//
//Initialize the authentication context object.
//For example: Use a custom function to save a pointer to the object
//for later use.
//
HRESULT hr = pContext->Initialize( this );
if( FAILED( hr ) )
{
delete pContext;
return( hr );
}
*ppCtx = ( INSSUserAuthentication * )pContext;
return( S_OK );
}
See Also
INSSUserAuthentication::GetAuthenticator
Previous | Next |