일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- "명탐정 코난"
- VoIP
- 한국의 기획자들
- 이지형
- HSDPA
- 라디오
- Java
- 자바
- 김장훈
- 페이스북
- CDMA
- EV-DO Rev. B
- 차트쇼쇼쇼
- 모던음악만만세
- 김장훈의who
- Wibro
- brew
- 민동현
- 유희열의라디오천국
- itmusic
- SWT
- 그녀가말했다
- 사요
- 위피
- 퀄컴
- 민동현의토요명화
- ETF
- USIM
- 러시아
- 공정위
- Today
- Total
zyint's blog
::IsUISupported 본문
ISpObjectToken::IsUISupported
determines if the user interface (UI) associated with the object is supported.
Ultimately, ISpObjectToken::IsUISupported is similar to creating an ISpTokenUI object and calling ISpTokenUI::ISpIsUISupported.
[local] HRESULT IsUISupported(
LPCWSTR *pszTypeOfUI,
void *pvExtraData,
ULONG cbExtraData,
IUnknown *punkObject,
BOOL *pfSupported
);
파라미터
반환 값
Value | Description |
---|---|
S_OK | Function completed successfully. |
S_FALSE | The UI is supported but not with the current run-time environment or parameters. |
E_INVALIDARG | One of the parameters is invalid or bad. |
SPERR_UNINITIALIZED | Either the data key or token delegate interface is not initialized. |
SPERR_TOKEN_DELETED | Key has been deleted. |
FAILED(hr) | Appropriate error message. |
주의
pvExtraData and punkObject Parameters: When asking an ISpObjectToken to display a particular piece of UI, the UI object may require extra functionality that only it understands. Common implementation practice for accessing this functionality is to QueryInterface off of a known IUnknown interface. The caller of ISpTokenUI::IsUISupported can set the punkObject parameter with the necessary IUnknown interface. For example, to display a Speech Recognition Training UI (see SPDUI_UserTraining) requires a specific SR engine.
예제
The following code snippet illustrates the use of ISpObjectToken::IsUISupported using SPDUI_EngineProperties.
// Declare local identifiers:
HRESULT hr = S_OK;
CComPtr<ISpObjectToken> cpObjectToken;
CComPtr<ISpVoice> cpVoice;
BOOL fSupported;
HWND hwndParent;
// Get the default text-to-speech engine object token.
hr = SpGetDefaultTokenFromCategoryId(SPCAT_VOICES, &cpObjectToken;);
if (SUCCEEDED(hr))
{
// Create the engine object based on the object token.
hr = SpCreateObjectFromToken(cpObjectToken, &cpVoice;);
}
if (SUCCEEDED(hr))
{
// Check if the default engine object has UI for Properties.
hr = cpObjectToken->IsUISupported(SPDUI_EngineProperties, NULL, NULL, cpVoice, &fSupported;);
}
if (SUCCEEDED(hr))
{
// If default engine object has UI for
// Engine Properties, display UI--
if (fSupported == TRUE)
{
hr = cpObjectToken->DisplayUI(hwndParent, L"My App's Caption", SPDUI_EngineProperties, NULL, NULL, cpVoice);
}
}
if (SUCCEEDED(hr))
{
// Do stuff here.
}
참고자료
http://msdn.microsoft.com/en-us/library/ms718255(VS.85).aspx
이 글은 스프링노트에서 작성되었습니다.