2 * Copyright (C) 1997 Transarc Corporation.
7 // afs_shl_ext.cpp : Defines the initialization routines for the DLL.
11 #include <afs/param.h>
16 #include "afs_shl_ext.h"
19 #include "shell_ext.h"
24 static char THIS_FILE[] = __FILE__;
28 /////////////////////////////////////////////////////////////////////////////
31 BEGIN_MESSAGE_MAP(CAfsShlExt, CWinApp)
32 //{{AFX_MSG_MAP(CAfsShlExt)
33 // NOTE - the ClassWizard will add and remove mapping macros here.
34 // DO NOT EDIT what you see in these blocks of generated code!
38 /////////////////////////////////////////////////////////////////////////////
39 // CAfsShlExt construction
41 CAfsShlExt::CAfsShlExt()
43 /* Start up sockets */
45 WSAStartup(0x0101, &WSAjunk);
48 /////////////////////////////////////////////////////////////////////////////
49 // The one and only CAfsShlExt object
53 /////////////////////////////////////////////////////////////////////////////
54 // CAfsShlExt initialization
56 BOOL CAfsShlExt::InitInstance()
58 // Load our translated resources
59 TaLocale_LoadCorrespondingModule (m_hInstance);
61 // Register all OLE server (factories) as running. This enables the
62 // OLE libraries to create objects from other applications.
63 COleObjectFactory::RegisterAll();
65 SetHelpPath(m_pszHelpFilePath);
70 /////////////////////////////////////////////////////////////////////////////
71 // Special entry points required for inproc servers
73 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
75 AFX_MANAGE_STATE(AfxGetStaticModuleState());
76 return AfxDllGetClassObject(rclsid, riid, ppv);
79 STDAPI DllCanUnloadNow(void)
81 AFX_MANAGE_STATE(AfxGetStaticModuleState());
83 if (!nCMRefCount && !nSERefCount)
89 // by exporting DllRegisterServer, you can use regsvr.exe
90 STDAPI DllRegisterServer(void)
92 AFX_MANAGE_STATE(AfxGetStaticModuleState());
93 COleObjectFactory::UpdateRegistryAll();