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.

50 lines
963 B

  1. // PropSht.cpp : Implementation of CWizChainApp and DLL registration.
  2. #include "stdafx.h"
  3. #include "WizChain.h"
  4. #include "PropSht.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. //
  7. // IUnknown
  8. HRESULT CAddPropertySheet::QueryInterface( REFIID riid, void** ppvObject )
  9. {
  10. HRESULT hr = S_OK;
  11. if( (riid == IID_IUnknown) || (riid == IID_IAddPropertySheet) )
  12. {
  13. AddRef();
  14. *ppvObject = (void*)this;
  15. }
  16. else
  17. {
  18. hr = E_NOINTERFACE;
  19. }
  20. return hr;
  21. }
  22. ULONG CAddPropertySheet::AddRef( )
  23. {
  24. InterlockedIncrement( (PLONG)&m_refs );
  25. return m_refs;
  26. }
  27. ULONG CAddPropertySheet::Release( )
  28. {
  29. InterlockedDecrement( (PLONG)&m_refs );
  30. ULONG l = m_refs;
  31. if( m_refs == 0 )
  32. {
  33. delete this;
  34. }
  35. return l;
  36. }
  37. STDMETHODIMP CAddPropertySheet::AddPage( PROPSHEETPAGEW *psp )
  38. {
  39. return m_pCW->Add( psp );
  40. }