本文整理汇总了C++中netnode::setblob方法的典型用法代码示例。如果您正苦于以下问题:C++ netnode::setblob方法的具体用法?C++ netnode::setblob怎么用?C++ netnode::setblob使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类netnode
的用法示例。
在下文中一共展示了netnode::setblob方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: term
void idaapi term(void) {
msg(PLUGIN_NAME": collabREate is being unloaded\n");
authenticated = false;
if (is_connected()) {
msg(PLUGIN_NAME": calling cleanup\n");
cleanup();
msg(PLUGIN_NAME": back from cleanup\n");
}
msg(PLUGIN_NAME": closing status form\n");
close_chooser("Collab form:1");
msg(PLUGIN_NAME": status form closed\n");
if (msgHistory.size() > 0) {
qstring temp;
for (unsigned int i = 0; i < msgHistory.size(); i++) {
temp += msgHistory[i];
temp += '\n';
}
cnn.setblob(temp.c_str(), temp.length() + 1, 1, COLLABREATE_MSGHISTORY_TAG);
msgHistory.clear();
}
if (changeCache != NULL && changeCache->length() > 0) {
cnn.setblob(changeCache->c_str(), changeCache->length() + 1, 1, COLLABREATE_CACHE_TAG);
delete changeCache;
changeCache = NULL;
}
unhookAll();
}
示例2: upgrade_db_format
//.........这里部分代码省略.........
//rename local variables (for references)
if ( u.s.DataSize ) {
int i = u.s.DataSize;
ea_t ea = u.s.DataBase + i;
do {
char str[MAXNAMELEN];
qsnprintf(str, sizeof(str), "met%03u_slot%03u", u.s.id.Number, --i);
--ea;
if ( do_name_anyway(ea, str)) make_name_auto(ea );
else hide_name(ea);
}while ( i );
coagulate_unused_data(&u.s);
}
} // for
//change format of string presentation in constant pool
for(int pos = 0; (ushort)pos <= curClass.maxCPindex; pos++) {
ConstOpis co;
if ( constnode.supval(pos, &co, sizeof(co)) != sizeof(co) ) goto badbase;
switch ( co.type ) {
default:
continue;
case CONSTANT_Unicode:
error("Base contain CONSTANT_Unicode, but it is removed from "
"the standard in 1996 year and never normal loaded in IDA");
case CONSTANT_Utf8:
break;
}
uint32 v, n, i = pos << 16;
if( ((n = (uint32)constnode.altval(i)) & UPG12_BADMASK)
|| (v = n & ~UPG12_CLRMASK) == 0) goto badbase;
if ( n & UPG12_EXTMASK ) v |= UPG12_EXTSET;
if ( (n = (ushort)v) != 0 ) {
register uchar *po = (uchar*)append_tmp_buffer(v);
n *= sizeof(ushort);
uint32 pos = 0;
do {
uint32 sz = n - pos;
if ( sz > MAXSPECSIZE ) sz = MAXSPECSIZE;
if ( constnode.supval(++i, &po[pos], sz) != sz ) goto badbase;
constnode.supdel(i);
pos += sz;
}while ( pos < n );
constnode.setblob(po, n, i & ~0xFFFF, BLOB_TAG);
if ( !(v & UPG12_EXTSET) ) do {
#ifdef __BORLANDC__
#if ( sizeof(ushort) % 2) || (MAXSPECSIZE % 2 )
#error
#endif
#endif
ushort cw = *(ushort *)&po[pos];
if ( cw >= CHP_MAX ) {
if ( !javaIdent(cw) ) goto extchar;
} else if ( (uchar)cw <= CHP_MIN ) {
extchar:
v |= UPG12_EXTSET;
break;
}
}while ( (pos -= sizeof(ushort)) != 0 );
v = upgrade_ResW(v);
}
constnode.altset(i, v);
co._Sopstr = v; // my be not needed? (next also)
constnode.supset(pos, &co, sizeof(co));
}
// rename 'import' variables for refernces
for(unsigned ip = 1; (ushort)ip <= curClass.xtrnCnt; ip++) {
ConstOpis co;
{
register unsigned j;
if( (j = (unsigned)XtrnNode.altval(ip)) == 0
|| !LoadOpis((ushort)j, 0, &co)) goto badbase;
}
switch ( co.type ) {
default:
goto badbase;
case CONSTANT_Class:
if ( !(co.flag & HAS_CLSNAME) ) continue;
break;
case CONSTANT_InterfaceMethodref:
case CONSTANT_Methodref:
if ( (co.flag & NORM_METOD) != NORM_METOD ) continue;
break;
case CONSTANT_Fieldref:
if ( (co.flag & NORM_FIELD) != NORM_FIELD ) continue;
break;
}
make_new_name(co._name, co._subnam, co.type != CONSTANT_Class, ip);
}
if ( curClass.This.Dscr )
make_new_name(curClass.This.Name, 0, (uchar)-1, (unsigned)curClass.startEA);
return(_TO_VERSION);
}