• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GET_HANDLE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GET_HANDLE函数的典型用法代码示例。如果您正苦于以下问题:C++ GET_HANDLE函数的具体用法?C++ GET_HANDLE怎么用?C++ GET_HANDLE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GET_HANDLE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: r_get_mem

char SeniorVMHandle::pop_operand( pVOperand o )
{
  if (o == NULL)
  {
    return 0;
  }
  if (o->is_mem(  ))
  {
    r_get_mem( o->_mem.base,o->_mem.index,o->_mem.scale,o->_mem.lval );
    switch (o->_mem.size )
    {
    case 1:
      db( GET_HANDLE( b_write_mem ) );
      return 1;
      break;
    case 2:
      db( GET_HANDLE( w_write_mem ) );
      return 2;
      break;
    case 4:
      db( GET_HANDLE( d_write_mem ) );
      return 4;
      break;
#ifdef PROTECT_X64
    case 8:
      db( GET_HANDLE( q_write_mem ) );
      return 8;
      break;
#endif
    }
  } else if (o->is_reg(  ))
  {
    pop( o->_reg.base );
    if (o->_reg.base & T_E32X)
    {
      return 4;
    } else if (o->_reg.base & T_16X)
    {
      return 2;
    } else if ( o->_reg.base & T_8L || o->_reg.base & T_8H)
    {
      return 1;
    } else
      return 8;
  } else if (o->is_none(  ))
  {
    return 0;
  }
  else {
    cout << "未知操作数\r\n" << endl;
    throw;
    return -1;
  }
  return 0;
}
开发者ID:dellsun,项目名称:WProtect,代码行数:55,代码来源:SeniorVMHandle.cpp


示例2: krb5_ldap_delete_krbcontainer

krb5_error_code
krb5_ldap_delete_krbcontainer(krb5_context context, const char *dn)
{
    LDAP                        *ld=NULL;
    krb5_error_code             st=0;
    kdb5_dal_handle             *dal_handle=NULL;
    krb5_ldap_context           *ldap_context=NULL;
    krb5_ldap_server_handle     *ldap_server_handle=NULL;

    SETUP_CONTEXT ();

    /* get ldap handle */
    GET_HANDLE ();

    if (dn == NULL) {
        st = EINVAL;
        k5_setmsg(context, st, _("Kerberos Container information is missing"));
        goto cleanup;
    }

    /* delete the kerberos container */
    if ((st = ldap_delete_ext_s(ld, dn, NULL, NULL)) != LDAP_SUCCESS) {
        int ost = st;
        st = translate_ldap_error (st, OP_ADD);
        k5_setmsg(context, st, _("Kerberos Container delete FAILED: %s"),
                  ldap_err2string(ost));
        goto cleanup;
    }

cleanup:

    krb5_ldap_put_handle_to_pool(ldap_context, ldap_server_handle);
    return(st);
}
开发者ID:b055man,项目名称:krb5,代码行数:34,代码来源:ldap_realm.c


示例3: GET_HANDLE

int VPLHttp2__Impl::Put(const std::string &reqBodyFilePath,
                        VPLHttp2_ProgressCb sendProgCb,
                        void *sendProgCtx,
                        std::string &respBody)
{
    int rv = 0;

    GET_HANDLE(&(this->mutex), this->handleInUse);

    setMethod(PUT);
    rv = sendFromFile(reqBodyFilePath);
    if (rv == 0) {
        rv = setupProgressCallback(sendProgCb, sendProgCtx);
    }
    if (rv == 0) {
        rv = recvToString(respBody);
    }
    if (rv == 0) {
        rv = connect();
    }

    PUT_HANDLE(&(this->mutex), this->handleInUse);

    return rv;
}
开发者ID:mbin,项目名称:acer_cloud_wifi_copy,代码行数:25,代码来源:vplex_http2.cpp


示例4: m2_mouseup

static RobWidget* m2_mouseup(RobWidget* handle, RobTkBtnEvent *event) {
	MF2UI* ui = (MF2UI*)GET_HANDLE(handle);
	ui->drag_cutoff_x = -1;
	ui->update_annotations = true;
	queue_draw(ui->m2);
	return NULL;
}
开发者ID:bangquangvn,项目名称:meters.lv2,代码行数:7,代码来源:phasewheel.c


