本文整理汇总了C++中IFCALLRET函数的典型用法代码示例。如果您正苦于以下问题:C++ IFCALLRET函数的具体用法?C++ IFCALLRET怎么用?C++ IFCALLRET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IFCALLRET函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: shadow_client_rdpgfx_new_surface
static INLINE BOOL shadow_client_rdpgfx_new_surface(rdpShadowClient *client)
{
UINT error = CHANNEL_RC_OK;
RDPGFX_CREATE_SURFACE_PDU createSurface;
RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU surfaceToOutput;
RdpgfxServerContext* context = client->rdpgfx;
rdpSettings* settings = ((rdpContext*) client)->settings;
createSurface.width = settings->DesktopWidth;
createSurface.height = settings->DesktopHeight;
createSurface.pixelFormat = PIXEL_FORMAT_XRGB_8888;
createSurface.surfaceId = 0;
surfaceToOutput.outputOriginX = 0;
surfaceToOutput.outputOriginY = 0;
surfaceToOutput.surfaceId = 0;
surfaceToOutput.reserved = 0;
IFCALLRET(context->CreateSurface, error, context, &createSurface);
if (error)
{
WLog_ERR(TAG, "CreateSurface failed with error %lu", error);
return FALSE;
}
IFCALLRET(context->MapSurfaceToOutput, error, context, &surfaceToOutput);
if (error)
{
WLog_ERR(TAG, "MapSurfaceToOutput failed with error %lu", error);
return FALSE;
}
return TRUE;
}
示例2: update_recv_window_info_order
BOOL update_recv_window_info_order(rdpUpdate* update, wStream* s, WINDOW_ORDER_INFO* orderInfo)
{
rdpContext* context = update->context;
rdpWindowUpdate* window = update->window;
BOOL result = TRUE;
if (Stream_GetRemainingLength(s) < 4)
return FALSE;
Stream_Read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */
if (orderInfo->fieldFlags & WINDOW_ORDER_ICON)
{
if (!update_read_window_icon_order(s, orderInfo, &window->window_icon))
return FALSE;
WLog_Print(update->log, WLOG_DEBUG, "WindowIcon");
IFCALLRET(window->WindowIcon, result, context, orderInfo, &window->window_icon);
}
else if (orderInfo->fieldFlags & WINDOW_ORDER_CACHED_ICON)
{
if (!update_read_window_cached_icon_order(s, orderInfo, &window->window_cached_icon))
return FALSE;
WLog_Print(update->log, WLOG_DEBUG, "WindowCachedIcon");
IFCALLRET(window->WindowCachedIcon, result, context, orderInfo, &window->window_cached_icon);
}
else if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED)
{
update_read_window_delete_order(s, orderInfo);
WLog_Print(update->log, WLOG_DEBUG, "WindowDelete");
IFCALLRET(window->WindowDelete, result, context, orderInfo);
}
else
{
if (!update_read_window_state_order(s, orderInfo, &window->window_state))
return FALSE;
if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW)
{
WLog_Print(update->log, WLOG_DEBUG, "WindowCreate");
IFCALLRET(window->WindowCreate, result, context, orderInfo, &window->window_state);
}
else
{
WLog_Print(update->log, WLOG_DEBUG, "WindowUpdate");
IFCALLRET(window->WindowUpdate, result, context, orderInfo, &window->window_state);
}
}
return result;
}
示例3: rdpgfx_recv_qoe_frame_acknowledge_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_qoe_frame_acknowledge_pdu(RdpgfxServerContext* context,
wStream* s)
{
RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU pdu;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 12)
{
WLog_ERR(TAG, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
Stream_Read_UINT32(s, pdu.timestamp); /* timestamp (4 bytes) */
Stream_Read_UINT16(s, pdu.timeDiffSE); /* timeDiffSE (2 bytes) */
Stream_Read_UINT16(s, pdu.timeDiffEDR); /* timeDiffEDR (2 bytes) */
if (context)
{
IFCALLRET(context->QoeFrameAcknowledge, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %u",
error);
}
return error;
}
示例4: rdpgfx_recv_frame_acknowledge_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_frame_acknowledge_pdu(RdpgfxServerContext* context,
wStream* s)
{
RDPGFX_FRAME_ACKNOWLEDGE_PDU pdu;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 12)
{
WLog_ERR(TAG, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, pdu.queueDepth); /* queueDepth (4 bytes) */
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
/* totalFramesDecoded (4 bytes) */
Stream_Read_UINT32(s, pdu.totalFramesDecoded);
if (context)
{
IFCALLRET(context->FrameAcknowledge, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->FrameAcknowledge failed with error %u",
error);
}
return error;
}
示例5: autodetect_send_bandwidth_measure_results
static BOOL autodetect_send_bandwidth_measure_results(rdpRdp* rdp, UINT16 responseType, UINT16 sequenceNumber)
{
BOOL success = TRUE;
wStream* s;
UINT32 timeDelta;
/* Compute the total time */
timeDelta = GetTickCountPrecise() - rdp->autodetect->bandwidthMeasureStartTime;
/* Send the result PDU to the server */
s = rdp_message_channel_pdu_init(rdp);
if (!s)
return FALSE;
WLog_VRB(AUTODETECT_TAG, "sending Bandwidth Measure Results PDU -> timeDelta=%u, byteCount=%u", timeDelta, rdp->autodetect->bandwidthMeasureByteCount);
Stream_Write_UINT8(s, 0x0E); /* headerLength (1 byte) */
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_RESPONSE); /* headerTypeId (1 byte) */
Stream_Write_UINT16(s, sequenceNumber); /* sequenceNumber (2 bytes) */
Stream_Write_UINT16(s, responseType); /* responseType (1 byte) */
Stream_Write_UINT32(s, timeDelta); /* timeDelta (4 bytes) */
Stream_Write_UINT32(s, rdp->autodetect->bandwidthMeasureByteCount); /* byteCount (4 bytes) */
IFCALLRET(rdp->autodetect->ClientBandwidthMeasureResult, success,
rdp->context, rdp->autodetect);
if (!success)
return FALSE;
return rdp_send_message_channel_pdu(rdp, s, SEC_AUTODETECT_RSP);
}
示例6: cliprdr_server_receive_filecontents_request
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT cliprdr_server_receive_filecontents_request(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FILE_CONTENTS_REQUEST request;
UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFileContentsRequest");
request.msgType = CB_FILECONTENTS_REQUEST;
request.msgFlags = header->msgFlags;
request.dataLen = header->dataLen;
if (Stream_GetRemainingLength(s) < 28)
{
WLog_ERR(TAG, "not enought data in stream!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, request.streamId); /* streamId (4 bytes) */
Stream_Read_UINT32(s, request.listIndex); /* listIndex (4 bytes) */
Stream_Read_UINT32(s, request.dwFlags); /* dwFlags (4 bytes) */
Stream_Read_UINT32(s, request.nPositionLow); /* nPositionLow (4 bytes) */
Stream_Read_UINT32(s, request.nPositionHigh); /* nPositionHigh (4 bytes) */
Stream_Read_UINT32(s, request.cbRequested); /* cbRequested (4 bytes) */
Stream_Read_UINT32(s, request.clipDataId); /* clipDataId (4 bytes) */
IFCALLRET(context->ClientFileContentsRequest, error, context, &request);
if (error)
WLog_ERR(TAG, "ClientFileContentsRequest failed with error %lu!", error);
return error;
}
示例7: cliprdr_server_receive_format_data_request
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT cliprdr_server_receive_format_data_request(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest;
UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFormatDataRequest");
formatDataRequest.msgType = CB_FORMAT_DATA_REQUEST;
formatDataRequest.msgFlags = header->msgFlags;
formatDataRequest.dataLen = header->dataLen;
if (Stream_GetRemainingLength(s) < 4)
{
WLog_ERR(TAG, "not enought data in stream!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, formatDataRequest.requestedFormatId); /* requestedFormatId (4 bytes) */
IFCALLRET(context->ClientFormatDataRequest, error, context, &formatDataRequest);
if (error)
WLog_ERR(TAG, "ClientFormatDataRequest failed with error %lu!", error);
return error;
}
示例8: rdpgfx_recv_map_surface_to_window_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
wStream* s)
{
RDPGFX_MAP_SURFACE_TO_WINDOW_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 18)
{
WLog_Print(gfx->log, WLOG_ERROR, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
Stream_Read_UINT64(s, pdu.windowId); /* windowId (8 bytes) */
Stream_Read_UINT32(s, pdu.mappedWidth); /* mappedWidth (4 bytes) */
Stream_Read_UINT32(s, pdu.mappedHeight); /* mappedHeight (4 bytes) */
WLog_Print(gfx->log, WLOG_DEBUG,
"RecvMapSurfaceToWindowPdu: surfaceId: %"PRIu16" windowId: 0x%016"PRIX64" mappedWidth: %"PRIu32" mappedHeight: %"PRIu32"",
pdu.surfaceId, pdu.windowId, pdu.mappedWidth, pdu.mappedHeight);
if (context && context->MapSurfaceToWindow)
{
IFCALLRET(context->MapSurfaceToWindow, error, context, &pdu);
if (error)
WLog_Print(gfx->log, WLOG_ERROR, "context->MapSurfaceToWindow failed with error %"PRIu32"", error);
}
return error;
}
示例9: rdpgfx_recv_map_surface_to_output_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK*
callback, wStream* s)
{
RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 12)
{
WLog_Print(gfx->log, WLOG_ERROR, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
Stream_Read_UINT16(s, pdu.reserved); /* reserved (2 bytes) */
Stream_Read_UINT32(s, pdu.outputOriginX); /* outputOriginX (4 bytes) */
Stream_Read_UINT32(s, pdu.outputOriginY); /* outputOriginY (4 bytes) */
WLog_Print(gfx->log, WLOG_DEBUG,
"RecvMapSurfaceToOutputPdu: surfaceId: %"PRIu16" outputOriginX: %"PRIu32" outputOriginY: %"PRIu32"",
pdu.surfaceId, pdu.outputOriginX, pdu.outputOriginY);
if (context)
{
IFCALLRET(context->MapSurfaceToOutput, error, context, &pdu);
if (error)
WLog_Print(gfx->log, WLOG_ERROR, "context->MapSurfaceToOutput failed with error %"PRIu32"", error);
}
return error;
}
示例10: gdi_SurfaceToSurface
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT gdi_SurfaceToSurface(RdpgfxClientContext* context,
const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface)
{
UINT status = CHANNEL_RC_OK;
UINT16 index;
BOOL sameSurface;
UINT32 nWidth, nHeight;
const RECTANGLE_16* rectSrc;
RDPGFX_POINT16* destPt;
RECTANGLE_16 invalidRect;
gdiGfxSurface* surfaceSrc;
gdiGfxSurface* surfaceDst;
rdpGdi* gdi = (rdpGdi*) context->custom;
rectSrc = &(surfaceToSurface->rectSrc);
surfaceSrc = (gdiGfxSurface*) context->GetSurfaceData(context,
surfaceToSurface->surfaceIdSrc);
sameSurface = (surfaceToSurface->surfaceIdSrc ==
surfaceToSurface->surfaceIdDest) ? TRUE : FALSE;
if (!sameSurface)
surfaceDst = (gdiGfxSurface*) context->GetSurfaceData(context,
surfaceToSurface->surfaceIdDest);
else
surfaceDst = surfaceSrc;
if (!surfaceSrc || !surfaceDst)
return ERROR_INTERNAL_ERROR;
nWidth = rectSrc->right - rectSrc->left;
nHeight = rectSrc->bottom - rectSrc->top;
for (index = 0; index < surfaceToSurface->destPtsCount; index++)
{
destPt = &surfaceToSurface->destPts[index];
if (!freerdp_image_copy(surfaceDst->data, surfaceDst->format,
surfaceDst->scanline,
destPt->x, destPt->y, nWidth, nHeight,
surfaceSrc->data, surfaceSrc->format,
surfaceSrc->scanline,
rectSrc->left, rectSrc->top, NULL, FREERDP_FLIP_NONE))
return ERROR_INTERNAL_ERROR;
invalidRect.left = destPt->x;
invalidRect.top = destPt->y;
invalidRect.right = destPt->x + rectSrc->right;
invalidRect.bottom = destPt->y + rectSrc->bottom;
region16_union_rect(&surfaceDst->invalidRegion, &surfaceDst->invalidRegion,
&invalidRect);
IFCALL(context->UpdateSurfaceArea, context, surfaceDst->surfaceId, 1, &invalidRect);
}
if (!gdi->inGfxFrame)
{
status = CHANNEL_RC_NOT_INITIALIZED;
IFCALLRET(context->UpdateSurfaces, status, context);
}
return status;
}
示例11: rdpgfx_recv_delete_surface_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
wStream* s)
{
RDPGFX_DELETE_SURFACE_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
WLog_DBG(TAG, "RecvDeleteSurfacePdu: surfaceId: %d", pdu.surfaceId);
if (context)
{
IFCALLRET(context->DeleteSurface, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error);
}
return error;
}
示例12: read_cs_ready_message
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT read_cs_ready_message(RdpeiServerContext *context, wStream *s)
{
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 10)
{
WLog_ERR(TAG, "Not enought data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, context->protocolFlags);
Stream_Read_UINT32(s, context->clientVersion);
Stream_Read_UINT16(s, context->maxTouchPoints);
switch (context->clientVersion)
{
case RDPINPUT_PROTOCOL_V10:
case RDPINPUT_PROTOCOL_V101:
break;
default:
WLog_ERR(TAG, "unhandled RPDEI protocol version 0x%x", context->clientVersion);
break;
}
IFCALLRET(context->onClientReady, error, context);
if (error)
WLog_ERR(TAG, "context->onClientReady failed with error %lu", error);
return error;
}
示例13: rdpgfx_recv_start_frame_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
RDPGFX_START_FRAME_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 8)
{
WLog_ERR(TAG, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, pdu.timestamp); /* timestamp (4 bytes) */
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
WLog_DBG(TAG, "RecvStartFramePdu: frameId: %d timestamp: 0x%04X",
pdu.frameId, pdu.timestamp);
if (context)
{
IFCALLRET(context->StartFrame, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->StartFrame failed with error %lu", error);
}
gfx->UnacknowledgedFrames++;
return error;
}
示例14: rdpgfx_recv_evict_cache_entry_pdu
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
wStream* s)
{
RDPGFX_EVICT_CACHE_ENTRY_PDU pdu;
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
UINT error = CHANNEL_RC_OK;
if (Stream_GetRemainingLength(s) < 2)
{
WLog_Print(gfx->log, WLOG_ERROR, "not enough data!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT16(s, pdu.cacheSlot); /* cacheSlot (2 bytes) */
WLog_Print(gfx->log, WLOG_DEBUG, "RecvEvictCacheEntryPdu: cacheSlot: %"PRIu16"", pdu.cacheSlot);
if (context)
{
IFCALLRET(context->EvictCacheEntry, error, context, &pdu);
if (error)
WLog_Print(gfx->log, WLOG_ERROR, "context->EvictCacheEntry failed with error %"PRIu32"", error);
}
return error;
}
示例15: cliprdr_server_receive_unlock_clipdata
/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT cliprdr_server_receive_unlock_clipdata(CliprdrServerContext* context, wStream* s, CLIPRDR_HEADER* header)
{
CLIPRDR_UNLOCK_CLIPBOARD_DATA unlockClipboardData;
UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientUnlockClipData");
unlockClipboardData.msgType = CB_UNLOCK_CLIPDATA;
unlockClipboardData.msgFlags = header->msgFlags;
unlockClipboardData.dataLen = header->dataLen;
if (Stream_GetRemainingLength(s) < 4)
{
WLog_ERR(TAG, "not enought data in stream!");
return ERROR_INVALID_DATA;
}
Stream_Read_UINT32(s, unlockClipboardData.clipDataId); /* clipDataId (4 bytes) */
IFCALLRET(context->ClientUnlockClipboardData, error, context, &unlockClipboardData);
if (error)
WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %lu!", error);
return error;
}