diff options
Diffstat (limited to 'private/oleutest/perform/cairole/dll/testdllx.cxx')
-rw-r--r-- | private/oleutest/perform/cairole/dll/testdllx.cxx | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/private/oleutest/perform/cairole/dll/testdllx.cxx b/private/oleutest/perform/cairole/dll/testdllx.cxx new file mode 100644 index 000000000..d0c60ab75 --- /dev/null +++ b/private/oleutest/perform/cairole/dll/testdllx.cxx @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1993. +// +// File: testdllx.cxx +// +// Contents: DLL extensions +// +// Classes: +// +// Functions: DllGetClassObject +// DllCanUnloadNow +// +// History: 1-July-93 t-martig Created +// +//-------------------------------------------------------------------------- + + +#include "oletest.hxx" + + +extern ULONG objCount, lockCount; +extern COleTestClassFactory theFactory; + + +STDAPI DllGetClassObject (REFCLSID classId, REFIID riid, VOID **ppv) +{ + if (IsEqualGUID (classId, CLSID_COleTestClass)) + return theFactory.QueryInterface (riid, ppv); + return E_UNEXPECTED; +} + + + +STDAPI DllCanUnloadNow () +{ + return (objCount==0 && lockCount==0) ? S_OK : E_UNEXPECTED; +} + + +extern "C" +BOOL _cdecl LibMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) +{ + return TRUE; +} + + + |