Ejemplo n.º 1
0
::Ice::DispatchStatus
com::renren::sixin::account::MiscService::___getAppVersion(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
    __checkMode(::Ice::Normal, __current.mode);
    ::IceInternal::BasicStream* __is = __inS.is();
    __is->startReadEncaps();
    ::Ice::Long userId;
    __is->read(userId);
    __is->endReadEncaps();
    ::IceInternal::BasicStream* __os = __inS.os();
    ::com::renren::sixin::account::VersionResultPtr __ret = getAppVersion(userId, __current);
    __os->write(::Ice::ObjectPtr(::IceInternal::upCast(__ret.get())));
    __os->writePendingObjects();
    return ::Ice::DispatchOK;
}
Ejemplo n.º 2
0
  TrayIcon::TrayIcon() {

    trayIconMenu = new QMenu( this );
    trayIcon = new QSystemTrayIcon( this );

    createMenu();

    trayIcon->setContextMenu( trayIconMenu );
    trayIcon->setIcon( QIcon( QString::fromUtf8( ":/dboxfe_image" ) ) );
    trayIcon->setToolTip( "DBoxFE - TrayIcon " + getAppVersion() );
    trayIcon->show();

    setWindowIcon( QIcon( QString::fromUtf8( ":/dboxfe_image" ) ) );
    setWindowTitle( getAppTitel() );

    update = new QTimer( this );
    connect( update, SIGNAL( timeout() ), this, SLOT( reloadMenu() ) );
    update->thread()->setPriority( QThread::NormalPriority );
    update->start( 15000 );
  }
// Exception execution handler.  Exception is recognized. Transfer control to
// the exception handler by executing the __except compound statement,
// then continue execution after the __except block.
int GenerateDumpAndPrintCallstack(EXCEPTION_POINTERS* pExceptionPointers) {
    BOOL bMiniDumpSuccessful;
    char szPath[MAX_PATH];
    char szFileName[MAX_PATH];
    char szFileNameOutput[MAX_PATH];
    const char* szAppName = getAppName();
    const char* szVersion = getAppVersion();
    DWORD dwBufferSize = MAX_PATH;
    HANDLE hDumpFile;
    SYSTEMTIME stLocalTime;
    MINIDUMP_EXCEPTION_INFORMATION ExpParam;

    GetLocalTime( &stLocalTime );
    GetTempPath( dwBufferSize, szPath );

    sprintf( szFileName, "%s%s", szPath, szAppName );
    CreateDirectory( szFileName, NULL );

    BUILD_UNIQUE_FILENAME(szFileName, ".dmp", szPath, szAppName, szVersion, stLocalTime);
    BUILD_UNIQUE_FILENAME(szFileNameOutput, ".out", szPath, szAppName, szVersion, stLocalTime);

    hDumpFile = CreateFile(szFileName,
                           GENERIC_READ|GENERIC_WRITE,
                           FILE_SHARE_WRITE|FILE_SHARE_READ,
                           0,
                           CREATE_ALWAYS,
                           0,
                           0);

    ExpParam.ThreadId = GetCurrentThreadId();
    ExpParam.ExceptionPointers = pExceptionPointers;
    ExpParam.ClientPointers = TRUE;

    bMiniDumpSuccessful = MiniDumpWriteDump(GetCurrentProcess(),
                                            GetCurrentProcessId(),
                                            hDumpFile,
                                            MiniDumpWithDataSegs,
                                            &ExpParam,
                                            NULL,
                                            NULL);

    printf("MiniDump file:    %s\n", szFileName);
    printf("App exe and pdb:  %s\n", getBinariesPath());

    const char* cdbExePath = getCdbPath();
    if (cdbExePath && *cdbExePath != '\0') {
        printf("Cdb exe:          %s\n", cdbExePath);

        char command[MAX_PATH * 4];
        sprintf(command, "%s -y \"%s\" -i \"%s\" -z \"%s\" -c \"%s\" -kqm >\"%s\"",
                cdbExePath,
                getBinariesPath(),
                getBinariesPath(),
                szFileName,
                CDB_PRINT_CALLSTACK_CURRENT_THREAD,
                szFileNameOutput);
        system(command);

        printf("\nThread Callstack:\n");
        printCallstack(szFileNameOutput,
                       MARKER_THREAD_CALLSTACK_START,
                       MARKER_THREAD_CALLSTACK_STOP);

        printf("\nException Callstack:\n");
        printCallstack(szFileNameOutput,
                       MARKER_EXCEPTION_CALLSTACK_START,
                       MARKER_EXCEPTION_CALLSTACK_STOP);
    } else {
        printf("Warning: CDB path not set up.\n");
    }

    return EXCEPTION_EXECUTE_HANDLER;
}
Ejemplo n.º 4
0
void CliApplication::version()
{
    std::cout << qPrintable(getAppVersion(mApp)) << std::endl;
}
Ejemplo n.º 5
0
void CMain::printVersion() {
	printf("%s\n", getAppVersion().toStr().c_str());
}
Ejemplo n.º 6
0
void version(QCoreApplication *pApp)
{
    std::cout << qPrintable(getAppVersion(pApp)) << std::endl;
}