EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

PSGetPropertySystem function

Gets an instance of the subsystem object that implements IPropertySystem.

Syntax


PSSTDAPI PSGetPropertySystem(
  _In_   REFIID riid,
  _Out_  void **ppv
);

Parameters

riid [in]

Type: REFIID

Reference to the IID of the requested interface.

ppv [out]

Type: void**

When this function returns, contains the interface pointer requested in riid. This is typically IPropertySystem.

Return value

Type: PSSTDAPI

Returns one of the following values.

Return codeDescription
S_OK

The interface was obtained.

E_INVALIDARG

The ppv parameter is NULL.

 

Remarks

You must initialize Component Object Model (COM) with CoInitialize or OleInitialize prior to calling PSGetPropertySystem. COM must remain initialized for the lifetime of this object. The property system object aggregates the free-threaded marshaller and is thread-safe.

We recommend that you use the IID_PPV_ARGS macro defined in Objbase.h to package the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, which eliminates the possibility of a coding error.

Examples

The following example, to be included as part of a larger program, demonstrates how to use PSGetPropertySystem.


IPropertySystem *pSystem;

HRESULT hr = PSGetPropertySystem(IID_PPV_ARGS(&pSystem));

if (SUCCEEDED(hr))
{
    // pSystem is now valid.
 
    pSystem->Release();
}

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Propsys.h

Library

Propsys.lib

DLL

Propsys.dll (version 6.0 or later)

 

 

커뮤니티 추가 항목

추가
표시:
© 2014 Microsoft