// Process starting function void StartProcess() { // Start the server InitCedar(); StInit(); StStartServer(false); }
// main function int main(int argc, char *argv[]) { MayaquaMinimalMode(); InitMayaqua(false, false, argc, argv); InitCedar(); Print("hamcore.se2 Build Utility\n"); Print("Copyright (c) SoftEther VPN Project. All Rights Reserved.\n\n"); if (argc < 3) { Print("Usage: hamcorebuilder <src_dir> <dest_hamcore_filename>\n\n"); } else { char *src_dir = argv[1]; char *dst_filename = argv[2]; Print("Src Dir: '%s'\n", src_dir); Print("Dest Filename: '%s'\n", dst_filename); Print("\nProcessing...\n"); BuildHamcore(dst_filename, src_dir, true); Print("\nDone.\n"); } FreeCedar(); FreeMayaqua(); return 0; }
// WinMain function int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { INSTANCE *instance; is_debug = false; MayaquaMinimalMode(); InitMayaqua(false, is_debug, 0, NULL); InitCedar(); ViSetSkip(); ViLoadStringTables(); InitWinUi(_U(IDS_TITLE+skip), _A(IDS_FONT+skip), ToInt(_A(IDS_FONT_SIZE+skip))); instance = NewSingleInstance(VI_INSTANCE_NAME); if (instance == NULL) { MsgBox(NULL, MB_ICONINFORMATION, _U(IDS_INSTANCE_EXISTS+skip)); } else { ViMain(); FreeSingleInstance(instance); if (sleep_before_exit) { SleepThread(60 * 1000); } } FreeWinUi(); ViFreeStringTables(); FreeCedar(); FreeMayaqua(); return 0; }
// WinMain function int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { InitMayaqua(false, false, 0, NULL); InitCedar(); SMExec(); FreeCedar(); FreeMayaqua(); return 0; }
// winmain function int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { InitMayaqua(false, false, 0, NULL); EnableProbe(false); InitCedar(); SetHamMode(); MainFunction(cmdline); FreeCedar(); FreeMayaqua(); return 0; }
// WinMain function int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow) { InitMayaqua(false, false, 0, NULL); InitCedar(); //Set Application ID //if(JL_SetCurrentProcessExplicitAppUserModelID(APPID_CM) != S_OK) { } CMExec(); FreeCedar(); FreeMayaqua(); return 0; }
// main function int main(int argc, char *argv[]) { wchar_t *s; UINT ret = 0; #ifdef OS_WIN32 SetConsoleTitleA(CEDAR_PRODUCT_STR " VPN Command Line Utility"); #endif // OS_WIN32 InitMayaqua(false, false, argc, argv); InitCedar(); s = GetCommandLineUniStr(); if (s == NULL) { s = CopyUniStr(L""); } if (UniStrCmpi(s, L"exit") != 0) { UINT size = UniStrSize(s) + 64; wchar_t *tmp; tmp = Malloc(size); UniFormat(tmp, size, L"vpncmd %s", s); ret = CommandMain(tmp); Free(tmp); } #ifdef OS_WIN32 { UINT i; LIST *o = MsGetProcessList(); bool b = false; for (i = 0;i < LIST_NUM(o);i++) { MS_PROCESS *p = LIST_DATA(o, i); if (EndWith(p->ExeFilename, "\\cmd.exe") || EndWith(p->ExeFilename, "\\command.com")) { b = true; break; } } MsFreeProcessList(o); if (b == false) { if (ret != ERR_NO_ERROR) { SleepThread(1000); } } } #endif // OS_WIN32 Free(s); FreeCedar(); FreeMayaqua(); return ret; }
// Process start function void StartProcess() { // Start the client InitCedar(); CtStartClient(); }
// main function int main(int argc, char *argv[]) { wchar_t *s; UINT ret = 0; InitProcessCallOnce(); #ifdef OS_WIN32 SetConsoleTitleA(CEDAR_PRODUCT_STR " VPN Command Line Utility"); #else // For *nix, disable output buffering to allow for interactive use setbuf(stdout,NULL); #endif // OS_WIN32 #if defined(_DEBUG) || defined(DEBUG) // In VC++ compilers, the macro is "_DEBUG", not "DEBUG". // If set memcheck = true, the program will be vitally slow since it will log all malloc() / realloc() / free() calls to find the cause of memory leak. // For normal debug we set memcheck = false. // Please set memcheck = true if you want to test the cause of memory leaks. InitMayaqua(false, true, argc, argv); #else InitMayaqua(false, false, argc, argv); #endif InitCedar(); s = GetCommandLineUniStr(); if (s == NULL) { s = CopyUniStr(L""); } if (UniStrCmpi(s, L"exit") != 0) { UINT size = UniStrSize(s) + 64; wchar_t *tmp; tmp = Malloc(size); UniFormat(tmp, size, L"vpncmd %s", s); ret = CommandMain(tmp); Free(tmp); } #ifdef OS_WIN32 { UINT i; LIST *o = MsGetProcessList(); bool b = false; for (i = 0;i < LIST_NUM(o);i++) { MS_PROCESS *p = LIST_DATA(o, i); if (EndWith(p->ExeFilename, "\\cmd.exe") || EndWith(p->ExeFilename, "\\command.com")) { b = true; break; } } MsFreeProcessList(o); if (b == false) { if (ret != ERR_NO_ERROR) { SleepThread(1000); } } } #endif // OS_WIN32 Free(s); FreeCedar(); FreeMayaqua(); return ret; }