这篇教程C++ CONTEXT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CONTEXT函数的典型用法代码示例。如果您正苦于以下问题:C++ CONTEXT函数的具体用法?C++ CONTEXT怎么用?C++ CONTEXT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CONTEXT函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: setjmpPRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np){ if (isCurrent) { (void) setjmp(CONTEXT(t)); } *np = sizeof(CONTEXT(t)) / sizeof(PRWord); return (PRWord *) CONTEXT(t);}
开发者ID:Axelio,项目名称:cert_ve_mozilla,代码行数:8,
示例2: cgi_set_main/** cgi_set_main : function:0? -> void <doc>Set or disable the main entry point function</doc>**/static value cgi_set_main( value f ) { if( val_is_null(f) ) { CONTEXT()->main = NULL; return val_true; } val_check_function(f,0); CONTEXT()->main = f; return val_true;}
开发者ID:HaxeFoundation,项目名称:neko,代码行数:13,
示例3: setjmpPRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np){#ifndef _PR_PTHREADS if (isCurrent) { (void) setjmp(CONTEXT(t)); } *np = sizeof(CONTEXT(t)) / sizeof(PRWord); return (PRWord *) CONTEXT(t);#else *np = 0; return NULL;#endif}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.external,代码行数:13,
示例4: CONTEXTJNIEXPORT jint JNICALL Java_org_apache_commons_crypto_cipher_OpenSslNative_update (JNIEnv *env, jclass clazz, jlong ctx, jobject input, jint input_offset, jint input_len, jobject output, jint output_offset, jint max_output_len){ EVP_CIPHER_CTX *context = CONTEXT(ctx); if (!check_update_max_output_len(context, input_len, max_output_len)) { THROW(env, "javax/crypto/ShortBufferException", / "Output buffer is not sufficient."); return 0; } unsigned char *input_bytes = (*env)->GetDirectBufferAddress(env, input); unsigned char *output_bytes = (*env)->GetDirectBufferAddress(env, output); if (input_bytes == NULL || output_bytes == NULL) { THROW(env, "java/lang/InternalError", "Cannot get buffer address."); return 0; } input_bytes = input_bytes + input_offset; output_bytes = output_bytes + output_offset; int output_len = 0; if (!dlsym_EVP_CipherUpdate(context, output_bytes, &output_len, / input_bytes, input_len)) { dlsym_EVP_CIPHER_CTX_cleanup(context); THROW(env, "java/lang/InternalError", "Error in EVP_CipherUpdate."); return 0; } return output_len;}
开发者ID:InsightsDev,项目名称:commons-crypto,代码行数:28,
示例5: CONTEXTJNIEXPORT jint JNICALL Java_com_intel_chimera_cipher_OpensslNative_doFinal (JNIEnv *env, jclass clazz, jlong ctx, jobject output, jint offset, jint max_output_len){ EVP_CIPHER_CTX *context = CONTEXT(ctx); if (!check_doFinal_max_output_len(context, max_output_len)) { THROW(env, "javax/crypto/ShortBufferException", / "Output buffer is not sufficient."); return 0; } unsigned char *output_bytes = (*env)->GetDirectBufferAddress(env, output); if (output_bytes == NULL) { THROW(env, "java/lang/InternalError", "Cannot get buffer address."); return 0; } output_bytes = output_bytes + offset; int output_len = 0; if (!dlsym_EVP_CipherFinal_ex(context, output_bytes, &output_len)) { dlsym_EVP_CIPHER_CTX_cleanup(context); THROW(env, "java/lang/InternalError", "Error in EVP_CipherFinal_ex."); return 0; } return output_len;}
开发者ID:kexianda,项目名称:chimera,代码行数:25,
示例6: CONTEXT // get full path of a shell folderbool ShellDirectory::get_path(PTSTR path, size_t path_count) const{ CONTEXT("ShellDirectory::get_path()"); if (!path || path_count==0) return false; path[0] = TEXT('/0'); if (_folder.empty()) return false; SFGAOF attribs = SFGAO_FILESYSTEM; // Split pidl into current and parent folder PIDLs ShellPath pidlParent, pidlFolder; _pidl.split(pidlParent, pidlFolder); if (FAILED(const_cast<ShellFolder&>(_folder)->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlFolder, &attribs))) return false; if (!(attribs & SFGAO_FILESYSTEM)) return false; if (FAILED(path_from_pidl(get_parent_folder(), &*_pidl, path, path_count))) return false; return true;}
开发者ID:jmalak,项目名称:reactos,代码行数:30,
示例7: CONTEXTbool DesktopShellView::InitDragDrop(){ CONTEXT("DesktopShellView::InitDragDrop()"); DesktopDropTarget * pDropTarget = new DesktopDropTarget(_hwnd); if (!pDropTarget) return false; pDropTarget->AddRef(); if (FAILED(RegisterDragDrop(_hwnd, pDropTarget))) { pDropTarget->Release(); return false; } FORMATETC ftetc; ftetc.dwAspect = DVASPECT_CONTENT; ftetc.lindex = -1; ftetc.tymed = TYMED_HGLOBAL; ftetc.cfFormat = CF_HDROP; pDropTarget->AddSuportedFormat(ftetc); pDropTarget->Release(); return true;}
开发者ID:RareHare,项目名称:reactos,代码行数:28,
示例8: restore_contextstatic voidrestore_context(PARROT_INTERP, ARGIN(Parrot_Context * const initialctx)){ ASSERT_ARGS(restore_context) Parrot_Context *curctx = CONTEXT(interp); if (curctx != initialctx) { Parrot_warn((interp), PARROT_WARNINGS_NONE_FLAG, "popping context in Parrot_ext_try"); do { Parrot_pop_context(interp); curctx = CONTEXT(interp); if (curctx == NULL) PANIC(interp, "cannot restore context"); } while (curctx != initialctx); }}
开发者ID:FROGGS,项目名称:parrot,代码行数:16,
示例9: CONTEXTJNIEXPORT jint JNICALL Java_com_intel_chimera_cipher_OpensslNative_updateByteArray (JNIEnv *env, jclass clazz, jlong ctx, jbyteArray input, jint input_offset, jint input_len, jbyteArray output, jint output_offset, jint max_output_len){ EVP_CIPHER_CTX *context = CONTEXT(ctx); if (!check_update_max_output_len(context, input_len, max_output_len)) { THROW(env, "javax/crypto/ShortBufferException", / "Output buffer is not sufficient."); return 0; } unsigned char *input_bytes = (unsigned char *) (*env)->GetByteArrayElements(env, input, 0); unsigned char *output_bytes = (unsigned char *) (*env)->GetByteArrayElements(env, output, 0); if (input_bytes == NULL || output_bytes == NULL) { THROW(env, "java/lang/InternalError", "Cannot get buffer address."); return 0; } int output_len = 0; int rc = dlsym_EVP_CipherUpdate(context, output_bytes + output_offset, &output_len, / input_bytes + input_offset, input_len); (*env)->ReleaseByteArrayElements(env, input, (jbyte *) input_bytes, 0); (*env)->ReleaseByteArrayElements(env, output, (jbyte *) output_bytes, 0); if (rc == 0) { dlsym_EVP_CIPHER_CTX_cleanup(context); THROW(env, "java/lang/InternalError", "Error in EVP_CipherUpdate."); return 0; } return output_len;}
开发者ID:JkSelf,项目名称:chimera,代码行数:31,
示例10: explorer_mainint explorer_main(HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdShow){ CONTEXT("explorer_main"); // initialize Common Controls library CommonControlInit usingCmnCtrl; try { InitInstance(hInstance); } catch(COMException& e) { HandleException(e, GetDesktopWindow()); return -1; }#ifndef ROSSHELL if (cmdShow != SW_HIDE) {/* // don't maximize if being called from the ROS desktop if (cmdShow == SW_SHOWNORMAL) ///@todo read window placement from registry cmdShow = SW_MAXIMIZE;*/ explorer_show_frame(cmdShow, lpCmdLine); }#endif Window::MessageLoop(); return 1;}
开发者ID:darkvaderXD2014,项目名称:reactos,代码行数:30,
示例11: switchLRESULT MDIShellBrowserChild::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam){ switch(nmsg) { case PM_DISPATCH_COMMAND: { switch(LOWORD(wparam)) { case ID_WINDOW_NEW: { CONTEXT("MDIShellBrowserChild PM_DISPATCH_COMMAND ID_WINDOW_NEW"); MDIShellBrowserChild::create(_create_info); break; } case ID_REFRESH: ///@todo refresh shell child _shellBrowser->invalidate_cache(); break; case ID_VIEW_SDI: MainFrameBase::Create(ExplorerCmd(_url, false)); break; default: return super::WndProc(nmsg, wparam, lparam); } return TRUE; } default: return super::WndProc(nmsg, wparam, lparam); } return 0;}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:32,
示例12: CONTEXTvoid ShellBrowser::Init(){ CONTEXT("ShellBrowser::Init()"); const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORADDRESSBAR); _root._drive_type = DRIVE_UNKNOWN; lstrcpy(_root._volname, root_name); _root._fs_flags = 0; lstrcpy(_root._fs, TEXT("Desktop")); _root._entry = new ShellDirectory(GetDesktopFolder(), _create_info._root_shell_path, _hwnd); _root._entry->read_directory(SCAN_DONT_ACCESS|SCAN_NO_FILESYSTEM); // avoid to handle desktop root folder as file system directory if (_left_hwnd) { InitializeTree(); InitDragDrop(); } jump_to(_create_info._shell_path); /* already filled by ShellDirectory constructor lstrcpy(_root._entry->_data.cFileName, TEXT("Desktop")); */}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:25,
示例13: WFC_Device_DestroyElement/*--------------------------------------------------------------------------- * Destroy element * * /param device * /param element *----------------------------------------------------------------------------*/OWF_API_CALL WFCErrorCodeWFC_Device_DestroyElement(WFC_DEVICE* device, WFCElement element){ WFCint i; WFCErrorCode result = WFC_ERROR_BAD_HANDLE; ENTER(WFC_Device_DestroyElement); FAIL_IF(NULL == device, WFC_ERROR_BAD_HANDLE); DPRINT(("destroying element %d", element)); for (i = 0; i < device->elements.length; i++) { WFC_ELEMENT* object; object = ELEMENT(OWF_Array_GetItemAt(&device->elements, i)); DPRINT((" element %d = %d", i, object->handle)); if (object->handle == element) { WFC_Context_RemoveElement(CONTEXT(object->context), element); WFC_Context_DecreaseClientElementCount(object->context); OWF_Array_RemoveItemAt(&device->elements, i); WFC_Element_Destroy(object); result = WFC_ERROR_NONE; break; } } LEAVE(WFC_Device_DestroyElement); return result;}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:38,
示例14: WFC_Device_FindContext/*--------------------------------------------------------------------------- * Find context context object by handle * * /param device Device * /param context Context handle * * /return Corresponding context object or NULL * if handle is invalid. *----------------------------------------------------------------------------*/OWF_API_CALL WFC_CONTEXT*WFC_Device_FindContext(WFC_DEVICE* device, WFCContext context){ WFCint i; WFC_CONTEXT* result = NULL; ENTER(WFC_Device_FindContext); FAIL_IF(NULL == device, NULL); for (i = 0; i < device->contexts.length; i++) { WFC_CONTEXT* ctmp; ctmp = CONTEXT(OWF_Array_GetItemAt(&device->contexts, i)); if (ctmp->handle == context) { result = ctmp; break; } } LEAVE(WFC_Device_FindContext); return result;}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:35,
示例15: WFC_Device_FindScreenNumberOWF_API_CALL WFCbooleanWFC_Device_FindScreenNumber(WFCint screenNumber){ WFCint i, j, deviceArrayLength, contextArrayLength; WFC_DEVICE* pDevice = NULL; ENTER(WFC_Device_DestroyContext); DPRINT(("WFC_Device_CheckScreenNumber(screenNumber = %d)", screenNumber)); deviceArrayLength = gPhyDevice.iDeviceInstanceArray.length; for (i = 0; i < deviceArrayLength; ++i) { pDevice = DEVICE(OWF_Array_GetItemAt(&(gPhyDevice.iDeviceInstanceArray), i)); OWF_ASSERT(pDevice); if (pDevice) { contextArrayLength = pDevice->contexts.length; for (j = 0; j < contextArrayLength; j++) { WFC_CONTEXT* pContext; pContext = CONTEXT(OWF_Array_GetItemAt(&pDevice->contexts, j)); OWF_ASSERT(pContext); if (pContext && (pContext->screenNumber == screenNumber)) { return WFC_TRUE; } } } } return WFC_FALSE;}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:31,
示例16: WFC_Device_DestroyContextElements/*--------------------------------------------------------------------------- * Called from context's destructor to clean up any elements that * weren't added to any scene at all i.e. they only reside in the * device's element list. These elements must not stay alive after * the context has been deleted. *----------------------------------------------------------------------------*/OWF_API_CALL voidWFC_Device_DestroyContextElements(WFC_DEVICE* device, WFC_CONTEXT* context){ WFCint i; DPRINT(("WFC_Device_DestroyContextElements(device=%d, context=%d", device ? device->handle : 0, context ? context->handle : 0)); if (!device || !context) { return; } for (i = device->elements.length; i > 0; i--) { WFC_ELEMENT* element; element = ELEMENT(OWF_Array_GetItemAt(&device->elements, i-1)); if (element->context == context) { DPRINT((" Destroying element %d (%p)", element->handle, element)); /* Improvement idea: This code is partially same as in * WFC_Device_RemoveElement. Maybe the common part should * be isolated into some DoRemoveElement function which then * would be called from here and RemoveElement. */ WFC_Context_RemoveElement(CONTEXT(element->context), element->handle); OWF_Array_RemoveItemAt(&device->elements, i-1); WFC_Element_Destroy(element); } }}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:41,
示例17: CONTEXTBOOL ShellEntry::launch_entry(HWND hwnd, UINT nCmdShow){ CONTEXT("ShellEntry::launch_entry()"); SHELLEXECUTEINFO shexinfo; shexinfo.cbSize = sizeof(SHELLEXECUTEINFO); shexinfo.fMask = SEE_MASK_INVOKEIDLIST; // SEE_MASK_IDLIST is also possible. shexinfo.hwnd = hwnd; shexinfo.lpVerb = NULL; shexinfo.lpFile = NULL; shexinfo.lpParameters = NULL; shexinfo.lpDirectory = NULL; shexinfo.nShow = nCmdShow; ShellPath shell_path = create_absolute_pidl(); shexinfo.lpIDList = &*shell_path; // add PIDL to the recent file list SHAddToRecentDocs(SHARD_PIDL, shexinfo.lpIDList); BOOL ret = TRUE; if (!ShellExecuteEx(&shexinfo)) { display_error(hwnd, GetLastError()); ret = FALSE; } return ret;}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:30,
示例18: CONTEXTLRESULT ShellBrowserChild::Init(){ CONTEXT("ShellBrowserChild::Init()"); ClientRect rect(_hwnd); const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORADDRESSBAR); _root._drive_type = DRIVE_UNKNOWN; lstrcpy(_root._volname, root_name); _root._fs_flags = 0; lstrcpy(_root._fs, TEXT("Desktop")); _root._entry = new ShellDirectory(GetDesktopFolder(), _create_info._root_shell_path, _hwnd); // -> set_curdir() _root._entry->read_directory(); if (_left_hwnd) { InitializeTree(); InitDragDrop(); } jump_to(_create_info._shell_path); return 0;}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:27,
示例19: IoMessage_locals_valueArgAt_IoObject *IoCairoContext_setSource(IoCairoContext *self, IoObject *locals, IoMessage *m){ IoCairoPattern *pattern = IoMessage_locals_valueArgAt_(m, locals, 0); cairo_set_source(CONTEXT(self), IoCairoPattern_rawPattern(pattern)); CHECK_STATUS(self); return self;}
开发者ID:eklitzke,项目名称:io,代码行数:7,
示例20: activated_ Session_Servant_Impl_T<BASE_SKEL, EXEC, CONTEXT>::Session_Servant_Impl_T ( EXEC * exe, Components::CCMHome_ptr home, const char * ins_name, Home_Servant_Impl_Base *home_servant, ::CIAO::Session_Container_ptr c) : CONTEXT::svnt_base_type (home, home_servant, c), activated_ (false), configuration_completed_ (false), executor_ (EXEC::_duplicate (exe)), context_ (0), ins_name_ (ins_name) { ACE_NEW (this->context_, CONTEXT (home, c, this, ins_name)); ::Components::SessionComponent_var scom = ::Components::SessionComponent::_narrow (exe); if (! ::CORBA::is_nil (scom.in ())) { scom->set_session_context (this->context_); } else { CIAO_DEBUG (6, (LM_DEBUG, CLINFO "Session_Servant_Impl_T_T::Session_Servant_Impl_T_T - " "Couldn't set session context for %C/n", ins_name)); } }
开发者ID:DOCGroup,项目名称:CIAO,代码行数:32,
示例21: CONTEXTFileChildWindow* FileChildWindow::create(const FileChildWndInfo& info){ CONTEXT("FileChildWindow::create()"); MDICREATESTRUCT mcs; mcs.szClass = CLASSNAME_WINEFILETREE; mcs.szTitle = (LPTSTR)info._path; mcs.hOwner = g_Globals._hInstance; mcs.x = info._pos.rcNormalPosition.left; mcs.y = info._pos.rcNormalPosition.top; mcs.cx = info._pos.rcNormalPosition.right - info._pos.rcNormalPosition.left; mcs.cy = info._pos.rcNormalPosition.bottom - info._pos.rcNormalPosition.top; mcs.style = 0; mcs.lParam = 0; FileChildWindow* child = static_cast<FileChildWindow*>( create_mdi_child(info, mcs, WINDOW_CREATOR_INFO(FileChildWindow,FileChildWndInfo))); if (!child->_left_hwnd && !child->_right_hwnd) { SendMessage(info._hmdiclient, WM_MDIDESTROY, (WPARAM)child->_hwnd, 0); MessageBox(info._hmdiclient, TEXT("Error opening child window"), TEXT("ROS Explorer"), MB_OK); } return child;}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:26,
示例22: set_return_code/** set_return_code : int -> void <doc>Set the HTTP return code</doc>**/static value set_return_code( value i ) { mcontext *c = CONTEXT(); val_check(i,int); HEADERS_NOT_SENT("Return code"); c->r->status = val_int(i); return val_true;}
开发者ID:HaxeFoundation,项目名称:neko,代码行数:11,
示例23: page/** redirect : string -> void <doc>Redirect the client to another page (Location header)</doc>**/static value redirect( value s ) { mcontext *c = CONTEXT(); val_check(s,string); HEADERS_NOT_SENT("Redirection"); ap_table_set(c->r->headers_out,"Location",val_string(s)); c->r->status = REDIRECT; return val_true;}
开发者ID:HaxeFoundation,项目名称:neko,代码行数:12,
注:本文中的CONTEXT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CONTROL函数代码示例 C++ CONTAINS函数代码示例 |