这篇教程C++ AppInit函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AppInit函数的典型用法代码示例。如果您正苦于以下问题:C++ AppInit函数的具体用法?C++ AppInit怎么用?C++ AppInit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AppInit函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mainint main(int argc, char* argv[]){ for (int i = 1; i < argc; i++) if (!IsSwitchChar(argv[i][0])) fCommandLine = true; fDaemon = !fCommandLine;#ifdef __WXGTK__ if (!fCommandLine) { // Daemonize pid_t pid = fork(); if (pid < 0) { fprintf(stderr, "Error: fork() returned %d errno %d/n", pid, errno); return 1; } if (pid > 0) pthread_exit((void*)0); }#endif if (!AppInit(argc, argv)) return 1; while (!fShutdown) Sleep(1000000); return 0;}
开发者ID:DarrellDuane,项目名称:bitcoin,代码行数:29,
示例2: AppMainvoid AppMain(){ AppInit(1280, 720, "silver-winner"); for (;;) { MSG msg; while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessageW(&msg); } if (g_App.bShouldClose) { break; } ImGui_ImplDX11_NewFrame(); RendererPaint(); } AppExit();}
开发者ID:nlguillemot,项目名称:silver-winner,代码行数:25,
示例3: AppInitvoid VAppBase::Execute(VAppImpl* pImpl){ // Early out in case one of the startup modules triggered a quit if (WantsToQuit()) return; if(pImpl == NULL) { hkvLog::FatalError("No implmentation found!"); return; } m_pAppImpl = pImpl; Vision::SetApplication(this); // On callback based platforms the remaining code of the execute function // is triggered via the corresponding platform specific functions if (IsCallbackBased()) return; AppInit(); { // Main application loop (non callback based platforms only) bool bRun = true; while (bRun) { bRun = AppRun(); } } AppDeInit();}
开发者ID:Niobij,项目名称:AnarchoidTemplate,代码行数:31,
示例4: WinMainint PASCAL WinMain (HINSTANCE instance_in, HINSTANCE previous_instance, LPSTR command_line, int show_style){ MSG msg; instance = instance_in; WinInit (); AppInit (); while (!quit) { if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { if (msg.message == WM_QUIT) quit = true; else { TranslateMessage(&msg); DispatchMessage(&msg); } } else AppUpdate (); } AppTerm (); return 0;}
开发者ID:livibetter-backup,项目名称:pixel-city,代码行数:25,
示例5: mainint main() /** no params because they're not used */{ // Acronyms acr; // AcronymsInit(&acr); // acr.activate(&acr, (e_acronyms)4); // acr.activate(&acr, (e_acronyms)5); // acr.activate(&acr, (e_acronyms)1); // acr.activate(&acr, (e_acronyms)0); // for (int i = 0; i < 12; i++) // { // std::cout << "[" << i << "] " << acr.names[i] << " = "; // std::cout << (acr.selected[i] ? "(true)" : "(false)") << std::endl; // } // std::cout << acr.ToString(&acr) << std::endl; // std::cout << acr.CSVFormatter(&acr) << std::endl; // std::cout << acr.CountSelected(&acr) << std::endl; // std::cout << acr << std::endl; Application app; //todo(); AppInit(&app); /** initialisation of the `app` structure and reading data from file*/ app.Start(&app); /** start of the inifinite loop in the function `loop` */ app.Loop(&app); /** execution of the infinite loop */ AppDestroy(&app); /** cleaning of the structure and saving data */ return (EXIT_SUCCESS);}
开发者ID:pantzerbrendan,项目名称:uqar,代码行数:29,
示例6: mainint main(void){ BYTE stBtn1; BYTE stBtn2; DeviceInit(); AppInit(); while(stBtn1!=stPressed && stBtn2!=stPressed) { mT5IntEnable(fFalse); stBtn1 = btnBtn1.stBtn; stBtn2 = btnBtn2.stBtn; mT5IntEnable(fTrue); } RightReverse; LeftReverse; SetLeftSpeed(dtcMtrMedium); SetRightSpeed(dtcMtrMedium); mCNIntEnable(fTrue); //Sensors will trigger while(fTrue);}
开发者ID:notbryant,项目名称:project-stupid-robot,代码行数:26,
示例7: RunSharkfundstd::tuple<bool, boost::thread*> RunSharkfund(int argc, char* argv[]){ boost::thread* detectShutdownThread = NULL; static boost::thread_group threadGroup; SetupEnvironment(); bool fRet = false; // Connect Dacrsd signal handlers noui_connect(); fRet = AppInit(argc, argv,threadGroup); detectShutdownThread = new boost::thread(boost::bind(&DetectShutdownThread, &threadGroup)); if (!fRet) { if (detectShutdownThread) detectShutdownThread->interrupt(); threadGroup.interrupt_all(); // threadGroup.join_all(); was left out intentionally here, because we didn't re-test all of // the startup-failure cases to make sure they don't result in a hang due to some // thread-blocking-waiting-for-another-thread-during-startup case } return std::make_tuple (fRet,detectShutdownThread);}
开发者ID:sharkfund001,项目名称:sharkfund,代码行数:27,
示例8: mainint main(int argc, char* argv[]){ bool fRet = false; fRet = AppInit(argc, argv); if (fRet && fDaemon) pthread_exit((void*)0);}
开发者ID:dmp1ce,项目名称:namecoin,代码行数:8,
示例9: mainint main(int argc, char* argv[]){ SetupEnvironment(); // Connect bitcoind signal handlers noui_connect(); return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);}
开发者ID:SolidXPartners,项目名称:bitcoin,代码行数:9,
示例10: mainint main(int argc, char* argv[]){ SetupEnvironment(); // Connect bitcoind signal handlers noui_connect(); return (AppInit(argc, argv) ? 0 : 1);}
开发者ID:florincoin,项目名称:florincoin,代码行数:9,
示例11: NativeExceptionvoid NativeApplication::Initialize(float vertOffset, float rotStep){ if (rotStep > 10.0f) throw NativeException("too big rotation step!"); rotStep *= 2.0f * 3.14159265359f / 360.0f; AppInit(vertOffset, rotStep); GenerateVertexData();}
开发者ID:vbasanovic,项目名称:Monre,代码行数:9,
示例12: mainint main(int argc, char* argv[]){ bool fRet = false; fRet = AppInit(argc, argv); if (fRet && fDaemon) return 0; return 1;}
开发者ID:fconcklin,项目名称:namecoin,代码行数:10,
示例13: Initvoid Init() { Uart.Init(115200); Uart.Printf("usb AHB=%u; APB1=%u; APB2=%u; UsbSdio=%u/r/n", Clk.AHBFreqHz, Clk.APB1FreqHz, Clk.APB2FreqHz, Clk.UsbSdioFreqHz); Usb.Init(); Usb.Disconnect(); chThdSleepMilliseconds(999); Usb.Connect(); // Application init AppInit();}
开发者ID:Kreyl,项目名称:nute,代码行数:10,
示例14: mainint main(int argc, char* argv[]){ RegisterPrettyTerminateHander(); RegisterPrettySignalHandlers(); SetupEnvironment(); // Connect dashd signal handlers noui_connect(); return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);}
开发者ID:dashpay,项目名称:dash,代码行数:12,
示例15: mainint main(int argc, char* argv[]){ bool fRet = false; // Connect darksilkd signal handlers noui_connect(); fRet = AppInit(argc, argv); if (fRet && fDaemon) return 0; return (fRet ? 0 : 1);}
开发者ID:kevinjulio,项目名称:fantom,代码行数:14,
示例16: mainint main(int argc, char* argv[]){ bool fRet = false; fHaveGUI = false; // Connect vtorrentd signal handlers noui_connect(); fRet = AppInit(argc, argv); if (fRet && fDaemon) return 0; return (fRet ? 0 : 1);};
开发者ID:vtorrent,项目名称:vTorrent-Client,代码行数:15,
示例17: mainint main(int argc, char* argv[]){ SetupEnvironment(); bool fRet = false; // Connect bitcoind signal handlers noui_connect(); fRet = AppInit(argc, argv); if (fRet && fDaemon) return 0; return (fRet ? 0 : 1);}
开发者ID:SheffCrypto,项目名称:ACoin-Acoin,代码行数:16,
示例18: mainint main(int argc, char* argv[]){ bool fRet = false; fHaveGUI = false; //GenesisMiner(); // Connect bitcoind signal handlers noui_connect(); fRet = AppInit(argc, argv); if (fRet && fDaemon) return 0; return (fRet ? 0 : 1);}
开发者ID:Pylipala,项目名称:twister-core,代码行数:17,
示例19: Java_emu_project64_jni_NativeExports_appInitEXPORT jboolean CALL Java_emu_project64_jni_NativeExports_appInit(JNIEnv* env, jclass cls, jstring BaseDir){ if (g_Logger == NULL) { g_Logger = new AndroidLogger(); } TraceAddModule(g_Logger); Notify().DisplayMessage(10, " ____ _ __ _____ __ __"); Notify().DisplayMessage(10, " / __ //_________ (_)__ _____/ /_/ ___// // /"); Notify().DisplayMessage(10, " / /_/ / ___/ __ // / / _ /// ___/ __/ __ /// // /_"); Notify().DisplayMessage(10, " / ____/ / / /_/ / / / __/ /__/ /_/ /_/ /__ __/"); Notify().DisplayMessage(10, "/_/ /_/ //____/_/ ///___///___///__///____/ /_/"); Notify().DisplayMessage(10, " /___/"); Notify().DisplayMessage(10, "http://www.pj64-emu.com/"); Notify().DisplayMessage(10, stdstr_f("%s Version %s", VER_FILE_DESCRIPTION_STR, VER_FILE_VERSION_STR).c_str()); Notify().DisplayMessage(10, ""); if (g_JavaVM == NULL) { Notify().DisplayError("No java VM"); return false; } const char *baseDir = env->GetStringUTFChars(BaseDir, 0); bool res = AppInit(&Notify(), baseDir, 0, NULL); env->ReleaseStringUTFChars(BaseDir, baseDir); if (res) { g_JavaBridge = new JavaBridge(g_JavaVM); g_SyncBridge = new SyncBridge(g_JavaBridge); g_Plugins->SetRenderWindows(g_JavaBridge, g_SyncBridge); JniBridegSettings = new CJniBridegSettings(); RegisterUISettings(); g_Settings->RegisterChangeCB(GameRunning_CPU_Running, NULL, (CSettings::SettingChangedFunc)GameCpuRunning); } else { AppCleanup(); } return res;}
开发者ID:JunielKatarn,项目名称:Project64CI,代码行数:45,
示例20: WinMainint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow){ MSG msg; if (!AppInit (hInstance, hPrevInstance, nCmdShow)) return 0; while (GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg); DispatchMessage (&msg); } return msg.wParam;}
开发者ID:banica,项目名称:educatie,代码行数:18,
示例21: JsAppInitbool JsAppInit( HWND hMainWnd ){ s_hMainWnd = hMainWnd; bool bl = false; jscontext = AppInit(); BSTR bs; if ( ReadScriptFile_ANSI(INITIAL_FILE, &bs )) // *.js { JsRun( bs ); ::SysFreeString(bs); bl = true; } return bl;}
开发者ID:sugarontop,项目名称:D2DWindow,代码行数:19,
示例22: WinMain/** * 入口函数 */int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShowCmd){ if(!AppInit(hInst)){ MessageBox(0, "AppInit() - FAILED", 0, 0); return 0; } if(!AppSetup()){ MessageBox(0, "AppSetup() - FAILED", 0, 0); return 0; } MSG msg; ZeroMemory(&msg, sizeof(MSG)); LARGE_INTEGER lpf; QueryPerformanceFrequency(&lpf); LONGLONG nFreq = lpf.QuadPart; QueryPerformanceCounter(&lpf); static LONGLONG lastFreq = lpf.QuadPart; while(msg.message != WM_QUIT){ if(PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } QueryPerformanceCounter(&lpf); LONGLONG curFreq = lpf.QuadPart; float deltaTime = (curFreq - lastFreq) / (float)nFreq; Time::deltaTime = deltaTime; lastFreq = curFreq; if(!AppLoop()){ MessageBox(0, "AppLoop() - FAILED", 0, 0); } } AppDestory(); return msg.wParam;}
开发者ID:SinYocto,项目名称:Siny,代码行数:45,
示例23: mainint main (int argc, char* argv[]){ glutInit (&argc, argv); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); glutInitDisplayString("double rgba depth>=16 rgba"); glutInitWindowSize (width, height); glutInitWindowPosition (0,0); glutCreateWindow (APP_TITLE); glutVisibilityFunc(visible); glutReshapeFunc (resize); glutKeyboardFunc (keyboard); glutSpecialFunc (keyboard_s); AppInit (); glutMainLoop(); AppTerm (); return 0;}
开发者ID:livibetter-backup,项目名称:pixel-city,代码行数:21,
示例24: RunDacrsstd::tuple<bool, boost::thread*> RunDacrs(int argc, char* argv[]) { boost::thread* detectShutdownThread = NULL; static boost::thread_group threadGroup; SetupEnvironment(); bool fRet = false; // Connect Dacrsd signal handlers noui_connect(); fRet = AppInit(argc, argv, threadGroup); detectShutdownThread = new boost::thread(boost::bind(&DetectShutdownThread, &threadGroup)); if (!fRet) { if (detectShutdownThread) detectShutdownThread->interrupt(); threadGroup.interrupt_all(); } return std::make_tuple(fRet, detectShutdownThread);}
开发者ID:hdczsf,项目名称:dacrs,代码行数:22,
示例25: WinMainint WINAPI WinMain(HINSTANCE hInst, HINSTANCE /*hPrevInst*/, LPSTR /*cmdLine*/, int /*cmdShow*/){ appInst = hInst; if (!AppInit()) { return 1; } // Message pump MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } AppDone(); return msg.wParam;}
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:22,
示例26: mainI32 main(I32 argc, CHAR** argv){ if(argc < 2) { NAssert(VA("%s : requires server argument.",argv[0])); return -1; } // init the application AppInit(argc-1, &argv[1]); // run the application while(s_exit == FALSE) { AppRun(); } // exit the application AppExit(); return 0;}
开发者ID:sundoom,项目名称:sunstudio,代码行数:22,
示例27: WinMainint PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw){ //*** Call initialization procedure GetModuleFileName(NULL, AppPath, 1048); *(strrchr(AppPath, '//') + 1) = 0; strcpy(IniFile, AppPath); strcat(IniFile, "bitview.ini"); char fnBuf[1048]; GetPrivateProfileString("Bitview", "palette", "pal.pal", fnBuf, sizeof(fnBuf), IniFile); pal = GFXPalette::load(fnBuf); curShadeIndex = pal->getMaxShade() / 2; GetPrivateProfileString("Bitview", "backgnd", "back.bmp", fnBuf, sizeof(fnBuf), IniFile); bkgnd = GFXBitmap::load(fnBuf); LoadBitmap(szCmdLine); if (!AppInit(hInst,hPrev,sw,szCmdLine)) return FALSE; //*** Polling messages from event queue until quit GFXCDSSurface::setFunctionTable(&rclip_table); GFXSurface::createRasterList(3000); GFXCDSSurface::create(sfc, TRUE, bkgnd->getWidth(), bkgnd->getHeight(), hwndApp); sfc->setPalette(pal); pal->setTransLevel(1); sfc->lock(); Redraw(); ProcessReadyEvents(); return 0;}
开发者ID:AltimorTASDK,项目名称:TribesRebirth,代码行数:39,
示例28: WinMain/*----------------------------------------------------------------------------*/| WinMain( hInst, hPrev, lpszCmdLine, cmdShow ) || || Description: || The main procedure for the App. After initializing, it just goes || into a message-processing loop until it gets a WM_QUIT message || (meaning the app was closed). || || Arguments: || hInst instance handle of this instance of the app || hPrev instance handle of previous instance, NULL if first || szCmdLine ->null-terminated command line || cmdShow specifies how the window is initially displayed || || Returns: || The exit code as specified in the WM_QUIT message. || |/*----------------------------------------------------------------------------*/int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw){ MSG msg; DWORD dw=0; /* Call initialization procedure */ if (!AppInit(hInst,hPrev,sw,szCmdLine)) return FALSE;#ifdef WIN32 CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)IdleThread, 0, 0, &dw);#endif /* * Polling messages from event queue */ for (;;) { if (PeekMessage(&msg, NULL, 0, 0,PM_REMOVE)) { if (msg.message == WM_QUIT) break; if (hAccelApp && TranslateAccelerator(hwndApp, hAccelApp, &msg)) continue; TranslateMessage(&msg); DispatchMessage(&msg); } else { if (dw!=0 || AppIdle()) WaitMessage(); } } AppExit(); return msg.wParam;}
开发者ID:mingpen,项目名称:OpenNT,代码行数:57,
示例29: WinMainint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ // 保存主程序句柄 g_hTheApp = hInstance; // 初始化Windows窗口和程序 g_hMainWnd = AppInit(g_hTheApp, nCmdShow); if (g_hMainWnd == NULL) { MessageBox(NULL, "Can't create main window", "Error", MB_OK); return 0; } // 初始化主程序 if (!AppEntryClass()->Initialize(g_hTheApp, g_hMainWnd)) { MessageBox(NULL, "Initialize AppEntry Failed", "Error", MB_OK); return 0; } // 进入主消息循环 return AppMsgLoop();}
开发者ID:yanko,项目名称:BattleCity,代码行数:23,
注:本文中的AppInit函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AppInit2函数代码示例 C++ App函数代码示例 |