TRACEHANDLE hLogHandle = OpenSession();
if( hLogHandle == (TRACEHANDLE)INVALID_HANDLE_VALUE )
	return( ERROR_INVALID_HANDLE );
nRet = ProcessTrace( &hLogHandle,1,NULL,NULL );
if( nRet != ERROR_SUCCESS ) 
{
...
}
CloseTrace( hLogHandle );