本文整理汇总了C++中CHECK_HANDLE函数的典型用法代码示例。如果您正苦于以下问题:C++ CHECK_HANDLE函数的具体用法?C++ CHECK_HANDLE怎么用?C++ CHECK_HANDLE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CHECK_HANDLE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: alloc_cb
static void alloc_cb(uv_handle_t* handle,
size_t suggested_size,
uv_buf_t* buf) {
static char slab[65536];
CHECK_HANDLE(handle);
ASSERT(suggested_size <= sizeof(slab));
buf->base = slab;
buf->len = sizeof(slab);
}
示例2: set_offset
static int set_offset(int handle, off_t newoffset ){
CHECK_HANDLE(handle);
off_t oldoffset = s_handle_slots[handle].offset;
ZRT_LOG_PARAM(L_INFO, P_INT, handle);
ZRT_LOG_PARAM(L_INFO, P_LONGINT, oldoffset);
ZRT_LOG_PARAM(L_INFO, P_LONGINT, newoffset);
s_handle_slots[handle].offset = newoffset;
return 0;
}
示例3: sv_send_cb
static void sv_send_cb(uv_udp_send_t* req, int status) {
ASSERT(req != NULL);
ASSERT(status == 0);
CHECK_HANDLE(req->handle);
sv_send_cb_called++;
uv_close((uv_handle_t*) req->handle, close_cb);
}
示例4: scytale_reader_open
int scytale_reader_open(RedCryptoReaderHandle * handle, char const * path, char const * derivator) {
SCOPED_TRACE;
CHECK_HANDLE(handle);
handle->error_ctx.set_error(Error(NO_ERROR));
CHECK_NOTHROW(
handle->in_crypto_transport.open(path, {derivator, strlen(derivator)}),
ERR_TRANSPORT_OPEN_FAILED);
return 0;
}
示例5: pcmcia_access_configuration_register
int pcmcia_access_configuration_register(client_handle_t handle,
conf_reg_t *reg)
{
struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
return pccard_access_configuration_register(s, handle->Function, reg);
}
示例6: send_cb
static void send_cb(uv_udp_send_t* req, int status) {
CHECK_REQ(req);
CHECK_HANDLE(req->handle);
ASSERT(status == UV_EMSGSIZE);
uv_close((uv_handle_t*)req->handle, close_cb);
send_cb_called++;
}
示例7: CHECK_HANDLE
void DDSChatModule::startupPublisher(void)
{
// Create publisher and set user data as "<name>,<id>"
pPub = pDomainParticipant->create_publisher(DDS_PUBLISHER_QOS_DEFAULT,NULL,
DDS_STATUS_MASK_NONE);
CHECK_HANDLE(pPub,"Cannot create publisher\n");
printf("Created publisher\n");
// Create data writers for respective topics
for(int iTopic=0; iTopic<(MAX_TOPICS-1); iTopic++)
{
pWriter[iTopic] = pPub->create_datawriter(pTopic[iTopic],DDS_DATAWRITER_QOS_DEFAULT,
NULL,DDS_STATUS_MASK_NONE);
CHECK_HANDLE(pWriter[iTopic],"Cannot create data writer\n");
}
}
示例8: scytale_writer_close
int scytale_writer_close(RedCryptoWriterHandle * handle) {
SCOPED_TRACE;
CHECK_HANDLE(handle);
HashArray qhash;
HashArray fhash;
CHECK_NOTHROW(handle->out_crypto_transport.close(qhash, fhash), ERR_TRANSPORT_CLOSED);
hash_to_hashhex(qhash, handle->qhashhex);
hash_to_hashhex(fhash, handle->fhashhex);
return 0;
}
示例9: Draw_GetCursorType
IVS_DRAW_API LONG Draw_GetCursorType(DRAW_HANDLE handle, POINT Point)
{
CHECK_HANDLE(handle);
CIADrawer *pIADrawer = (CIADrawer *)handle;
if (IVS_SUCCEED != pIADrawer->WindowPointToGraphicPoint(&Point))
{
return CURSOR_TYPE_ARROW;
}
return pIADrawer->GetCursorType(Point);
}
示例10: Draw_SelectGraphicByGraphicPoint
// 根据鼠标点坐标选中智能分析单个图形(选择特定组中与鼠标坐标最近的单个图形)
IVS_DRAW_API LONG Draw_SelectGraphicByGraphicPoint(DRAW_HANDLE handle, POINT point, ULONG *ulGraphicGroup, BOOL *bAllowDel)
{
CHECK_HANDLE(handle);
if ((NULL == ulGraphicGroup) || (NULL == bAllowDel))
{
return IVS_PARA_INVALID;
}
CIADrawer *pIADrawer = (CIADrawer *)handle;
return pIADrawer->SelectGraphicByPoint(point, *ulGraphicGroup, *bAllowDel);
}
示例11: scytale_meta_reader_read_hash
int scytale_meta_reader_read_hash(RedCryptoMetaReaderHandle * handle, int version, int has_checksum)
{
SCOPED_TRACE;
CHECK_HANDLE(handle);
handle->mwrm_reader.set_header({static_cast<WrmVersion>(version), bool(has_checksum)});
CHECK_NOTHROW(
handle->mwrm_reader.read_meta_hash_line(handle->meta_line),
ERR_TRANSPORT_READ_FAILED);
return 0;
}
示例12: scytale_meta_reader_read_line
int scytale_meta_reader_read_line(RedCryptoMetaReaderHandle * handle)
{
SCOPED_TRACE;
CHECK_HANDLE(handle);
CHECK_NOTHROW(
handle->eof
= Transport::Read::Eof == handle->mwrm_reader.read_meta_line(handle->meta_line),
ERR_TRANSPORT_READ_FAILED);
return handle->eof ? ERR_TRANSPORT_NO_MORE_DATA : 0;
}
示例13: scytale_reader_qhash
int scytale_reader_qhash(RedCryptoReaderHandle * handle, const char * file)
{
SCOPED_TRACE;
CHECK_HANDLE(handle);
CHECK_NOTHROW(
InCryptoTransport::HASH qhash = handle->in_crypto_transport.qhash(file);
hash_to_hashhex(qhash.hash, handle->qhashhex),
ERR_TRANSPORT_READ_FAILED
);
return 0;
}
示例14: Draw_ULineSetPoint
// 智能分析点击确定U型框中间节点位置坐标
IVS_DRAW_API LONG Draw_ULineSetPoint(DRAW_HANDLE handle, POINT point, ULONG /*ulGraphicGroup*/)
{
CHECK_HANDLE(handle);
CIADrawer *pIADrawer = (CIADrawer *)handle;
if (IVS_SUCCEED != pIADrawer->WindowPointToGraphicPoint(&point))
{
// pIADrawer->StopDrawGraphics(ulGraphicGroup);
return IVS_FAIL;
}
return pIADrawer->DrawIAULine(point, TRUE, FALSE, TRUE);
}
示例15: Draw_SelectGraphicByGroup
// 选中指定图形组的所有图形
IVS_DRAW_API LONG Draw_SelectGraphicByGroup(DRAW_HANDLE handle, ULONG ulGraphicGroup, BOOL *bAllowDel)
{
CHECK_HANDLE(handle);
if (NULL == bAllowDel)
{
return IVS_PARA_INVALID;
}
CIADrawer *pIADrawer = (CIADrawer *)handle;
return pIADrawer->SelectGraphicByGroup(ulGraphicGroup, *bAllowDel);
}