本文整理汇总了C++中GetAppName函数的典型用法代码示例。如果您正苦于以下问题:C++ GetAppName函数的具体用法?C++ GetAppName怎么用?C++ GetAppName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetAppName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: wxSetEnv
bool Springsettings::OnInit()
{
wxSetEnv( _T("UBUNTU_MENUPROXY"), _T("0") );
//this triggers the Cli Parser amongst other stuff
if (!wxApp::OnInit())
return false;
SetAppName(_T("SpringSettings"));
const wxString configdir = TowxString(SlPaths::GetConfigfileDir());
if ( !wxDirExists(configdir) )
wxMkdir(configdir);
if (!m_crash_handle_disable) {
#if wxUSE_ON_FATAL_EXCEPTION
wxHandleFatalExceptions( true );
#endif
#if defined(__WXMSW__) && defined(ENABLE_DEBUG_REPORT)
//this undocumented function acts as a workaround for the dysfunctional
// wxUSE_ON_FATAL_EXCEPTION on msw when mingw is used (or any other non SEH-capable compiler )
SetUnhandledExceptionFilter(filter);
#endif
}
//initialize all loggers
//TODO non-constant parameters
wxLogChain* logchain = 0;
wxLogWindow* loggerwin = InitializeLoggingTargets( 0, m_log_console, m_log_file_path, m_log_window_show, m_log_verbosity, logchain );
//this needs to called _before_ mainwindow instance is created
#ifdef __WXMSW__
wxString path = wxPathOnly( wxStandardPaths::Get().GetExecutablePath() ) + wxFileName::GetPathSeparator() + _T("locale");
#else
#if defined(LOCALE_INSTALL_DIR)
wxString path ( _T(LOCALE_INSTALL_DIR) );
#else
// use a dummy name here, we're only interested in the base path
wxString path = wxStandardPaths::Get().GetLocalizedResourcesDir(_T("noneWH"),wxStandardPaths::ResourceCat_Messages);
path = path.Left( path.First(_T("noneWH") ) );
#endif
#endif
m_translationhelper = new wxTranslationHelper( GetAppName().Lower(), path );
SetSettingsStandAlone( true );
// configure unitsync paths before trying to load
SlPaths::ReconfigureUnitsync();
//unitsync first load, NEEDS to be blocking
LSL::usync().ReloadUnitSyncLib();
settings_frame* frame = new settings_frame(NULL,GetAppName());
SetTopWindow(frame);
frame->Show();
if ( loggerwin ) { // we got a logwindow, lets set proper parent win
loggerwin->GetFrame()->SetParent( frame );
}
return true;
}
开发者ID:renemilk,项目名称:springlobby,代码行数:60,代码来源:main.cpp
示例2: GetTmpFile
void GmUifApp::RemoveById (ubyte4 LogId)
{
wxString tmpfile = GetTmpFile (GetAppName ());
try {
GmUnitedIndexFile uif (tmpfile, 0);
const vector<GmUifRootEntry*> & roots = m_app.GetAllRootEntries ();
GmSetDeleteFlagHandler handler (LogId);
for (size_t index = 0; index < roots.size (); ++index) {
GmUifRootPairT tree;
GmAutoClearRootPairTree act (tree);
m_app.GetUifRootTree (*roots[index], tree);
for (size_t tindex = 0; tindex < tree.second->size (); ++tindex) {
GmUifSourcePairT * pNode = (*tree.second)[tindex];
TraverseTree (pNode->second, &handler, pNode->first->SourceName, GmUifAppHanldeFileType ());
}
ClearEmptyRootTreePair (tree);
const GmUifRootEntry & entry = *tree.first;
AddTheseTreeToUifFile (*tree.second, uif, (GmRootEntryType)entry.EntryType
, entry.EntryDataType, entry.TraverseMtd, entry.EntryTime);
}
uif.Close ();
m_app.Close ();
if (wxRemoveFile (GetAppName ()))
wxRenameFile (tmpfile, GetAppName ());
}
catch (...) {
wxRemoveFile (tmpfile);
throw;
}
}
开发者ID:tanganam,项目名称:gimu,代码行数:32,代码来源:uifapp.cpp
示例3: wxConfigBase
// constructor supports creation of wxFileConfig objects of any type
wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
const wxString& strLocal, const wxString& strGlobal,
long style)
: wxConfigBase(::GetAppName(appName), vendorName,
strLocal, strGlobal,
style),
m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
{
// Make up names for files if empty
if ( m_strLocalFile.IsEmpty() && (style & wxCONFIG_USE_LOCAL_FILE) )
{
m_strLocalFile = GetLocalFileName(GetAppName());
}
if ( m_strGlobalFile.IsEmpty() && (style & wxCONFIG_USE_GLOBAL_FILE) )
{
m_strGlobalFile = GetGlobalFileName(GetAppName());
}
// Check if styles are not supplied, but filenames are, in which case
// add the correct styles.
if ( !m_strLocalFile.IsEmpty() )
SetStyle(GetStyle() | wxCONFIG_USE_LOCAL_FILE);
if ( !m_strGlobalFile.IsEmpty() )
SetStyle(GetStyle() | wxCONFIG_USE_GLOBAL_FILE);
// if the path is not absolute, prepend the standard directory to it
// UNLESS wxCONFIG_USE_RELATIVE_PATH style is set
if ( !(style & wxCONFIG_USE_RELATIVE_PATH) )
{
if ( !m_strLocalFile.IsEmpty() && !wxIsAbsolutePath(m_strLocalFile) )
{
wxString strLocal = m_strLocalFile;
m_strLocalFile = GetLocalDir();
m_strLocalFile << strLocal;
}
if ( !m_strGlobalFile.IsEmpty() && !wxIsAbsolutePath(m_strGlobalFile) )
{
wxString strGlobal = m_strGlobalFile;
m_strGlobalFile = GetGlobalDir();
m_strGlobalFile << strGlobal;
}
}
SetUmask(-1);
Init();
}
开发者ID:TimofonicJunkRoom,项目名称:plucker,代码行数:51,代码来源:fileconf.cpp
示例4: GetAppName
void GSTitle::Draw2d()
{
GSGui::Draw2d();
#ifdef SHOW_ENV_INFO
// Draw env info, etc.
static GuiText t;
t.SetSize(Vec2f(1.0f, 0.1f));
t.SetJust(GuiText::AMJU_JUST_LEFT);
t.SetDrawBg(true);
t.SetLocalPos(Vec2f(-1.0f, 0.8f));
std::string s = "SaveDir: " + GetAppName();
t.SetText(s);
t.Draw();
t.SetLocalPos(Vec2f(-1.0f, 0.7f));
s = "Server: " + GetServer();
t.SetText(s);
t.Draw();
t.SetLocalPos(Vec2f(-1.0f, 0.6f));
s = "Env: " + GetEnv();
t.SetText(s);
t.Draw();
#endif
}
开发者ID:jason-amju,项目名称:amjulib,代码行数:28,代码来源:GSTitle.cpp
示例5: setlocale
bool WallFollowing::OnStartUp()
{
setlocale(LC_ALL, "C");
list<string> sParams;
m_MissionReader.EnableVerbatimQuoting(false);
if(m_MissionReader.GetConfiguration(GetAppName(), sParams))
{
list<string>::iterator p;
for(p = sParams.begin() ; p != sParams.end() ; p++)
{
string original_line = *p;
string param = stripBlankEnds(toupper(biteString(*p, '=')));
string value = stripBlankEnds(*p);
if(param == "FOO")
{
//handled
}
else if(param == "BAR")
{
//handled
}
}
}
m_timewarp = GetMOOSTimeWarp();
RegisterVariables();
return(true);
}
开发者ID:dvinc,项目名称:moos-ivp-ENSTABretagne,代码行数:31,代码来源:WallFollowing.cpp
示例6: wxRegConfig
wxConfigBase* Pcsx2App::OpenInstallSettingsFile()
{
// Implementation Notes:
//
// As of 0.9.8 and beyond, PCSX2's versioning should be strong enough to base ini and
// plugin compatibility on version information alone. This in turn allows us to ditch
// the old system (CWD-based ini file mess) in favor of a system that simply stores
// most core application-level settings in the registry.
ScopedPtr<wxConfigBase> conf_install;
#ifdef __WXMSW__
conf_install = new wxRegConfig();
#else
// FIXME!! Linux / Mac
// Where the heck should this information be stored?
wxDirName usrlocaldir( PathDefs::GetUserLocalDataDir() );
//wxDirName usrlocaldir( wxStandardPaths::Get().GetDataDir() );
if( !usrlocaldir.Exists() )
{
Console.WriteLn( L"Creating UserLocalData folder: " + usrlocaldir.ToString() );
usrlocaldir.Mkdir();
}
wxFileName usermodefile( GetAppName() + L"-reg.ini" );
usermodefile.SetPath( usrlocaldir.ToString() );
conf_install = OpenFileConfig( usermodefile.GetFullPath() );
#endif
return conf_install.DetachPtr();
}
开发者ID:adi6190,项目名称:pcsx2,代码行数:32,代码来源:AppUserMode.cpp
示例7: OnStartUp
bool SimGPS::OnStartUp()
{
list<string> sParams;
m_MissionReader.EnableVerbatimQuoting(false);
if(m_MissionReader.GetConfiguration(GetAppName(), sParams)) {
list<string>::iterator p;
for(p=sParams.begin(); p!=sParams.end(); p++) {
string original_line = *p;
string param = stripBlankEnds(toupper(biteString(*p, '=')));
string value = stripBlankEnds(*p);
if(param == "GPS_COVARIANCE") {
GPS_covariance = read_matrix(value);
}
if(param == "MAX_DEPTH"){
max_depth = atof(value.c_str());
}
if(param == "ADD_NOISE"){
add_noise = (tolower(value) == "true");
}
if(param == "BACKGROUND_MODE"){
if (tolower(value) == "true")
in_prefix = "NAV";
else
in_prefix = "SIM";
}
}
}
distribution = normal_distribution<double>(0.0,sqrt(GPS_covariance(0,0)));
RegisterVariables();
return(true);
}
开发者ID:liampaull,项目名称:AUVCSLAM,代码行数:34,代码来源:SimGPS.cpp
示例8: GetAppName
void TestApp::OnInitialize(u32 width, u32 height)
{
mWindow.Initialize(GetInstance(), GetAppName(), width, height);
HookWindow(mWindow.GetWindowHandle());
mTimer.Initialize();
mGraphicsSystem.Initialize(mWindow.GetWindowHandle(), false);
SimpleDraw::Initialize(mGraphicsSystem);
const u32 windowWidth = mGraphicsSystem.GetWidth();
const u32 windowHeight = mGraphicsSystem.GetHeight();
mCamera.Setup(Math::kPiByTwo, (f32)windowWidth / (f32)windowHeight, 0.01f, 1000.0f);
mCamera.SetPosition(Math::Vector3(0.0f, 2.0f, 1.0f));
mCamera.SetLookAt(Math::Vector3(0.0f, 1.0f, 0.0f));
mRenderer.Initialize(mGraphicsSystem);
mModel.Load(mGraphicsSystem, "../Data/Models/soldier1.txt");
mAnimationController.Initialize(mModel);
//AnimationClip clip;
//mAnimationController.StartClip(clip, true);
mAnimationController.StartClip(*mModel.mAnimations[0], true);
}
开发者ID:bretthuff22,项目名称:Animation,代码行数:26,代码来源:TestApp.cpp
示例9: destfn
void MusikApp::OnFatalException ()
{
wxDebugReportCompress report;
// add all standard files: currently this means just a minidump and an
// XML file with system info and stack trace
report.AddAll(wxDebugReport::Context_Exception);
// create a copy of our preferences file to include it in the report
wxFileName destfn(report.GetDirectory(), _T("musik.ini"));
wxCopyFile(wxFileConfig::GetLocalFileName(CONFIG_NAME),destfn.GetFullPath());
report.AddFile(destfn.GetFullName(), _T("Current Preferences Settings"));
// calling Show() is not mandatory, but is more polite
if ( wxDebugReportPreviewStd().Show(report) )
{
if ( report.Process() )
{
#ifdef USE_WXEMAIL
wxMailMessage mail(GetAppName() + _T(" Crash-Report"),_T("[email protected]"),
MUSIKAPPNAME_VERSION wxT("crashed."),
wxEmptyString,report.GetCompressedFileName(),_T("CrashReportZip"));
if(!wxEmail::Send(mail))
wxMessageBox(_T("Sending email failed!"));
#endif
}
}
//else: user cancelled the report
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:30,代码来源:MusikApp.cpp
示例10: ChildWindow
TeamsWindow::TeamsWindow(
HINSTANCE hInst,
HWND hWndParent,
unsigned short usWidth,
unsigned short usHeight
) : ChildWindow(hInst, TEAMS_CLASS_NAME, GetAppName(), WS_CHILD, CHILD_ID_TEAMS, hWndParent) {
unsigned short i;
fInBitmap = FALSE;
usSelectedTeam = 0;
usClientWidth = usWidth;
usClientHeight = usHeight;
usMiniCarWidth = usClientWidth / TEAMS_NUM_X;
usMiniCarHeight = usClientHeight / TEAMS_NUM_Y;
pClientBitmap = new Bitmap(pF1CarBitmap, usClientWidth, usClientHeight);
ASSERT(pClientBitmap != NULL);
pCursorTeamCar = new Cursor(Instance(), APP_CURSOR_TEAMCAR);
ASSERT(pCursorTeamCar != NULL);
CAR_REGIONS *pCR = car_regions;
for (i = 0; i < NUM_ELEMENTS(car_regions); i++, pCR++) {
pCR->hRgn = CreatePolygonRgn(pCR->points, pCR->usPoints, ALTERNATE);
ASSERT(pCR->hRgn != NULL);
}
UpdateMemoryImage();
DragAcceptFiles(Handle(), TRUE);
}
开发者ID:tkellaway,项目名称:f1gp-utils,代码行数:33,代码来源:TEAMS.CPP
示例11: wxConfigBase
wxIniConfig::wxIniConfig(const wxString& strAppName,
const wxString& strVendor,
const wxString& localFilename,
const wxString& globalFilename,
long style)
: wxConfigBase(!strAppName && wxTheApp ? wxTheApp->GetAppName()
: strAppName,
!strVendor ? (wxTheApp ? wxTheApp->GetVendorName()
: strAppName)
: strVendor,
localFilename, globalFilename, style)
{
m_strLocalFilename = localFilename;
if (m_strLocalFilename.empty())
{
m_strLocalFilename = GetAppName() + wxT(".ini");
}
// append the extension if none given and it's not an absolute file name
// (otherwise we assume that they know what they're doing)
if ( !wxIsPathSeparator(m_strLocalFilename[(size_t) 0]) &&
m_strLocalFilename.Find('.') == wxNOT_FOUND )
{
m_strLocalFilename << wxT(".ini");
}
// set root path
SetPath(wxEmptyString);
}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:29,代码来源:iniconf.cpp
示例12: implementation
/*------------------------------------------------------
FLEXplorer implementation (The Application class)
--------------------------------------------------------*/
bool FLEXplorer::OnInit()
{
wxLocale::AddCatalogLookupPathPrefix(".");
wxLocale::AddCatalogLookupPathPrefix("./locale");
m_locale.Init();
m_locale.AddCatalog("flexemu");
ReadDefaultOptions();
SetAppName(_("FLEXplorer"));
#ifdef wxUSE_DRAG_AND_DROP
wxTheClipboard->UsePrimarySelection();
#endif
int width = 820;
// Create the main frame window
FlexParentFrame *frame =
new FlexParentFrame((wxFrame *)nullptr, -1, GetAppName(),
wxPoint(-1, -1), wxSize(width, 700),
wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL);
frame->Show(true);
SetTopWindow(frame);
for (int i = 1; i < argc; ++i)
{
if (!frame->OpenContainer(argv[i].ToUTF8()))
{
break;
}
}
return true;
}
开发者ID:aladur,项目名称:flexemu,代码行数:37,代码来源:flexdisk.cpp
示例13: Run
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
g_hMenuGroup = LoadMenu( _Module.GetResourceInstance(), MAKEINTRESOURCE( IDR_MENU_GROUP ) );
g_hMenuGroup = GetSubMenu( g_hMenuGroup, 0 );
g_hMenuColor = LoadMenu( _Module.GetResourceInstance(), MAKEINTRESOURCE( IDR_MENU_COLOR ) );
g_hMenuColor = GetSubMenu( g_hMenuColor, 0 );
CMainWnd wndMain;
char szTitle[256] = { 0 };
sprintf( szTitle, "%s %s", GetAppName(), GetAppVer() );
if( NULL == wndMain.Create( NULL, CWindow::rcDefault, szTitle, WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX ) )
{
ATLTRACE( _T("Main window creation failed!\n") );
return( 0 );
}
wndMain.ShowWindow( nCmdShow );
int nRet = theLoop.Run();
_Module.RemoveMessageLoop();
return nRet;
}
开发者ID:porter-liu,项目名称:BeyondPicker,代码行数:25,代码来源:BeyondPicker.cpp
示例14: GetConfig
bool wxGISApplicationBase::CreateApp(void)
{
wxGISAppConfig oConfig = GetConfig();
if(!oConfig.IsOk())
return false;
//load GDAL defaults
wxString sGDALCacheMax = oConfig.Read(enumGISHKCU, wxString(wxT("wxGISCommon/GDAL/cachemax")), wxString(wxT("128")));
CPLSetConfigOption("GTIFF_REPORT_COMPD_CS", "YES");
CPLSetConfigOption("GTIFF_ESRI_CITATION", "YES");
CPLSetConfigOption("GDAL_CACHEMAX", sGDALCacheMax.mb_str());
CPLSetConfigOption("LIBKML_USE_DOC.KML", "no");
CPLSetConfigOption("GDAL_USE_SOURCE_OVERVIEWS", "ON");
CPLSetConfigOption("OSR_USE_CT_GRAMMAR", "FALSE");
//GDAL_MAX_DATASET_POOL_SIZE
//OGR_ARC_STEPSIZE
//load commands
wxXmlNode* pCommandsNode = oConfig.GetConfigNode(enumGISHKCU, GetAppName() + wxString(wxT("/commands")));
if(pCommandsNode)
LoadCommands(pCommandsNode);
return true;
}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:29,代码来源:applicationbase.cpp
示例15: GetConfigfileDir
wxString GetConfigfileDir()
{
#ifdef __WXMSW__
return GetUserDataDir();
#else
return wxFormat( _T("%s/.%s") ) % wxStandardPaths::Get().GetUserConfigDir() % GetAppName(true);
#endif //__WXMSW__
}
开发者ID:tizbac,项目名称:springlobby,代码行数:8,代码来源:platform.cpp
示例16: wxGxDialogContentView
void wxGxObjectDialog::OnInit()
{
long nStyle = wxLC_LIST | wxLC_EDIT_LABELS | wxLC_SORT_ASCENDING | wxBORDER_THEME;
if(!m_bAllowMultiSelect)
nStyle |= wxLC_SINGLE_SEL;
m_pwxGxContentView = new wxGxDialogContentView(this, LISTCTRLID, wxDefaultPosition, wxDefaultSize, nStyle);
wxGISAppConfig oConfig = GetConfig();
if(oConfig.IsOk())
{
wxXmlNode* pContentViewConf = oConfig.GetConfigNode(enumGISHKCU, GetAppName() + wxString(wxT("/frame/views/contentsview")));
m_pwxGxContentView->Activate(this, pContentViewConf);
}
RegisterChildWindow(m_pwxGxContentView->GetId());
bMainSizer->Insert(1, m_pwxGxContentView, 1, wxALL|wxEXPAND, 5 );
//m_pwxGxContentView->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( wxGxObjectDialog::OnItemSelected ), NULL, this );
//m_pwxGxContentView->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( wxGxObjectDialog::OnItemSelected ), NULL, this );
m_pwxGxContentView->Bind( wxEVT_COMMAND_LIST_ITEM_SELECTED, &wxGxObjectDialog::OnItemSelected, this );
m_pwxGxContentView->Bind( wxEVT_COMMAND_LIST_ITEM_DESELECTED, &wxGxObjectDialog::OnItemSelected, this );
for(size_t i = 0; i < m_FilterArray.size(); ++i)
m_WildcardCombo->AppendString(m_FilterArray[i]->GetName());
if(m_FilterArray.size() > 1 && m_bAllFilters)
m_WildcardCombo->AppendString(_("All listed filters"));
if(m_FilterArray.size() == 0)
m_WildcardCombo->AppendString(_("All items"));
m_WildcardCombo->Select(m_nDefaultFilter);
m_pwxGxContentView->SetCurrentFilter(m_nDefaultFilter);
m_pwxGxContentView->SetFilters(m_FilterArray);
wxString sLastPath = m_sStartPath;
if(sLastPath.IsEmpty())
{
if(oConfig.IsOk())
sLastPath = oConfig.Read(enumGISHKCU, GetAppName() + wxString(wxT("/lastpath/path")), m_pCatalog->GetName());
else
sLastPath = m_pCatalog->GetName();
}
SetLocation(sLastPath);
m_NameTextCtrl->SetFocus();
SerializeFramePos(false);
}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:46,代码来源:gxobgdialog.cpp
示例17: setlocale
bool Camera::OnStartUp()
{
setlocale(LC_ALL, "C");
int identifiant_camera = -1;
list<string> sParams;
m_MissionReader.EnableVerbatimQuoting(false);
if(m_MissionReader.GetConfiguration(GetAppName(), sParams))
{
list<string>::iterator p;
for(p = sParams.begin() ; p != sParams.end() ; p++)
{
string original_line = *p;
string param = stripBlankEnds(toupper(biteString(*p, '=')));
string value = stripBlankEnds(*p);
if(param == "IDENTIFIANT_CV_CAMERA")
identifiant_camera = atoi((char*)value.c_str());
if(param == "VARIABLE_IMAGE_NAME")
{
m_image_name = value;
m_display_name = m_image_name;
}
if(param == "DISPLAY_IMAGE")
m_affichage_image = (value == "true");
if(param == "INVERT_IMAGE")
m_inverser_image = (value == "true");
}
}
m_timewarp = GetMOOSTimeWarp();
// SetAppFreq(20, 400);
// SetIterateMode(REGULAR_ITERATE_AND_COMMS_DRIVEN_MAIL);
if(identifiant_camera == -1)
{
cout << "Aucun identifiant de caméra reconnu" << endl;
return false;
}
char buff[100];
sprintf(buff, "/dev/video%d", identifiant_camera);
string device_name = buff;
if(!m_vc_v4l2.open(device_name, LARGEUR_IMAGE_CAMERA, HAUTEUR_IMAGE_CAMERA))
return false;
if(m_affichage_image)
namedWindow(m_display_name, CV_WINDOW_NORMAL);
RegisterVariables();
setlocale(LC_ALL, "");
return(true);
}
开发者ID:msis,项目名称:moos-ivp-ENSTABretagne,代码行数:58,代码来源:Camera.cpp
示例18: GetStillImage
bool StillImage::RegisterApplication(HINSTANCE hInstace)
{
CComPtr<IStillImage> pSti = GetStillImage(hInstace);
if (pSti == 0)
return false;
return pSti->RegisterLaunchApplication(CT2W(GetAppName()), CT2W(GetExePath())) == S_OK;
}
开发者ID:ZacWalk,项目名称:ImageWalker,代码行数:9,代码来源:StillImage.cpp
示例19: GetSharedDir
/*
$(prefix)/share/doc/mmex
*/
const wxFileName mmex::GetDocDir()
{
static wxFileName fname;
if (!fname.IsOk())
{
fname = GetSharedDir();
const wxArrayString &dirs = fname.GetDirs();
if (dirs.Last().Lower() == GetAppName())
fname.RemoveLastDir(); // mmex folder
fname.AppendDir("doc");
fname.AppendDir(GetAppName());
}
return fname;
}
开发者ID:omalleypat,项目名称:moneymanagerex,代码行数:21,代码来源:platfdep.cpp
示例20: puts
bool CProcessLauncher::CreateMyProcess()
{
if( m_lProcessCount > 0 )
{
puts("Process is running." );
return false;
}
bool bOK = false;
if( m_pi.hProcess == NULL )
{
if( ::RunProcess( &m_pi, (char *)GetAppName(), GetAppDirectory(), false, NORMAL_PRIORITY_CLASS ) )
{
printf( "Process[%s - %d] created.\n", GetAppName(), m_pi.hProcess );
DWORD dwResult = WAIT_OBJECT_0;
if( GetStartWait() )
dwResult = WaitForSingleObject( GetEvent(), 1000 * 120 ); // 실행 후의 데이타 로딩을 최대 2분 기다린다.
else
WaitForInputIdle( m_pi.hProcess, 3000 );
bOK = ( dwResult == WAIT_OBJECT_0 );
printf( "Process[%s - %d] wait result:%d\n", GetAppName(), m_pi.hProcess, dwResult );
}
}
if( bOK )
{
InterlockedIncrement( &m_lProcessCount );
BeginMonitor();
}
if( m_pPeer )
{
BEFORESEND( ar, PACKETTYPE_PROCESS_CREATED2 );
ar << (BYTE)bOK;
ar << (DWORD)( bOK ? 0 : GetLastError() );
SEND( ar, m_pPeer, DPID_SERVERPLAYER );
}
return bOK;
}
开发者ID:iceberry,项目名称:flyffsf,代码行数:43,代码来源:ProcessLauncher.cpp
注:本文中的GetAppName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论