get_ui_context() upgraded
This commit is contained in:
@@ -105,9 +105,7 @@ namespace eap
|
||||
/// \name User Interaction
|
||||
/// @{
|
||||
|
||||
virtual void get_ui_context(
|
||||
_Out_ BYTE **ppUIContextData,
|
||||
_Out_ DWORD *pdwUIContextDataSize);
|
||||
virtual void get_ui_context(_Out_ sanitizing_blob &context_data);
|
||||
|
||||
virtual EapPeerMethodResponseAction set_ui_context(
|
||||
_In_count_(dwUIContextDataSize) const BYTE *pUIContextData,
|
||||
|
@@ -209,19 +209,23 @@ void eap::method_eaphost::get_result(
|
||||
}
|
||||
|
||||
|
||||
void eap::method_eaphost::get_ui_context(
|
||||
_Out_ BYTE **ppUIContextData,
|
||||
_Out_ DWORD *pdwUIContextDataSize)
|
||||
void eap::method_eaphost::get_ui_context(_Out_ sanitizing_blob &context_data)
|
||||
{
|
||||
// Get EapHost peer UI context data.
|
||||
DWORD dwUIContextDataSize;
|
||||
LPBYTE pUIContextData;
|
||||
eap_error_runtime error;
|
||||
DWORD dwResult = EapHostPeerGetUIContext(
|
||||
m_session_id,
|
||||
pdwUIContextDataSize,
|
||||
ppUIContextData,
|
||||
&dwUIContextDataSize,
|
||||
&pUIContextData,
|
||||
&error._Myptr);
|
||||
if (dwResult == ERROR_SUCCESS) {
|
||||
// UI context data successfuly returned.
|
||||
context_data.assign(pUIContextData, pUIContextData + dwUIContextDataSize);
|
||||
|
||||
// TODO: Test if EapHostPeerGetUIContext() requires us to free the buffer.
|
||||
//EapHostPeerFreeMemory(pUIContextData);
|
||||
} else if (error)
|
||||
throw eap_runtime_error(*error , __FUNCTION__ " EapHostPeerGetUIContext failed.");
|
||||
else
|
||||
|
Reference in New Issue
Block a user