다음을 통해 공유


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

패킷 스트림에 포함하도록 요청된 속성 목록을 검색합니다.

구문

HRESULT GetDesiredPacketDescription(
  [in, out] ULONG *pcProperties,
  [out]     GUID  **ppPropertyGuids
);

매개 변수

[in, out] pcProperties

ppPropertyGUIDS 버퍼의 크기(바이트)입니다.

[out] ppPropertyGuids

패킷 데이터에 있는 X, Y 및 NormalPressure와 같은 속성을 지정하는 GUID 목록에 대한 포인터입니다. 미리 정의된 속성 목록은 PacketPropertyGuids 상수를 참조하세요.

반환 값

반환 값에 대한 설명은 RealTimeStylus 클래스 및 인터페이스를 참조하세요.

설명

이 메서드를 사용하여 IRealTimeStylus::SetDesiredPacketDescription 메서드를 호출하여 IRealTimeStylus 개체가 구독한 패킷 속성의 배열을 가져옵니다. 패킷 속성은 GUID(Globally Unique Identifiers)의 배열로 표시됩니다. 메트릭을 검색할 수 있는 속성의 전체 목록은 PacketPropertyGuids 상수를 참조하세요.

기본값은 X, Y 및 정상 압력 GUID를 포함하는 GUID 배열입니다.

IRealTimeStylus::GetDesiredPacketDescription 메서드CoTaskMemAlloc를 사용하여 GUID에 대한 공간을 할당합니다. 배열이 더 이상 필요하지 않은 경우 호출자는 CoTaskMemFree 를 호출해야 합니다.

자식 IRealTimeStylus 개체(연계 구성)에서 호출되고 연결된 경우 이 메서드는 연결된 경우 부모의 패킷 설명을 반환합니다. 그렇지 않으면 이 메서드는 IRealTimeStylus::SetDesiredPacketDescription 메서드에 대한 이전 호출에서 설정된 기본값(X, Y, 압력) 또는 모든 속성을 반환합니다.

다음 목록에서는 IRealTimeStylus 개체가 패킷 속성 GUID를 정렬하는 방법을 설명합니다.

  • 기본적으로 IRealTimeStylus::GetDesiredPacketDescription 메서드 는 GUID_X, GUID_Y 및 GUID_NORMAL_PRESSURE 반환합니다.
  • X 및 Y GUID는 IRealTimeStylus::GetDesiredPacketDescription 메서드 메서드 에 의해 배열의 처음 두 위치에 항상 반환됩니다. IRealTimeStylus::SetDesiredPacketDescription 메서드 에 대한 이전 호출에서 지정되었는지 여부입니다.
  • IRealTimeStylus::SetDesiredPacketDescription 메서드 호출에서 GUID_PACKET_STATUS 지정한 경우 GUID_PACKET_STATUS 항상 IRealTimeStylus::GetDesiredPacketDescription 메서드 메서드에 의해 배열의 마지막 위치에 반환됩니다.
  • IRealTimeStylus::SetDesiredPacketDescription 메서드 호출에서 GUID가 두 번 이상 지정된 경우 각 GUID는 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::SetDesiredPacketDescription 메서드

RealTimeStylus 클래스