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.

60 lines
1.4 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996
  5. //
  6. // File: cnamcf.cxx
  7. //
  8. // Contents: LDAP PrintQueue Object Class Factory Code
  9. //
  10. // CLDAPPrintQueueCF::CreateInstance
  11. //
  12. // History: 06-15-96 yihsins Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "ldap.hxx"
  16. #pragma hdrstop
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Function: CLDAPPrintQueueCF::CreateInstance
  20. //
  21. // Synopsis:
  22. //
  23. // Arguments: [pUnkOuter]
  24. // [iid]
  25. // [ppv]
  26. //
  27. // Returns: HRESULT
  28. //
  29. // Modifies:
  30. //
  31. // History: 01-30-95 krishnag Created.
  32. //----------------------------------------------------------------------------
  33. STDMETHODIMP
  34. CLDAPPrintQueueCF::CreateInstance(IUnknown * pUnkOuter, REFIID iid, LPVOID * ppv)
  35. {
  36. HRESULT hr = S_OK;
  37. //
  38. // our extension object only works with an aggregator in the provider
  39. //
  40. if (!pUnkOuter)
  41. RRETURN(E_FAIL);
  42. if (IsEqualIID(iid, IID_IUnknown)==FALSE)
  43. RRETURN(E_INVALIDARG);
  44. hr = CLDAPPrintQueue::CreatePrintQueue(
  45. pUnkOuter,
  46. iid,
  47. ppv
  48. );
  49. RRETURN(hr);
  50. }