示例5: Java_org_a11y_BrlAPI_Native_getDisplaySize

JNIEXPORT jobject JNICALL Java_org_a11y_BrlAPI_Native_getDisplaySize(JNIEnv *jenv, jobject jobj) {
  unsigned int x, y;
  jclass jcsize;
  jmethodID jinit;
  jobject jsize;
  GET_HANDLE(jenv, jobj, NULL);

  env = jenv;

  if (brlapi__getDisplaySize(handle, &x, &y) < 0) {
    ThrowError(jenv, __func__);
    return NULL;
  }

  if (!(jcsize = (*jenv)->FindClass(jenv, "org/a11y/BrlAPI/DisplaySize"))) {
    ThrowException(jenv, ERR_NULLPTR, __func__);
    return NULL;
  }
  if (!(jinit = (*jenv)->GetMethodID(jenv, jcsize, "<init>", "(II)V"))) {
    ThrowException(jenv, ERR_NULLPTR, __func__);
    return NULL;
  }
  if (!(jsize = (*jenv)->NewObject(jenv, jcsize, jinit, x, y))) {
    ThrowException(jenv, ERR_NULLPTR, __func__);
    return NULL;
  }

  return jsize;
}
开发者ID:MarkMielke,项目名称:brltty,代码行数:29,代码来源:bindings.c


示例6: Java_org_a11y_BrlAPI_Native_enterTtyMode

JNIEXPORT jint JNICALL Java_org_a11y_BrlAPI_Native_enterTtyMode(JNIEnv *jenv, jobject jobj, jint jtty, jstring jdriver) {
  int tty ;
  char *driver;
  int result;
  GET_HANDLE(jenv, jobj, -1);
  
  env = jenv;

  tty = (int)jtty; 
  if (!jdriver)
    driver = NULL;
  else
    if (!(driver = (char *)(*jenv)->GetStringUTFChars(jenv, jdriver, NULL))) {
      ThrowException(jenv, ERR_OUTOFMEM, __func__);
      return -1;
    }

  result = brlapi__enterTtyMode(handle, tty,driver);
  if (result < 0) {
    ThrowError(jenv, __func__);
    return -1;
  }

  return (jint) result;
}
开发者ID:MarkMielke,项目名称:brltty,代码行数:25,代码来源:bindings.c


示例7: q_push_imm

void SeniorVMHandle::q_not_and(long _register1,long _register2,bool is_data)
{
  if (is_data)
  {
    q_push_imm( _register2 );
    push( _register1 );
    db( GET_HANDLE( q_nand ) );
    return;
  }
  if (_register1 == 0 || _register2 == 0)
  {
    db(HANDLE.q_nand.handle);
    return;
  }
  push(_register2,false);
  //db(HANDLE.push_esp.handle);
  //db(HANDLE.q_read_mem.handle);
  //pop(_register2);

  push(_register1,false);
  //db(HANDLE.push_esp.handle);
  //db(HANDLE.q_read_mem.handle);
  //pop(_register1);
  db(HANDLE.q_nand.handle);
}
开发者ID:dellsun,项目名称:WProtect,代码行数:25,代码来源:SeniorVMHandle.cpp


示例8: native_compile

static void native_compile(JNIEnv* env, jobject object, jstring sqlString)
{
    char buf[65];
    strcpy(buf, "android_database_SQLiteProgram->native_compile() not implemented");
    throw_sqlite3_exception(env, GET_HANDLE(env, object), buf);
    return;
}
开发者ID:draekko,项目名称:android-database-sqlcipher,代码行数:7,代码来源:net_sqlcipher_database_SQLiteProgram.cpp


示例9: native_finalize

static void native_finalize(JNIEnv* env, jobject object)
{
    char buf[66];
    strcpy(buf, "com_sqlcrypt_database_SQLiteProgram->native_finalize() not implemented");
    throw_sqlite3_exception(env, GET_HANDLE(env, object), buf);
    return;
}
开发者ID:274737258,项目名称:android-sqlite-encrypt,代码行数:7,代码来源:com_sqlcrypt_database_SQLiteProgram.cpp


示例10: krb5_ldap_create_krbcontainer

