{\r
UNREFERENCED_PARAMETER(rclsid);\r
\r
- if (riid != IID_IClassFactory) {\r
+ if (riid != IID_INDProvider) {\r
*ppv = NULL;\r
return E_NOINTERFACE;\r
}\r
\r
- *ppv = new CNDClassFactory();\r
- if (*ppv == NULL) {\r
- return E_OUTOFMEMORY;\r
- }\r
-\r
- return S_OK;\r
+ return CNDProvider::CreateInstance(ppv);\r
}\r
\r
int WSPStartup(WORD wVersionRequested, LPWSPDATA lpWSPData,\r
/*\r
* Copyright (c) 2009-2010 Intel Corporation. All rights reserved.\r
+ * Copyright (c) 2010 Microsoft Corporation. All rights reserved.\r
*\r
* This software is available to you under the OpenIB.org BSD license\r
* below:\r
\r
return CNDAdapter::CreateInstance(this, adapterId, ppAdapter);\r
}\r
-\r
-\r
-//-------------------------\r
-// CNDClassFactory routines\r
-//-------------------------\r
-\r
-STDMETHODIMP CNDClassFactory::\r
-QueryInterface(REFIID riid, LPVOID FAR* ppvObj)\r
-{\r
- if (riid != IID_IUnknown && riid != IID_IClassFactory) {\r
- *ppvObj = NULL;\r
- return E_NOINTERFACE;\r
- }\r
-\r
- *ppvObj = this;\r
- AddRef();\r
- return ND_SUCCESS;\r
-}\r
-\r
-STDMETHODIMP_(ULONG) CNDClassFactory::\r
-AddRef(void)\r
-{\r
- return CNDBase::AddRef();\r
-}\r
-\r
-STDMETHODIMP_(ULONG) CNDClassFactory::\r
-Release(void)\r
-{\r
- return CNDBase::Release();\r
-}\r
-\r
-STDMETHODIMP CNDClassFactory::\r
-CreateInstance(IUnknown* pUnkOuter, REFIID riid, void** ppObject)\r
-{\r
- if (pUnkOuter != NULL) {\r
- return CLASS_E_NOAGGREGATION;\r
- }\r
-\r
- if (riid != IID_INDProvider) {\r
- *ppObject = NULL;\r
- return E_NOINTERFACE;\r
- }\r
-\r
- return CNDProvider::CreateInstance((CNDProvider **) ppObject);\r
-}\r
-\r
-STDMETHODIMP CNDClassFactory::\r
-LockServer(BOOL fLock)\r
-{\r
- UNREFERENCED_PARAMETER(fLock);\r
- return S_OK;\r
-}\r
/*\r
* Copyright (c) 2009-2010 Intel Corporation. All rights reserved.\r
+ * Copyright (c) 2010 Microsoft Corporation. All rights reserved.\r
*\r
* This software is available to you under the OpenIB.org BSD license\r
* below:\r
\r
void Delete() {delete this;}\r
static STDMETHODIMP\r
- CreateInstance(CNDProvider **ppProvider)\r
+ CreateInstance(VOID** ppProvider)\r
{\r
HRESULT hr;\r
CNDProvider *provider;\r
STDMETHODIMP Init();\r
};\r
\r
-\r
-class CNDClassFactory : public IClassFactory, public CNDBase\r
-{\r
-public:\r
- // IUnknown methods\r
- STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);\r
- STDMETHODIMP_(ULONG) AddRef();\r
- STDMETHODIMP_(ULONG) Release();\r
-\r
- // IClassFactory methods\r
- STDMETHODIMP CreateInstance(IUnknown* pUnkOuter, REFIID riid, void** ppObject);\r
- STDMETHODIMP LockServer(BOOL fLock);\r
-\r
- CNDClassFactory() {};\r
- ~CNDClassFactory() {};\r
- void Delete() {delete this;}\r
-};\r
-\r
#endif // _ND_PROVIDER_H_
\ No newline at end of file