SkypePlugin.cpp

Go to the documentation of this file.
00001 // SkypePlugin.cpp : main source file for SkypePlugin.exe
00002 //
00003 
00004 #include "stdafx.h"
00005 #include "resource.h"
00006 #include "aboutdlg.h"
00007 #include "MainDlg.h"
00008 
00009 CAppModule _Module;
00010 
00011 int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
00012 {
00013         CMessageLoop theLoop;
00014         _Module.AddMessageLoop(&theLoop);
00015 
00016         CMainDlg dlgMain;
00017 
00018         if(dlgMain.Create(NULL) == NULL)
00019         {
00020                 ATLTRACE(_T("Main dialog creation failed!\n"));
00021                 return 0;
00022         }
00023 
00024         dlgMain.ShowWindow(nCmdShow);
00025 
00026         int nRet = theLoop.Run();
00027 
00028         _Module.RemoveMessageLoop();
00029         return nRet;
00030 }
00031 
00032 int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
00033 {
00034         HRESULT hRes = ::CoInitialize(NULL);
00035 // If you are running on NT 4.0 or higher you can use the following call instead to 
00036 // make the EXE free threaded. This means that calls come in on a random RPC thread.
00037 //      HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
00038         ATLASSERT(SUCCEEDED(hRes));
00039 
00040         // this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
00041         ::DefWindowProc(NULL, 0, 0, 0L);
00042 
00043         AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls
00044 
00045         hRes = _Module.Init(NULL, hInstance);
00046         ATLASSERT(SUCCEEDED(hRes));
00047 
00048         int nRet = Run(lpstrCmdLine, nCmdShow);
00049 
00050         _Module.Term();
00051         ::CoUninitialize();
00052 
00053         return nRet;
00054 }

Generated on Wed Sep 20 09:36:02 2006 for Skype Call Cost Estimator by  doxygen 1.4.6