// MyClient.cpp : Implementation of WinMain

// Note: Proxy/Stub Information
//      To build a separate proxy/stub DLL, 
//      run nmake -f MyClientps.mk in the project directory.

#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "MyClient.h"
#include "MyClient_i.c"
#include "clientdlg.h"

CExeModule _Module;

BEGIN_OBJECT_MAP(ObjectMap)
END_OBJECT_MAP()

/////////////////////////////////////////////////////////////////////////////
//
extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, 
    HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int /*nShowCmd*/)
{

     HRESULT hRes = CoInitialize(NULL);
     _ASSERTE(SUCCEEDED(hRes));
     _Module.Init(NULL, hInstance);
     _Module.dwThreadID = GetCurrentThreadId();

     int nRet = 0;

     CClientDlg*  pDlg = NULL;

     pDlg = new CClientDlg;
     if(NULL != pDlg)
     {
        pDlg->Create(NULL);
        pDlg->ShowWindow(SW_NORMAL);

        MSG msg;
        while (GetMessage(&msg, 0, 0, 0))
        {
           TranslateMessage(&msg);
           DispatchMessage(&msg);
        }
        nRet = msg.wParam;
        delete pDlg;
     }

     CoUninitialize();
     return nRet;
}
