home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / jpeg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-16  |  3.1 KB  |  97 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 2001                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10.  
  11. // JPEG.cpp : Defines the initialization routines for the DLL.
  12. //
  13.  
  14. #include "stdafx.h"
  15. #include "JPEG.h"
  16.  
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CJPEGApp
  25.  
  26. BEGIN_MESSAGE_MAP(CJPEGApp, CWinApp)
  27.     //{{AFX_MSG_MAP(CJPEGApp)
  28.         // NOTE - the ClassWizard will add and remove mapping macros here.
  29.         //    DO NOT EDIT what you see in these blocks of generated code!
  30.     //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CJPEGApp construction
  35.  
  36. // DUAL_SUPPORT_START
  37.  
  38. // Note: if you make a custom filter by copying this file, make sure to replace the following
  39. //  GUID with a new GUID that matches the uuid statement in the library declaration in the 
  40. //  .ODL file.  This is the GUID that OLE will use to register and use the automation object's
  41. //  type library.
  42.  
  43. // {28696022-B7E6-11D0-9B3B-444553540000}
  44. static const GUID LIBID_JPEG = 
  45.     { 0x28696022L, 0xb7e6, 0x11d0, 0x9b, 0x3b, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 };
  46. // DUAL_SUPPORT_END
  47.  
  48. CJPEGApp::CJPEGApp()
  49. {
  50. }
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // The one and only CJPEGApp object
  54.  
  55. CJPEGApp theApp;
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CJPEGApp initialization
  59.  
  60. BOOL CJPEGApp::InitInstance()
  61. {
  62.     // Register all OLE server (factories) as running.  This enables the
  63.     //  OLE libraries to create objects from other applications.
  64.     COleObjectFactory::RegisterAll();
  65.  
  66.     // DUAL_SUPPORT_START
  67.     //    make sure the type library is registerd. Otherwise dual interface won't work!
  68.     //    note that we are embedding type library as a resource in this DLL.
  69.     AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_JPEG);
  70.     // DUAL_SUPPORT_END
  71.  
  72.     return TRUE;
  73. }
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76. // Special entry points required for inproc servers
  77.  
  78. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  79. {
  80.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  81.     return AfxDllGetClassObject(rclsid, riid, ppv);
  82. }
  83.  
  84. STDAPI DllCanUnloadNow(void)
  85. {
  86.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  87.     return AfxDllCanUnloadNow();
  88. }
  89.  
  90. // by exporting DllRegisterServer, you can use regsvr.exe
  91. STDAPI DllRegisterServer(void)
  92. {
  93.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  94.     COleObjectFactory::UpdateRegistryAll();
  95.     return S_OK;
  96. }
  97.