RSS.cpp

/****************************************************************************/

/**                                                                        **/

/** Copyright (c) 2005 Diodia Software          (http://www.diodia.com/)   **/

/**                                                                        **/

/** Use in any form with or without modification for commercial and non-   **/

/** commercial purposes is permitted.                                      **/

/**                                                                        **/

/****************************************************************************/

#include "stdafx.h"

 

#include "Resource.h"

#include "RSS.h"

#include "RSS_i.c"

#include "dlldatax.h"

 

#include "HookC.h"

#include "ContextC.h"

 

#ifdef _MERGE_PROXYSTUB

extern "C" HINSTANCE hProxyDll;

#endif

 

CComModule _Module;

 

BEGIN_OBJECT_MAP(ObjectMap)

   OBJECT_ENTRY(CLSID_IEHook, HookC)

END_OBJECT_MAP()

 

/****************************************************************************/

/*

/* DESCRIPTION : "Application" object.

/*

/****************************************************************************/

class CRSSApp : public CWinApp

{

   // Overrides

   // ClassWizard generated virtual function overrides

   //{{AFX_VIRTUAL(CRSSApp)

public:

   virtual BOOL InitInstance();

   virtual int ExitInstance();

   //}}AFX_VIRTUAL

 

   //{{AFX_MSG(CRSSApp)

   // NOTE - the ClassWizard will add and remove member functions here.

   //    DO NOT EDIT what you see in these blocks of generated code !

   //}}AFX_MSG

   DECLARE_MESSAGE_MAP()

};

 

BEGIN_MESSAGE_MAP(CRSSApp, CWinApp)

   //{{AFX_MSG_MAP(CRSSApp)

   // NOTE - the ClassWizard will add and remove mapping macros here.

   //    DO NOT EDIT what you see in these blocks of generated code!

   //}}AFX_MSG_MAP

END_MESSAGE_MAP()

 

CRSSApp theApp;

 

/****************************************************************************/

/*

/* DESCRIPTION : Initialize.

/*

/* RETURN VALUE: As CWinApp::InitInstance()

/*

/****************************************************************************/

BOOL CRSSApp::InitInstance()

{

#ifdef _MERGE_PROXYSTUB

   hProxyDll = m_hInstance;

#endif

 

   _Module.Init(ObjectMap, m_hInstance, &LIBID_RSSLib);

 

   char        DllPath[MAX_PATH];

   GetModuleFileName(m_hInstance, DllPath, sizeof(DllPath));

   ContextC::SaveDllPath(DllPath);

 

   return CWinApp::InitInstance();

}

 

/****************************************************************************/

/*

/* DESCRIPTION : Exit.

/*

/* RETURN VALUE: As CWinApp::ExitInstance()

/*

/****************************************************************************/

int CRSSApp::ExitInstance()

{

   _Module.Term();

   return CWinApp::ExitInstance();

}

 

/****************************************************************************/

/*

/* DESCRIPTION : Used to determine whether the DLL can be unloaded by OLE.

/*

/* RETURN VALUE: S_OK - if OK to unload

/*               S_FALSE - otherwise

/*

/****************************************************************************/

STDAPI DllCanUnloadNow(void)

{

#ifdef _MERGE_PROXYSTUB

   if (PrxDllCanUnloadNow() != S_OK)

      return S_FALSE;

#endif

   AFX_MANAGE_STATE(AfxGetStaticModuleState());

   return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;

}

 

/****************************************************************************/

/*

/* DESCRIPTION : Returns a class factory to create an object of the

/*               requested type.

/*

/* RETURN VALUE: S_OK - if OK

/*               ? - if error

/*

/****************************************************************************/

STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)

{

#ifdef _MERGE_PROXYSTUB

   if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK)

      return S_OK;

#endif

   return _Module.GetClassObject(rclsid, riid, ppv);

}

 

/****************************************************************************/

/*

/* DESCRIPTION : Adds entries to the system registry.

/*

/* RETURN VALUE: S_OK - if OK

/*               ? - if error

/*

/****************************************************************************/

STDAPI DllRegisterServer(void)

{

#ifdef _MERGE_PROXYSTUB

   HRESULT hRes = PrxDllRegisterServer();

   if (FAILED(hRes))

      return hRes;

#endif

   // registers object, typelib and all interfaces in typelib

   return _Module.RegisterServer(TRUE);

}

 

/****************************************************************************/

/*

/* DESCRIPTION : Removes entries from the system registry.

/*

/* RETURN VALUE: S_OK - if OK

/*               ? - if error

/*

/****************************************************************************/

STDAPI DllUnregisterServer(void)

{

#ifdef _MERGE_PROXYSTUB

   PrxDllUnregisterServer();

#endif

   return _Module.UnregisterServer(TRUE);

}

 





Source Files
   Commands.cpp
   Context.cpp
   CreatePath.cpp
   DateParser.cpp
   DlgEditFeedC.cpp
   DlgManageFeedsC.cpp
   Hook.cpp
   Iso8601.cpp
   MsXmlMisc.cpp
   MsXmlSelect.cpp
   RegistryNotify.cpp
   RegistryUtil.cpp
   RSS.cpp
   RSS.def
   RSS.idl
   RssAction.cpp
   RssDownloader.cpp
   RssFeed.cpp
   RssHelpers.cpp
   RssInit.cpp
   RssItem.cpp
   RssMultiFeed.cpp
   RssTimer.cpp
   RssXml.cpp
   StdAfx.cpp

Header Files
   Commands.h
   ContextC.h
   DateParser.h
   DlgEditFeedC.h
   DlgManageFeedsC.h
   Helper.h
   HookC.h
   RegistryNotify.h
   RegistryNotifyC.h
   Resource.h
   RssDownloaderC.h
   RssFeedC.h
   RssHelpers.h
   RssItemC.h
   RssMultiFeedC.h
   StdAfx.h
   ThreadObject.h
   XmlHelpers.h

Resource Files
   about.htm
   DiodiaLogoSmall.gif
   logo.bmp
   manifest.xml
   read.bmp
   RSS.rc
   RSS.rgs
   ToolBandLayout.xml
 

© 2002-2008 Diodia Software