1 // SSAPI.cpp : Implementation of DLL Exports.
4 // Note: Proxy/Stub Information
5 // To build a separate proxy/stub DLL,
6 // run nmake -f SSAPIps.mk in the project directory.
15 #include "VSSDatabase.h"
19 BEGIN_OBJECT_MAP(ObjectMap
)
20 OBJECT_ENTRY(CLSID_VSSApp
, CVSSApp
)
21 OBJECT_ENTRY(CLSID_VSSDatabase
, CVSSDatabase
)
22 //OBJECT_ENTRY(CLSID_VSSItem, CVSSItem)
23 //OBJECT_ENTRY(CLSID_VSSItems, CVSSItems)
24 //OBJECT_ENTRY(CLSID_VSSVersions, CVSSVersions)
27 /////////////////////////////////////////////////////////////////////////////
31 BOOL WINAPI
DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID
/*lpReserved*/)
33 if (dwReason
== DLL_PROCESS_ATTACH
)
35 _Module
.Init(ObjectMap
, hInstance
, &LIBID_SourceSafeTypeLib
);
36 DisableThreadLibraryCalls(hInstance
);
38 else if (dwReason
== DLL_PROCESS_DETACH
)
43 /////////////////////////////////////////////////////////////////////////////
44 // Used to determine whether the DLL can be unloaded by OLE
46 STDAPI
DllCanUnloadNow(void)
48 return (_Module
.GetLockCount()==0) ? S_OK
: S_FALSE
;
51 /////////////////////////////////////////////////////////////////////////////
52 // Returns a class factory to create an object of the requested type
54 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
* ppv
)
56 return _Module
.GetClassObject(rclsid
, riid
, ppv
);
59 /////////////////////////////////////////////////////////////////////////////
60 // DllRegisterServer - Adds entries to the system registry
62 STDAPI
DllRegisterServer(void)
64 // registers object, typelib and all interfaces in typelib
65 return _Module
.RegisterServer(TRUE
);
68 /////////////////////////////////////////////////////////////////////////////
69 // DllUnregisterServer - Removes entries from the system registry
71 STDAPI
DllUnregisterServer(void)
73 return _Module
.UnregisterServer(TRUE
);
76 //---------------------------------------------------------------------------
77 void Info (const char* message
)
79 ATLTRACE ("INFO: %s", message
);
82 void Notice (const char* message
)
84 ATLTRACE ("NOTICE: %s", message
);
87 void Warning (const char* message
)
89 ATLTRACE ("WARNING: %s", message
);
92 void Error (const char* message
)
94 ATLTRACE ("ERROR: %s", message
);