다음을 통해 공유


IRealTimeStylus::SetDesiredPacketDescription 메서드(rtscom.h)

패킷 스트림에 포함할 속성을 요청합니다.

구문

HRESULT SetDesiredPacketDescription(
  [in] ULONG      cProperties,
  [in] const GUID *pPropertyGuids
);

매개 변수

[in] cProperties

pPropertyGuids 매개 변수로 지정된 속성의 수입니다. 유효한 값은 0에서 32 사이입니다( 포함).

[in] pPropertyGuids

패킷 스트림에 포함하도록 요청된 속성에 대한 GUID(Globally Unique Identifiers)의 배열입니다.

반환 값

메서드가 성공하면 S_OK를 반환하고, 그러지 않으면 HRESULT 오류 코드를 반환합니다.

설명

이벤트는 다음 순서로 실제 패킷 속성을 받습니다.

패킷 순서 Description
첫 번째 위치 DesiredPacketDescription 속성에 X가 지정되었는지 여부에 관계없이 속성의 x 좌표 데이터를 포함합니다.
2위 DesiredPacketDescription 속성에 Y가 지정되었는지 여부에 관계없이 속성의 y 좌표 데이터를 포함합니다.
끝 위치 패킷 상태 DesiredPacketDescription 속성에 있을 때 패킷 상태 포함합니다.
 
참고 일부 속성이 태블릿에서 지원되지 않을 수 있으므로 IRealTimeStylus::GetPacketDescriptionData 메서드 의 결과가 IRealTimeStylus::SetDesiredPacketDescription 메서드 속성과 일치하지 않을 수 있습니다.
 
지정된 패킷 속성이 태블릿 디바이스에서 지원되지 않는 경우 속성 데이터가 반환되지 않고 패킷 데이터 배열에 표시되지 않습니다. packetDescription 인수에 동일한 GUID가 여러 번 표시되는 경우 첫 번째 모양만 유지되고 다음의 모든 모양이 필터링됩니다. RealTimeStylus Class 개체를 사용하지 않도록 설정한 경우에만 IRealTimeStylus::SetDesiredPacketDescription 메서드를 호출할 수 있습니다.

cProperties의 경우 0을, pPropertyGuids경우 NULL을 전달하려고 시도하면 E_INVALIDARG 반환됩니다.

IRealTimeStylus::SetDesiredPacketDescription 메서드 메서드에 대한 호출은 IRealTimeStylus::GetDesiredPacketDescription 메서드의 반환 값에 즉시 반영됩니다.

예제

다음 C++ 예제 코드는 패킷 스트림에 포함하도록 요청된 속성을 설정합니다.

GUID guidDesiredPacketDescription[] = { GUID_PACKETPROPERTY_GUID_X, 
                                        GUID_PACKETPROPERTY_GUID_Y, 
                                        GUID_PACKETPROPERTY_GUID_NORMAL_PRESSURE,
                                        GUID_PACKETPROPERTY_GUID_TANGENT_PRESSURE };

// Number of properties in the array
ULONG ulProperties = sizeof(guidDesiredPacketDescription) / sizeof(GUID);

// Set the packet information we'd like to get
if (SUCCEEDED(g_pRealTimeStylus->SetDesiredPacketDescription(ulProperties, guidDesiredPacketDescription)))
{
    TRACE("Set the desired packet description successfully.\n");
}

GUID* pGuids = NULL;

// See if setting the properties was successful
if (SUCCEEDED(g_pRealTimeStylus->GetDesiredPacketDescription(&ulProperties, &pGuids)))
{
    TRACE("The RealTimeStylus supports %d properties.\n", ulProperties);

    // Display the values of the GUIDs in debug output
    for (int i = 0; i < ulProperties; i++)
    {
        TRACE("GUID #%d == %d\n", i, pGuids[i]);
    }
}

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows XP 태블릿 PC 버전 [데스크톱 앱만 해당]
지원되는 최소 서버 지원되는 버전 없음
대상 플랫폼 Windows
헤더 rtscom.h
DLL RTSCom.dll

추가 정보

IRealTimeStylus

IRealTimeStylus::GetDesiredPacketDescription 메서드

IRealTimeStylus::GetPacketDescriptionData 메서드

RealTimeStylus 클래스