Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
963 B

  1. //-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: testdllx.cxx
  7. //
  8. // Contents: DLL extensions
  9. //
  10. // Classes:
  11. //
  12. // Functions: DllGetClassObject
  13. // DllCanUnloadNow
  14. //
  15. // History: 1-July-93 t-martig Created
  16. //
  17. //--------------------------------------------------------------------------
  18. #include "oletest.hxx"
  19. extern ULONG objCount, lockCount;
  20. extern COleTestClassFactory theFactory;
  21. STDAPI DllGetClassObject (REFCLSID classId, REFIID riid, VOID **ppv)
  22. {
  23. if (IsEqualGUID (classId, CLSID_COleTestClass))
  24. return theFactory.QueryInterface (riid, ppv);
  25. return E_UNEXPECTED;
  26. }
  27. STDAPI DllCanUnloadNow ()
  28. {
  29. return (objCount==0 && lockCount==0) ? S_OK : E_UNEXPECTED;
  30. }
  31. extern "C"
  32. BOOL _cdecl LibMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved)
  33. {
  34. return TRUE;
  35. }