00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "Web Interface.h"
00008 #include "Web InterfaceDlg.h"
00009 #include <winsock.h>
00010
00011 #ifdef _DEBUG
00012 #define new DEBUG_NEW
00013 #undef THIS_FILE
00014 static char THIS_FILE[] = __FILE__;
00015 #endif
00016
00017 BEGIN_MESSAGE_MAP(CWebInterfaceApp, CWinApp)
00018
00019
00020 ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00021 END_MESSAGE_MAP()
00022
00023 CWebInterfaceApp::CWebInterfaceApp() :
00024 m_si ("ODM - remote control server")
00025 {
00026 }
00027
00028 CWebInterfaceApp theApp;
00029
00030 BOOL CWebInterfaceApp::InitInstance()
00031 {
00032 if (m_si.is_1stInstance () == FALSE)
00033 return FALSE;
00034
00035 char sz [MAX_PATH];
00036 GetModuleFileName (NULL, sz, MAX_PATH);
00037 *strrchr (sz, '\\') = 0;
00038 SetCurrentDirectory (sz);
00039
00040 AfxEnableControlContainer();
00041
00042
00043
00044 #ifdef _AFXDLL
00045 Enable3dControls();
00046 #else
00047 Enable3dControlsStatic();
00048 #endif
00049
00050 SetRegistryKey ("OpenDownloadManager.ORG");
00051
00052 CoInitialize (NULL);
00053
00054 WORD w = MAKEWORD (1,1);
00055 WSADATA data;
00056 ::WSAStartup (w, &data);
00057
00058 CWebInterfaceDlg dlg;
00059 m_pMainWnd = &dlg;
00060 int nResponse = dlg.DoModal();
00061 if (nResponse == IDOK)
00062 {
00063 }
00064 else if (nResponse == IDCANCEL)
00065 {
00066 }
00067
00068 return FALSE;
00069 }
00070
00071 int CWebInterfaceApp::ExitInstance()
00072 {
00073 WSACleanup ();
00074
00075 CoUninitialize ();
00076
00077 return CWinApp::ExitInstance();
00078 }