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.

68 lines
1.4 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995
  5. //
  6. // File: cprovcf.cxx
  7. //
  8. // Contents: NetWare 3.12 Provider Object Class Factory Code
  9. //
  10. // CNWCOMPATProviderCF::CreateInstance
  11. //
  12. // History: 10-Jan-96 t-ptam Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "NWCOMPAT.hxx"
  16. #pragma hdrstop
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Function: CNWCOMPATProviderCF::CreateInstance
  20. //
  21. // Synopsis:
  22. //
  23. // Arguments: [pUnkOuter]
  24. // [iid]
  25. // [ppv]
  26. //
  27. // Returns: HRESULT
  28. //
  29. // Modifies:
  30. //
  31. // History: 10-Jan-96 t-ptam Created.
  32. //----------------------------------------------------------------------------
  33. STDMETHODIMP
  34. CNWCOMPATProviderCF::CreateInstance(IUnknown * pUnkOuter, REFIID iid, LPVOID * ppv)
  35. {
  36. HRESULT hr;
  37. CNWCOMPATProvider * pProvider;
  38. if (pUnkOuter)
  39. RRETURN(E_FAIL);
  40. hr = CNWCOMPATProvider::Create(&pProvider);
  41. if (FAILED(hr)) {
  42. RRETURN (hr);
  43. }
  44. if (pProvider)
  45. {
  46. hr = pProvider->QueryInterface(iid, ppv);
  47. pProvider->Release();
  48. }
  49. else
  50. {
  51. *ppv = NULL;
  52. RRETURN(E_OUTOFMEMORY);
  53. }
  54. RRETURN(hr);
  55. }