/*
And now, the client..

*/
#include <objbase.h>
#include <initguid.h>

#define INIT
#include "..\Copy of SCOMS\IMike.h"
#include "..\Copy of SCOMS\CMike.h"

int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow )
{
IMike *pIMike = NULL;
IMike *pIM2 = NULL;
HRESULT hRes;

if( S_OK != OleInitialize( NULL ) )
{
MessageBox(NULL, "Couldn't initialize OLE!", NULL, MB_OK );
exit( 0 );
}

if( FAILED(hRes = CoCreateInstance( &CMike_CLSID,
NULL,
CLSCTX_INPROC_SERVER,
&IID_IMike,
&pIMike) ) )
{
MessageBox(NULL, "Couldn't CoCreateInstance!", NULL, MB_OK );
OleUninitialize();
exit( 0 );
}

MessageBox( NULL, "Preparing to invoke the \"Beep of IMike\"","Preparing", MB_OK );

pIMike->lpVtbl->pfnMikeBeep( pIMike );

MessageBox( NULL, "Beeped, now exiting", "Preparing to leave", MB_OK );

pIMike->lpvtbl->pfnRelease( pIMike );

OleUninitialize();
return 0;
}