krb5_error_code
krb5_ldap_create_krbcontainer(krb5_context context, const char *dn)
{
    LDAP                        *ld=NULL;
    char                        *strval[2]={NULL}, **rdns=NULL;
    LDAPMod                     **mods = NULL;
    krb5_error_code             st=0;
    kdb5_dal_handle             *dal_handle=NULL;
    krb5_ldap_context           *ldap_context=NULL;
    krb5_ldap_server_handle     *ldap_server_handle=NULL;

    SETUP_CONTEXT ();

    /* get ldap handle */
    GET_HANDLE ();

    if (dn == NULL) {
        st = EINVAL;
        k5_setmsg(context, st, _("Kerberos Container information is missing"));
        goto cleanup;
    }

    strval[0] = "krbContainer";
    strval[1] = NULL;
    if ((st=krb5_add_str_mem_ldap_mod(&mods, "objectclass", LDAP_MOD_ADD, strval)) != 0)
        goto cleanup;

    rdns = ldap_explode_dn(dn, 1);
    if (rdns == NULL) {
        st = EINVAL;
        k5_setmsg(context, st, _("Invalid Kerberos container DN"));
        goto cleanup;
    }

    strval[0] = rdns[0];
    strval[1] = NULL;
    if ((st=krb5_add_str_mem_ldap_mod(&mods, "cn", LDAP_MOD_ADD, strval)) != 0)
        goto cleanup;

    /* create the kerberos container */
    st = ldap_add_ext_s(ld, dn, mods, NULL, NULL);
    if (st == LDAP_ALREADY_EXISTS)
        st = LDAP_SUCCESS;
    if (st != LDAP_SUCCESS) {
        int ost = st;
        st = translate_ldap_error (st, OP_ADD);
        k5_setmsg(context, st, _("Kerberos Container create FAILED: %s"),
                  ldap_err2string(ost));
        goto cleanup;
    }

cleanup:

    if (rdns)
        ldap_value_free (rdns);

    ldap_mods_free(mods, 1);
    krb5_ldap_put_handle_to_pool(ldap_context, ldap_server_handle);
    return(st);
}
开发者ID:b055man,项目名称:krb5,代码行数:60,代码来源:ldap_realm.c


示例11: m2_leave

static void m2_leave(RobWidget *handle) {
	MF2UI* ui = (MF2UI*)GET_HANDLE(handle);
	if (ui->prelight_cutoff) {
		ui->prelight_cutoff = false;
		ui->update_annotations = true;
		queue_draw(ui->m2);
	}
}
开发者ID:bangquangvn,项目名称:meters.lv2,代码行数:8,代码来源:phasewheel.c


示例12: d_push_imm

void SeniorVMHandle::set_key( long _key )
{
  //recover_vm_context();
#ifndef PROTECT_X64
  d_push_imm( _key  );
#else
  q_push_imm( _key  );
#endif
  db( GET_HANDLE( set_key ) );
}
开发者ID:dellsun,项目名称:WProtect,代码行数:10,代码来源:SeniorVMHandle.cpp


示例13: m0_size_allocate

static void
m0_size_allocate (RobWidget* rw, int w, int h) {
	BITui* ui = (BITui*)GET_HANDLE(rw);
	robwidget_set_size (rw, w, h);
	if (ui->m0_faceplate) {
		cairo_surface_destroy (ui->m0_faceplate);
		ui->m0_faceplate = NULL;
	}
	queue_draw (rw);
}
开发者ID:EQ4,项目名称:meters.lv2,代码行数:10,代码来源:bitmeter.c


示例14: native_clear_bindings

static void native_clear_bindings(JNIEnv* env, jobject object)
{
    int err;
    sqlite3_stmt * statement = GET_STATEMENT(env, object);

    err = sqlite3_clear_bindings(statement);
    if (err != SQLITE_OK) {
        throw_sqlite3_exception(env, GET_HANDLE(env, object));
        return;
    }
}
开发者ID:draekko,项目名称:android-database-sqlcipher,代码行数:11,代码来源:net_sqlcipher_database_SQLiteProgram.cpp


示例15: LOG_DEBUG

