home *** CD-ROM | disk | FTP | other *** search
- /*
- * Xceed Winsock Library Sample: Chat connectionless
- * Copyright (c) 2000 Xceed Software Inc.
- *
- * This is a standard chat console application using connectionless
- * sockets to broadcast over the network to find available chat clients.
- *
- * This particular file is the entry point of the application.
- *
- * This file is part of the Xceed Winsock Library Samples.
- * The source code in this file is only intended as a supplement
- * to Xceed Winsock Library's documentation, and is provided "as is",
- * without warranty of any kind, either expressed or implied.
- *
- */
-
-
- #include "stdafx.h"
- #include <stdio.h>
- #include <conio.h>
- #include "Chat.h"
-
- /*
- * main:
- *
- * This is the entry point of the application. We create our application
- * object and make it run.
- */
-
- int main( int argc, char* argv[] )
- {
- CoInitializeEx( NULL, COINIT_MULTITHREADED );
-
- CComObject< CChat >* pxApp;
- HRESULT hr = CComObject< CChat >::CreateInstance( &pxApp );
-
- if( FAILED( hr ) )
- {
- printf( "Error: CreateInstance returned %08X\n", hr );
- }
- else
- {
- pxApp->AddRef();
- pxApp->Run();
- pxApp->Release();
- }
-
- printf( "\n\nPress any key to quit\n" );
- getch();
-
- CoUninitialize();
- return 0;
- }
-
- //
- // END_OF_FILE
- //
-