// Timers.cpp : Implementation of DLL Exports. #include #include "Stopwatch.h" #include "timers_i.c" //////////////////////////////////////////////////////////////////// // DLL Entry Point extern "C" BOOL __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { return TRUE; // All is well } //////////////////////////////////////////////////////////////////// // Returns a component object back to the caller extern "C" HRESULT __stdcall DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID* ppv) { HRESULT hr; if (rclsid == CLSID_Stopwatch) { CStopwatch* stopwatch = new CStopwatch; hr = stopwatch->QueryInterface(riid, ppv); } else hr = CLASS_E_CLASSNOTAVAILABLE; return hr; }