home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / smiley / smile.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  1.7 KB  |  77 lines

  1. // Smile.cpp : Implementation of CSmileApp and DLL registration.
  2.  
  3. #include "stdafx.h"
  4. #include "Smile.h"
  5.  
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11.  
  12.  
  13. CSmileApp theApp;
  14.  
  15. const GUID CDECL BASED_CODE _tlid =
  16.         { 0xc01fa300, 0xb475, 0x11d1, { 0x87, 0xe8, 0x0, 0x60, 0x97, 0xba, 0x8d, 0x75 } };
  17. const WORD _wVerMajor = 1;
  18. const WORD _wVerMinor = 0;
  19.  
  20.  
  21. ///////////////////////////////////////////////////////////////////////////
  22. // CSmileApp::InitInstance - DLL initialization
  23.  
  24. BOOL CSmileApp::InitInstance()
  25. {
  26.     BOOL bInit = COleControlModule::InitInstance();
  27.  
  28.     if (bInit)
  29.     {
  30.     }
  31.  
  32.     return bInit;
  33. }
  34.  
  35.  
  36. ////////////////////////////////////////////////////////////////////////////
  37. // CSmileApp::ExitInstance - DLL termination
  38.  
  39. int CSmileApp::ExitInstance()
  40. {
  41.     return COleControlModule::ExitInstance();
  42. }
  43.  
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // DllRegisterServer - Adds entries to the system registry
  47.  
  48. STDAPI DllRegisterServer(void)
  49. {
  50.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  51.  
  52.     if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  53.         return ResultFromScode(SELFREG_E_TYPELIB);
  54.  
  55.     if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  56.         return ResultFromScode(SELFREG_E_CLASS);
  57.  
  58.     return NOERROR;
  59. }
  60.  
  61.  
  62. /////////////////////////////////////////////////////////////////////////////
  63. // DllUnregisterServer - Removes entries from the system registry
  64.  
  65. STDAPI DllUnregisterServer(void)
  66. {
  67.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  68.  
  69.     if (!AfxOleUnregisterTypeLib(_tlid))
  70.         return ResultFromScode(SELFREG_E_TYPELIB);
  71.  
  72.     if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  73.         return ResultFromScode(SELFREG_E_CLASS);
  74.  
  75.     return NOERROR;
  76. }
  77.