bool WeCacheServer::OnPacket(TCPSession *session, uint32_t cmd, const char *packet_data, uint32_t head_size, uint32_t body_size, uint64_t tid)
{
    if(!HAS_HANDLE(cmd))
    {
        LOG_DEBUG(logger, "can't find handler for cmd="<<cmd<<".fd="<<session->GetFD());
        //由父类来处理
        return TCPServer::OnPacket(session, cmd, packet_data, head_size, body_size, tid);
    }

    HANDLER_PTR handler = GET_HANDLE(cmd);
    int ret = (this->*handler)(session, packet_data, head_size, body_size, tid);
    return ret==0?true:false;
}
开发者ID:baoniu,项目名称:WeChat,代码行数:13,代码来源:WeCacheServer.cpp


示例16: native_bind_double

static void native_bind_double(JNIEnv* env, jobject object,
                             jint index, jdouble value)
{
    int err;
    sqlite3_stmt * statement = GET_STATEMENT(env, object);

    err = sqlite3_bind_double(statement, index, value);
    if (err != SQLITE_OK) {
        char buf[32];
        sprintf(buf, "handle %p", statement);
        throw_sqlite3_exception(env, GET_HANDLE(env, object), buf);
        return;
    }
}
开发者ID:draekko,项目名称:android-database-sqlcipher,代码行数:14,代码来源:net_sqlcipher_database_SQLiteProgram.cpp


示例17: Java_org_a11y_BrlAPI_Native_getDriverName

JNIEXPORT jstring JNICALL Java_org_a11y_BrlAPI_Native_getDriverName(JNIEnv *jenv, jobject jobj) {
  char name[32];
  GET_HANDLE(jenv, jobj, NULL);

  env = jenv;

  if (brlapi__getDriverName(handle, name, sizeof(name)) < 0) {
    ThrowError(jenv, __func__);
    return NULL;
  }

  name[sizeof(name)-1] = 0;
  return (*jenv)->NewStringUTF(jenv, name);
}
开发者ID:MarkMielke,项目名称:brltty,代码行数:14,代码来源:bindings.c


示例18: m0_set_scaling

static void
m0_set_scaling(RobWidget* rw, int w, int h) {
	MF2UI* ui = (MF2UI*)GET_HANDLE(rw);
	const float dflw = 2 * (PH_RAD + YOFF);
	const float dflh = 2 * (PH_RAD + YOFF);
	float scale = MIN(w/dflw, h/dflh);
	if (scale != ui->scale || (int)ui->m0_width != h || (int)ui->m0_height != h) {
		ui->m0_width = w;
		ui->m0_height = h;
		ui->scale  = scale;
		ui->pscale = sqrtf(scale);
		ui->update_grid = true;
	}
	queue_draw(rw);
}
开发者ID:bangquangvn,项目名称:meters.lv2,代码行数:15,代码来源:phasewheel.c


示例19: mutex_print

void mutex_print(pthread_mutex_t *m, char *txt)
{
    if (!print_state) return;
    mutex_t *m_ = (mutex_t *)*m;
    if (m_ == NULL) {
        printf("M%p %d %s\n",*m,(int)GetCurrentThreadId(),txt);
    } else {
        printf("M%p %d V=%0X B=%d t=%d o=%d C=%d R=%d H=%p %s\n",
               *m,
               (int)GetCurrentThreadId(),
               (int)m_->valid,
               (int)m_->busy,
               m_->type,
               (int)GET_OWNER(m_),(int)(m_->count),(int)GET_RCNT(m_),GET_HANDLE(m_),txt);
    }
}
开发者ID:antekone,项目名称:winpthreads,代码行数:16,代码来源:mutex.c


示例20: ga_expose_event

/* level range scale */
static bool ga_expose_event(RobWidget* handle, cairo_t* cr, cairo_rectangle_t *ev) {
	MF2UI* ui = (MF2UI*)GET_HANDLE(handle);

	if (ui->update_annotations) {
		update_annotations(ui);
		ui->update_annotations = false;
	}

	cairo_rectangle (cr, ev->x, ev->y, ev->width, ev->height);
	cairo_clip (cr);

	cairo_set_source_surface(cr, ui->sf_gain, 0, 0);
	cairo_paint (cr);

	return TRUE;
}
开发者ID:bangquangvn,项目名称:meters.lv2,代码行数:17,代码来源:phasewheel.c



注:本文中的GET_HANDLE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GET_HSR0函数代码示例发布时间:2022-05-30
下一篇:
C++ GET_HAL_DATA函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap