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.
|
|
/*++
Copyright (C) 1997-2001 Microsoft Corporation
Module Name:
LOCATOR.H
Abstract:
Declares the CLocator class.
History:
a-davj 04-Mar-97 Created.
--*/
#ifndef _locator_H_
#define _locator_H_
typedef void ** PPVOID;
//***************************************************************************
//
// CLASS NAME:
//
// CLocator
//
// DESCRIPTION:
//
// Implements the IWbemLocator interface. This class is what the client gets
// when it initially hooks up to the Wbemprox.dll. The ConnectServer function
// is what get the communication between client and server started.
//
//***************************************************************************
class CLocator : public IWbemLocator { protected: long m_cRef; //Object reference count
public: CLocator(); ~CLocator(void);
BOOL Init(void);
//Non-delegating object IUnknown
STDMETHODIMP QueryInterface(REFIID, PPVOID); STDMETHODIMP_(ULONG) AddRef(void) { InterlockedIncrement(&m_cRef); return m_cRef; } STDMETHODIMP_(ULONG) Release(void) { long lTemp = InterlockedDecrement(&m_cRef); if (0L!=lTemp) return lTemp; delete this; return 0; } /* iWbemLocator methods */ STDMETHOD(ConnectServer)(THIS_ const BSTR NetworkResource, const BSTR User, const BSTR Password, const BSTR lLocaleId, long lFlags, const BSTR Authority, IWbemContext __RPC_FAR *pCtx, IWbemServices FAR* FAR* ppNamespace);
};
#endif
|