本文整理汇总了C++中HKEY函数的典型用法代码示例。如果您正苦于以下问题:C++ HKEY函数的具体用法?C++ HKEY怎么用?C++ HKEY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HKEY函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RegisterCTX
void
InitModule_NOTES
(void)
{
RegisterCTX(CTX_VNOTE);
RegisterReadLoopHandlerset(
VIEW_NOTES,
notes_GetParamsGetServerCall,
NULL,
NULL,
NULL,
notes_LoadMsgFromServer,
NULL,
notes_Cleanup,
NULL);
WebcitAddUrlHandler(HKEY("add_new_note"), "", 0, add_new_note, 0);
WebcitAddUrlHandler(HKEY("ajax_update_note"), "", 0, ajax_update_note, 0);
RegisterNamespace("VNOTE:POS:LEFT", 0, 0, tmpl_vcard_put_posleft, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:TOP", 0, 0, tmpl_vcard_put_postop, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:WIDTH", 0, 0, tmpl_vcard_put_poswidth, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:HEIGHT", 0, 0, tmpl_vcard_put_posheight, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:HEIGHT2", 0, 0, tmpl_vcard_put_posheight2, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:WIDTH2", 0, 0, tmpl_vcard_put_width2, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:COLOR", 0, 0, tmpl_vcard_put_color, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:BGCOLOR", 0, 0,tmpl_vcard_put_bgcolor, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:MSG", 0, 1, tmpl_vcard_put_message, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:UID", 0, 0, tmpl_vcard_put_uid, NULL, CTX_VNOTE);
RegisterMimeRenderer(HKEY("text/vnote"), render_MIME_VNote, 1, 300);
}
示例2: RegisterReadLoopHandlerset
void
InitModule_WIKI
(void)
{
RegisterReadLoopHandlerset(
VIEW_WIKI,
wiki_GetParamsGetServerCall,
wiki_PrintHeaderPage,
NULL,
NULL,
NULL,
NULL,
wiki_Cleanup
);
RegisterReadLoopHandlerset(
VIEW_WIKIMD,
wiki_GetParamsGetServerCall,
wiki_PrintHeaderPage,
NULL,
NULL,
NULL,
NULL,
wiki_Cleanup
);
WebcitAddUrlHandler(HKEY("wiki"), "", 0, display_wiki_page, 0);
WebcitAddUrlHandler(HKEY("wiki_history"), "", 0, display_wiki_history, 0);
WebcitAddUrlHandler(HKEY("wiki_pagelist"), "", 0, display_wiki_pagelist, 0);
RegisterNamespace("WIKI:DISPLAYHISTORY", 0, 0, tmplput_display_wiki_history, NULL, CTX_NONE);
RegisterNamespace("WIKI:DISPLAYPAGELIST", 0, 0, tmplput_display_wiki_pagelist, NULL, CTX_NONE);
RegisterConditional("COND:WIKI:PAGE", 1, ConditionalHaveWikiPage, CTX_NONE);
RegisterConditional("COND:WIKI:TYPE", 1, ConditionalHavewikiType, CTX_NONE);
}
示例3: WebcitAddUrlHandler
void
InitModule_PUSHMAIL
(void)
{
WebcitAddUrlHandler(HKEY("display_pushemail"), "", 0, display_pushemail, 0);
WebcitAddUrlHandler(HKEY("save_pushemail"), "", 0, save_pushemail, 0);
}
示例4: WebcitAddUrlHandler
void
InitModule_WEBCIT
(void)
{
char dir[SIZ];
WebcitAddUrlHandler(HKEY("blank"), "", 0, blank_page, ANONYMOUS|COOKIEUNNEEDED|ISSTATIC);
WebcitAddUrlHandler(HKEY("landing"), "", 0, display_default_landing_page, ANONYMOUS|COOKIEUNNEEDED);
WebcitAddUrlHandler(HKEY("do_template"), "", 0, url_do_template, ANONYMOUS);
WebcitAddUrlHandler(HKEY("sslg"), "", 0, seconds_since_last_gexp, AJAX|LOGCHATTY);
WebcitAddUrlHandler(HKEY("ajax_servcmd"), "", 0, ajax_servcmd, 0);
WebcitAddUrlHandler(HKEY("webcit"), "", 0, blank_page, URLNAMESPACE);
WebcitAddUrlHandler(HKEY("push"), "", 0, push_destination, AJAX);
WebcitAddUrlHandler(HKEY("pop"), "", 0, pop_destination, 0);
WebcitAddUrlHandler(HKEY("401"), "", 0, authorization_required, ANONYMOUS|COOKIEUNNEEDED);
RegisterConditional("COND:IMPMSG", 0, ConditionalImportantMesage, CTX_NONE);
RegisterConditional("COND:REST:DEPTH", 0, Conditional_REST_DEPTH, CTX_NONE);
RegisterConditional("COND:IS_HTTPS", 0, Conditional_IS_HTTPS, CTX_NONE);
RegisterNamespace("CSSLOCAL", 0, 0, tmplput_csslocal, NULL, CTX_NONE);
RegisterNamespace("IMPORTANTMESSAGE", 0, 0, tmplput_importantmessage, NULL, CTX_NONE);
RegisterNamespace("TRAILING_JAVASCRIPT", 0, 0, tmplput_trailing_javascript, NULL, CTX_NONE);
RegisterNamespace("URL:DISPLAYNAME", 0, 1, tmplput_HANDLER_DISPLAYNAME, NULL, CTX_NONE);
RegisterNamespace("PACKAGESTRING", 0, 1, tmplput_packagestring, NULL, CTX_NONE);
snprintf(dir, SIZ, "%s/webcit.css", static_local_dir);
if (!access(dir, R_OK)) {
syslog(LOG_INFO, "Using local Stylesheet [%s]", dir);
csslocal = NewStrBufPlain(HKEY("<link href=\"static.local/webcit.css\" rel=\"stylesheet\" type=\"text/css\" />"));
}
else
syslog(LOG_INFO, "No Site-local Stylesheet [%s] installed.", dir);
}
示例5: headers_brief_filter
void headers_brief_filter(long msgnum, void *userdata)
{
long i, l;
struct CtdlMessage *msg;
msg_filter *flt = (msg_filter*) userdata;
l = GetCount(flt->Filter);
msg = CtdlFetchMessage(msgnum, 0, 1);
StrBufPrintf(flt->buffer, "%ld", msgnum);
if (msg == NULL) {
for (i = 0; i < l; i++) {
StrBufAppendBufPlain(flt->buffer, HKEY("|"), 0);
}
}
else {
const char *k;
long len;
void *v;
RewindHashPos(flt->Filter, flt->p, 0);
while (GetNextHashPos(flt->Filter, flt->p, &len, &k, &v)) {
eMsgField f = (eMsgField) v;
StrBufAppendBufPlain(flt->buffer, HKEY("|"), 0);
if (!CM_IsEmpty(msg, f)) {
StrBufAppendBufPlain(flt->buffer, CM_KEY(msg, f), 0);
}
}
}
StrBufAppendBufPlain(flt->buffer, HKEY("\n"), 0);
cputbuf(flt->buffer);
}
示例6: WebcitAddUrlHandler
void
InitModule_OPENID
(void)
{
WebcitAddUrlHandler(HKEY("display_openids"), "", 0, display_openids, 0);
WebcitAddUrlHandler(HKEY("openid_attach"), "", 0, openid_attach, 0);
WebcitAddUrlHandler(HKEY("openid_detach"), "", 0, openid_detach, 0);
}
示例7: WebcitAddUrlHandler
void
InitModule_ROOMCHAT
(void)
{
WebcitAddUrlHandler(HKEY("chat"), "", 0, do_chat, 0);
WebcitAddUrlHandler(HKEY("chat_recv"), "", 0, chat_recv, AJAX);
WebcitAddUrlHandler(HKEY("chat_rwho"), "", 0, chat_rwho, AJAX);
WebcitAddUrlHandler(HKEY("chat_exit"), "", 0, chat_exit, AJAX);
WebcitAddUrlHandler(HKEY("chat_send"), "", 0, chat_send, 0);
}
示例8: main
int main(int argc, char* argv[])
{
StrBuf *WFBuf;
StrBuf *OutBuf;
StrBuf *Info;
int nWildfireHeaders = 0;
StartLibCitadel(8);
printf("%s == %d?\n", libcitadel_version_string(), libcitadel_version_number());
WildFireInitBacktrace(argv[0], 0);
WFBuf = NewStrBuf();
OutBuf = NewStrBuf();
Info = NewStrBufPlain(HKEY("this is just a test message"));
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
SerializeJson(WFBuf, WildFireException(HKEY(__FILE__), __LINE__, Info, 1), 1);
WildFireSerializePayload(WFBuf, OutBuf, &nWildfireHeaders, NULL);
CreateWildfireSampleMessage(OutBuf);
printf("%s\n\n", ChrPtr(OutBuf));
FreeStrBuf(&WFBuf);
FreeStrBuf(&OutBuf);
FreeStrBuf(&Info);
ShutDownLibCitadel();
return 0;
}
示例9: read_setting
static void read_setting( const std::wstring & subkey, const std::wstring & key, int & val ) {
HKEY regkey = HKEY();
if ( RegOpenKeyEx( HKEY_CURRENT_USER, ( L"Software\\libopenmpt\\" + subkey ).c_str(), 0, KEY_READ, ®key ) == ERROR_SUCCESS ) {
DWORD v = val;
DWORD type = REG_DWORD;
DWORD typesize = sizeof(v);
if ( RegQueryValueEx( regkey, key.c_str(), NULL, &type, (BYTE *)&v, &typesize ) == ERROR_SUCCESS )
{
val = v;
}
RegCloseKey( regkey );
regkey = HKEY();
}
}
示例10: write_setting
static void write_setting( const std::wstring & subkey, const std::wstring & key, int val ) {
HKEY regkey = HKEY();
if ( RegCreateKeyEx( HKEY_CURRENT_USER, ( L"Software\\libopenmpt\\" + subkey ).c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, ®key, NULL ) == ERROR_SUCCESS ) {
DWORD v = val;
DWORD type = REG_DWORD;
DWORD typesize = sizeof(v);
if ( RegSetValueEx( regkey, key.c_str(), NULL, type, (const BYTE *)&v, typesize ) == ERROR_SUCCESS )
{
// ok
}
RegCloseKey( regkey );
regkey = HKEY();
}
}
示例11: WebcitAddUrlHandler
void
InitModule_GRAPHICS
(void)
{
WebcitAddUrlHandler(HKEY("display_editpic"), "", 0, display_editpic, 0);
WebcitAddUrlHandler(HKEY("editpic"), "", 0, editpic, 0);
WebcitAddUrlHandler(HKEY("display_editroompic"), "", 0, display_editroompic, 0);
WebcitAddUrlHandler(HKEY("editroompic"), "", 0, editroompic, 0);
WebcitAddUrlHandler(HKEY("display_edithello"), "", 0, display_edithello, 0);
WebcitAddUrlHandler(HKEY("edithellopic"), "", 0, edithellopic, 0);
WebcitAddUrlHandler(HKEY("display_editgoodbuye"), "", 0, display_editgoodbyepic, 0);
WebcitAddUrlHandler(HKEY("editgoodbuyepic"), "", 0, editgoodbuyepic, 0);
WebcitAddUrlHandler(HKEY("display_editfloorpic"), "", 0, display_editfloorpic, 0);
WebcitAddUrlHandler(HKEY("editfloorpic"), "", 0, editfloorpic, 0);
}
示例12: NewHash
void
ServerStartModule_CONTEXT
(void)
{
long *v;
HttpReqTypes = NewHash(1, NULL);
HttpHeaderHandler = NewHash(1, NULL);
v = malloc(sizeof(long));
*v = eGET;
Put(HttpReqTypes, HKEY("GET"), v, NULL);
v = malloc(sizeof(long));
*v = ePOST;
Put(HttpReqTypes, HKEY("POST"), v, NULL);
v = malloc(sizeof(long));
*v = eOPTIONS;
Put(HttpReqTypes, HKEY("OPTIONS"), v, NULL);
v = malloc(sizeof(long));
*v = ePROPFIND;
Put(HttpReqTypes, HKEY("PROPFIND"), v, NULL);
v = malloc(sizeof(long));
*v = ePUT;
Put(HttpReqTypes, HKEY("PUT"), v, NULL);
v = malloc(sizeof(long));
*v = eDELETE;
Put(HttpReqTypes, HKEY("DELETE"), v, NULL);
v = malloc(sizeof(long));
*v = eHEAD;
Put(HttpReqTypes, HKEY("HEAD"), v, NULL);
v = malloc(sizeof(long));
*v = eMOVE;
Put(HttpReqTypes, HKEY("MOVE"), v, NULL);
v = malloc(sizeof(long));
*v = eCOPY;
Put(HttpReqTypes, HKEY("COPY"), v, NULL);
v = malloc(sizeof(long));
*v = eREPORT;
Put(HttpReqTypes, HKEY("REPORT"), v, NULL);
}
示例13: notes_LoadMsgFromServer
/*TODO: wrong hook */
int notes_LoadMsgFromServer(SharedMessageStatus *Stat,
void **ViewSpecific,
message_summary* Msg,
int is_new,
int i)
{
struct vnote *v;
WCTemplputParams TP;
memset(&TP, 0, sizeof(WCTemplputParams));
TP.Filter.ContextType = CTX_VNOTE;
v = vnote_new_from_msg(Msg->msgnum, is_new);
if (v) {
TP.Context = v;
DoTemplate(HKEY("vnoteitem"),
WC->WBuf, &TP);
/* uncomment these lines to see ugly debugging info
StrBufAppendPrintf(WC->trailing_javascript,
"document.write('L: ' + $('note-%s').style.left + '; ');", v->uid);
StrBufAppendPrintf(WC->trailing_javascript,
"document.write('T: ' + $('note-%s').style.top + '; ');", v->uid);
StrBufAppendPrintf(WC->trailing_javascript,
"document.write('W: ' + $('note-%s').style.width + '; ');", v->uid);
StrBufAppendPrintf(WC->trailing_javascript,
"document.write('H: ' + $('note-%s').style.height + '<br>');", v->uid);
*/
vnote_free(v);
}
return 0;
}
示例14: StrBufRFC2047encodeMessageStdin
static void StrBufRFC2047encodeMessageStdin(void)
{
int fdin = 0;// STDIN
const char *Err;
StrBuf *Target;
StrBuf *Source;
StrBuf *Src;
Source = NewStrBuf();
Src = NewStrBuf();
printf("[");
while (fdin == 0) {
StrBufTCP_read_line(Source, &fdin, 0, &Err);
StrBufAppendBuf(Src, Source, 0);
StrBufAppendBufPlain(Src, HKEY("\n"), 0);
}
Target = StrBufRFC2047encodeMessage(Src);
printf("Target: \n%s\n", ChrPtr(Target));
FreeStrBuf(&Source);
FreeStrBuf(&Src);
FreeStrBuf(&Target);
}
示例15: TestEncodeEmail
static void TestEncodeEmail(void)
{
StrBuf *Target;
StrBuf *Source;
StrBuf *UserName = NewStrBuf();
StrBuf *EmailAddress = NewStrBuf();
StrBuf *EncBuf = NewStrBuf();
Source = NewStrBuf();
// Source = NewStrBufPlain(HKEY("Art Cancro <[email protected]>, Art Cancro <[email protected]>"));
Source = NewStrBufPlain(HKEY("\"Alexandra Weiz, Restless GmbH\" <[email protected]>, \"NetIN\" <[email protected]>, \" יריב ברקאי, מולטימדי\" <[email protected]>"));
Target = StrBufSanitizeEmailRecipientVector(
Source,
UserName,
EmailAddress,
EncBuf
);
TestRevalidateStrBuf(Target);
printf("the source:>%s<\n", ChrPtr(Source));
printf("the target:>%s<\n", ChrPtr(Target));
FreeStrBuf(&Target);
FreeStrBuf(&UserName);
FreeStrBuf(&EmailAddress);
FreeStrBuf(&EncBuf);
FreeStrBuf(&Source);
}