Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

102 lines
1.4 KiB

/*++
Copyright (c) 1999-2001 Microsoft Corporation
Module Name:
main.cpp
Abstract:
entry point for command console shell session
Author:
Brian Guarraci (briangu) 2001.
Revision History:
--*/
#include <CmnHdr.h>
#include <New.h>
#include <utils.h>
#include <Session.h>
int __cdecl
NoMoreMemory(
size_t size
)
/*++
Routine Description:
C++ new error handler
Arguments:
size_t - size of request
Return Value:
status
--*/
{
ASSERT(0);
UNREFERENCED_PARAMETER(size);
ExitProcess( 1 );
}
int __cdecl
main()
/*++
Routine Description:
This is the main entry point for the session
Arguments:
None
Return Value:
status
--*/
{
CSession *pClientSession = NULL;
//
// Install the new error handler
//
_set_new_handler( NoMoreMemory );
//
// create the session
//
pClientSession = new CSession;
if( pClientSession )
{
__try
{
if( pClientSession->Init() )
{
pClientSession->WaitForIo();
}
}
__finally
{
pClientSession->Shutdown();
delete pClientSession;
}
}
return( 0 );
}