Exemplo n.º 1
0
int _glfwPlatformInit(void)
{
    // To make SetForegroundWindow work as we want, we need to fiddle
    // with the FOREGROUNDLOCKTIMEOUT system setting (we do this as early
    // as possible in the hope of still being the foreground process)
    SystemParametersInfoW(SPI_GETFOREGROUNDLOCKTIMEOUT, 0,
                          &_glfw.win32.foregroundLockTimeout, 0);
    SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, UIntToPtr(0),
                          SPIF_SENDCHANGE);

    if (!loadLibraries())
        return GLFW_FALSE;

    createKeyTables();
    _glfwUpdateKeyNamesWin32();

    if (_glfwIsWindows10CreatorsUpdateOrGreaterWin32())
        SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
    else if (IsWindows8Point1OrGreater())
        SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
    else if (IsWindowsVistaOrGreater())
        SetProcessDPIAware();

    if (!_glfwRegisterWindowClassWin32())
        return GLFW_FALSE;

    if (!createHelperWindow())
        return GLFW_FALSE;

    _glfwInitTimerWin32();
    _glfwInitJoysticksWin32();

    _glfwPollMonitorsWin32();
    return GLFW_TRUE;
}
Exemplo n.º 2
0
bool TThreadApplicationServer::start(bool debugMode)
{
    if (isListening()) {
        return true;
    }

    bool res = loadLibraries();
    if (!res) {
        if (debugMode) {
            tSystemError("Failed to load application libraries.");
            return false;
        } else {
            tSystemWarn("Failed to load application libraries.");
        }
    }

    if (listenSocket <= 0 || !setSocketDescriptor(listenSocket)) {
        tSystemError("Failed to set socket descriptor: %d", listenSocket);
        return false;
    }

    // instantiate
    if (!debugMode) {
        TSystemBus::instantiate();
        TPublisher::instantiate();
    }
    TUrlRoute::instantiate();
    TSqlDatabasePool::instantiate();
    TKvsDatabasePool::instantiate();

    TStaticInitializeThread::exec();
    return true;
}
Exemplo n.º 3
0
int _glfwPlatformInit(void)
{
    if (!_glfwInitThreadLocalStorageWin32())
        return GLFW_FALSE;

    // To make SetForegroundWindow work as we want, we need to fiddle
    // with the FOREGROUNDLOCKTIMEOUT system setting (we do this as early
    // as possible in the hope of still being the foreground process)
    SystemParametersInfoW(SPI_GETFOREGROUNDLOCKTIMEOUT, 0,
                          &_glfw.win32.foregroundLockTimeout, 0);
    SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, UIntToPtr(0),
                          SPIF_SENDCHANGE);

    if (!loadLibraries())
        return GLFW_FALSE;

    createKeyTables();

    if (_glfw_SetProcessDpiAwareness)
        _glfw_SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
    else if (_glfw_SetProcessDPIAware)
        _glfw_SetProcessDPIAware();

    if (!_glfwRegisterWindowClassWin32())
        return GLFW_FALSE;

    _glfw.win32.helperWindowHandle = createHelperWindow();
    if (!_glfw.win32.helperWindowHandle)
        return GLFW_FALSE;

    _glfwInitTimerWin32();
    _glfwInitJoysticksWin32();

    return GLFW_TRUE;
}
Exemplo n.º 4
0
int __PHYSFS_platformInit(void)
{
    BAIL_IF_MACRO(!getOSInfo(), NULL, 0);
    BAIL_IF_MACRO(!loadLibraries(), NULL, 0);
    BAIL_IF_MACRO(!determineUserDir(), NULL, 0);

    return(1);  /* It's all good */
} /* __PHYSFS_platformInit */
bool TPreforkApplicationServer::start()
{
    loadLibraries();

    TStaticInitializer *initializer = new TStaticInitializer();
    initializer->start();
    delete initializer;
    return true;
}
Exemplo n.º 6
0
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QString configFile = "C:/Users/Finix/Desktop/dependencyList.txt";

    // loadLibrariesAsQtPlugin(configFile);
    loadLibraries(configFile);

    return 0;
}
int loadEffectConfigFile(const char *path)
{
    cnode *root;
    char *data;

    data = load_file(path, NULL);
    if (data == NULL) {
        return -ENODEV;
    }
    root = config_node("", "");
    config_load(root, data);
    loadLibraries(root);
    loadEffects(root);
    config_free(root);
    free(root);
    free(data);

    return 0;
}
Exemplo n.º 8
0
/*!
  Start the server.
 */
void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
                    string &externPath, MainConfiguration* (*genMainConf)
                    (Server *server, const char *arg))

{
  int err = 0;

  this->genMainConf = genMainConf;

  displayBoot ();

  try
  {
    log (MYSERVER_LOG_MSG_INFO, _("Initializing server configuration..."));

    if (loadLibraries ())
      {
        log (MYSERVER_LOG_MSG_INFO, _("The server could not be started"));
        return;
      }

    if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath))
      {
        log (MYSERVER_LOG_MSG_INFO, _("The server could not be started"));
        return;
      }

    err = initialize ();
    if (err)
      {
        log (MYSERVER_LOG_MSG_INFO, _("The server could not be started"));
        return;
      }

    log (MYSERVER_LOG_MSG_INFO, _("Loading server configuration from %s..."),
         mainConf.c_str ());

    if (postLoad ())
      {
        log (MYSERVER_LOG_MSG_INFO, _("The server could not be started"));
        return;
      }

    setProcessPermissions ();

    if (getGid ()[0])
      log (MYSERVER_LOG_MSG_INFO, _("Using gid: %s"), gid.c_str ());

    if (getUid ()[0])
      log (MYSERVER_LOG_MSG_INFO, _("Using uid: %s"), uid.c_str ());

    log (MYSERVER_LOG_MSG_INFO, _("Server is ready!"));

    if (logLocation.find ("console://") != string::npos)
      log (MYSERVER_LOG_MSG_INFO, _("Press Ctrl-C to terminate its execution"));

    serverReady = true;

    /* Finally we can give control to the main loop.  */
    mainLoop ();

  }
  catch (bad_alloc &ba)
    {
      log (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"), ba.what ());
    }
  catch (exception &e)
    {
      log (MYSERVER_LOG_MSG_ERROR, _("Error: %s"), e.what ());
    };

  this->terminate ();
  finalCleanup ();

#ifdef WIN32
  WSACleanup ();
#endif

  log (MYSERVER_LOG_MSG_INFO, _("Server terminated"));
}
Exemplo n.º 9
0
void runGRJETSv11(TString mode       = "lite",            // local, lite, or cluster
               TString identifier = "run1",               // tag 
               TString dataset    = "Wprime1200.GRJETSv11",  // dataset name as in the fileList  
               TString username   = "******",           // username (e.g. swiatlow, fizisist)
               bool mcweights     = false,                 // use mc weights?
               bool doHists       = true,                 // do histograms or enable dataset mode 
               bool doSys         = false,                // do systematics 
               bool debug         = false,                // turn on debugging
               int  nWorkers      = 4                     //specify number of workers for proof(-1 for all available)
             ) 
{
    
    ///----------------------------------------------------------------
    /// Load libraries , set the config file, treenam, and cluster info
    ///----------------------------------------------------------------

    TString gridusername = "******";
    cout << "trying to load libraries" << endl;
    loadLibraries();

    cout << " Libraries loaded " << endl;

    // SetConfig
    TString configfile("../config/grjetsv11.config");

    // Change if defaulting to wrong TTree, otherwise leave
    TString treename("jets");
    
    // Best to leave alone  
    TString pathLite("");

    TString pathCluster("root://atlprf01.slac.stanford.edu:2094//atlas/output/");

    pathCluster.Append(username);
    pathCluster.Append("/");



    // Determine eventbuilder from dataset name
    TString eventbuilder(dataset);
    eventbuilder.Remove(0,eventbuilder.Last('.')+1);
    
    ///----------------------------------------------------------------
    /// Filename paths, URLs for PROOF running
    ///----------------------------------------------------------------
    TString url(mode);
    TString path("");
    if (mode.CompareTo("lite")==0) {
        url = "lite://";
        path = pathLite;
    }
    else if(mode.CompareTo("cluster")==0) {
      url = TString(username+"@atlprf01.slac.stanford.edu");
      path = pathCluster;
    }
    // Make an options file, edit as needed
    TFile* options = new TFile("options.root","RECREATE");

    ///----------------------------------------------------------------
    /// Overall Configuration
    ///----------------------------------------------------------------
    bool doPRW           = false;
    bool doBasic         = true;
    bool doTruthLinks    = false;
    bool doTrackJetLinks = true;
    bool doTruthJetLinks = true;
    bool doJetStructure  = true;
    bool doConstituents  = true;
    bool doTruthConstit  = true;
    bool doParentChild   = true;
    bool doTrack         = true;
    bool doLCCluster     = true;
    bool doEMCluster     = false;
    bool doTruth         = true;
    bool doVertex        = true;
    bool doPhotons       = false;
    
    /// JET TYPES
    bool doSomeJetTypes  = false;
    bool doMinJetTypes   = true;
    
    /// SELECTIONS
    float minJetPt       =  20.000;
    float maxJetEta      =   3.199;
    float minFatJetPt    = 100.000;
    float minJetJVF      =   0.750;
    float maxJetTrkDR    =   0.300;
    float maxJetTruthDR  =   0.300;
    TString badJetType   = "AntiKt4LCTopoAOD";
    TString badJetDef    = "isBadLooseMinus";
    
    /// Substructure
    int   nStdJetCut     = 4;
    float lowMassCRcut   = 100.000;
    float threeBodyCRcut =   0.700;
    
    ///----------------------------------------------------------------
    /// Jet types
    ///----------------------------------------------------------------
    
    TString aktCal = "AntiKt10LCTopo";
    TString aktTrk = "AntiKt10TrackZ";
    TString aktTru = "AntiKt10Truth";
    TString caCal  = "CamKt12LCTopo";
    TString caTrk  = "CamKt12TrackZ";
    TString caTru  = "CamKt12Truth";
    
    TString aktCalTrim = "AntiKt10LCTopoTrimmedPtFrac1SmallR20,AntiKt10LCTopoTrimmedPtFrac3SmallR20,AntiKt10LCTopoTrimmedPtFrac5SmallR20,AntiKt10LCTopoTrimmedPtFrac1SmallR30,AntiKt10LCTopoTrimmedPtFrac3SmallR30,AntiKt10LCTopoTrimmedPtFrac5SmallR30";
    TString aktCalPrun = "AntiKt10LCTopoPrunedKtRcutFactor10Zcut5,AntiKt10LCTopoPrunedKtRcutFactor20Zcut5,AntiKt10LCTopoPrunedKtRcutFactor30Zcut5,AntiKt10LCTopoPrunedKtRcutFactor10Zcut10,AntiKt10LCTopoPrunedKtRcutFactor20Zcut10,AntiKt10LCTopoPrunedKtRcutFactor30Zcut10";
    TString aktTrkTrim = "AntiKt10TrackZTrimmedPtFrac1SmallR20,AntiKt10TrackZTrimmedPtFrac3SmallR20,AntiKt10TrackZTrimmedPtFrac5SmallR20,AntiKt10TrackZTrimmedPtFrac1SmallR30,AntiKt10TrackZTrimmedPtFrac3SmallR30,AntiKt10TrackZTrimmedPtFrac5SmallR30";
    TString aktTrkPrun = "AntiKt10TrackZPrunedKtRcutFactor10Zcut5,AntiKt10TrackZPrunedKtRcutFactor20Zcut5,AntiKt10TrackZPrunedKtRcutFactor30Zcut5,AntiKt10TrackZPrunedKtRcutFactor10Zcut10,AntiKt10TrackZPrunedKtRcutFactor20Zcut10,AntiKt10TrackZPrunedKtRcutFactor30Zcut10";
    TString aktTruTrim = "AntiKt10TruthTrimmedPtFrac1SmallR20,AntiKt10TruthTrimmedPtFrac3SmallR20,AntiKt10TruthTrimmedPtFrac5SmallR20,AntiKt10TruthTrimmedPtFrac1SmallR30,AntiKt10TruthTrimmedPtFrac3SmallR30,AntiKt10TruthTrimmedPtFrac5SmallR30";
    TString aktTruPrun = "AntiKt10TruthPrunedKtRcutFactor10Zcut5,AntiKt10TruthPrunedKtRcutFactor20Zcut5,AntiKt10TruthPrunedKtRcutFactor30Zcut5,AntiKt10TruthPrunedKtRcutFactor10Zcut10,AntiKt10TruthPrunedKtRcutFactor20Zcut10,AntiKt10TruthPrunedKtRcutFactor30Zcut10";
    
    TString caCalTrim  = "CamKt12LCTopoTrimmedPtFrac1SmallR20,CamKt12LCTopoTrimmedPtFrac3SmallR20,CamKt12LCTopoTrimmedPtFrac5SmallR20,CamKt12LCTopoTrimmedPtFrac1SmallR30,CamKt12LCTopoTrimmedPtFrac3SmallR30,CamKt12LCTopoTrimmedPtFrac5SmallR30";
    TString caCalPrun  = "CamKt12LCTopoPrunedKtRcutFactor10Zcut5,CamKt12LCTopoPrunedKtRcutFactor20Zcut5,CamKt12LCTopoPrunedKtRcutFactor30Zcut5,CamKt12LCTopoPrunedKtRcutFactor10Zcut10,CamKt12LCTopoPrunedKtRcutFactor20Zcut10,CamKt12LCTopoPrunedKtRcutFactor30Zcut10";
    TString caCalFilt  = "CamKt12LCTopoSplitFilteredmassFraction20minSplitR0,CamKt12LCTopoSplitFilteredmassFraction33minSplitR0,CamKt12LCTopoSplitFilteredmassFraction67minSplitR0";
    TString caTrkTrim  = "CamKt12TrackZTrimmedPtFrac1SmallR20,CamKt12TrackZTrimmedPtFrac3SmallR20,CamKt12TrackZTrimmedPtFrac5SmallR20,CamKt12TrackZTrimmedPtFrac1SmallR30,CamKt12TrackZTrimmedPtFrac3SmallR30,CamKt12TrackZTrimmedPtFrac5SmallR30";
    TString caTrkPrun  = "CamKt12TrackZPrunedKtRcutFactor10Zcut5,CamKt12TrackZPrunedKtRcutFactor20Zcut5,CamKt12TrackZPrunedKtRcutFactor30Zcut5,CamKt12TrackZPrunedKtRcutFactor10Zcut10,CamKt12TrackZPrunedKtRcutFactor20Zcut10,CamKt12TrackZPrunedKtRcutFactor30Zcut10";
    TString caTrkFilt  = "CamKt12TrackZSplitFilteredmassFraction20minSplitR0,CamKt12TrackZSplitFilteredmassFraction33minSplitR0,CamKt12TrackZSplitFilteredmassFraction67minSplitR0";
    TString caTruTrim  = "CamKt12TruthTrimmedPtFrac1SmallR20,CamKt12TruthTrimmedPtFrac3SmallR20,CamKt12TruthTrimmedPtFrac5SmallR20,CamKt12TruthTrimmedPtFrac1SmallR30,CamKt12TruthTrimmedPtFrac3SmallR30,CamKt12TruthTrimmedPtFrac5SmallR30";
    TString caTruPrun  = "CamKt12TruthPrunedKtRcutFactor10Zcut5,CamKt12TruthPrunedKtRcutFactor20Zcut5,CamKt12TruthPrunedKtRcutFactor30Zcut5,CamKt12TruthPrunedKtRcutFactor10Zcut10,CamKt12TruthPrunedKtRcutFactor20Zcut10,CamKt12TruthPrunedKtRcutFactor30Zcut10";
    TString caTruFilt  = "CamKt12TruthSplitFilteredmassFraction20minSplitR0,CamKt12TruthSplitFilteredmassFraction33minSplitR0,CamKt12TruthSplitFilteredmassFraction67minSplitR0";
    
    
    //// Make derived lists
    TString aktData = aktCal + "," + aktTrk + "," + aktCalTrim + "," + aktCalPrun + "," + aktTrkTrim + "," + aktTrkPrun;
    TString aktMC   = aktTru + "," + aktTruTrim + "," + aktTruPrun;
    
    TString caData = caCal + "," + caTrk + "," + caCalTrim + "," + caCalPrun + "," + caCalFilt + "," + caTrkTrim + "," + caTrkPrun + "," + caTrkFilt;
    TString caMC   = caTru + "," + caTruTrim + "," + caTruPrun + "," + caTruFilt;
    
    
    //// DEFAULT FULL LIST
    TString jetTypes = aktData + "," + caData;
    if (!dataset.Contains("data")) jetTypes += "," + aktMC + "," + caMC;

    //// REDUCED SET OF JETS
    if (doSomeJetTypes) {
      jetTypes   = "AntiKt10LCTopo,CamKt12LCTopo,AntiKt10LCTopoTrimmedPtFrac3SmallR30,AntiKt10LCTopoTrimmedPtFrac5SmallR30,CamKt12LCTopoSplitFilteredmassFraction67minSplitR0,AntiKt10TrackZ,CamKt12TrackZ,AntiKt10TrackZTrimmedPtFrac3SmallR30,AntiKt10TrackZTrimmedPtFrac5SmallR30,CamKt12TrackZSplitFilteredmassFraction67minSplitR0";
        if (!dataset.Contains("data")) jetTypes += ",AntiKt10Truth,CamKt12Truth,AntiKt10TruthTrimmedPtFrac3SmallR30,AntiKt10TruthTrimmedPtFrac5SmallR30,CamKt12TruthSplitFilteredmassFraction67minSplitR0";
    }
    
    else if (!doSomeJetTypes && doMinJetTypes) {
      jetTypes   = "AntiKt10LCTopo,CamKt12LCTopo,AntiKt10LCTopoTrimmedPtFrac5SmallR30,CamKt12LCTopoSplitFilteredmassFraction67minSplitR0,AntiKt10TrackZ,CamKt12TrackZ,AntiKt10TrackZTrimmedPtFrac5SmallR30,CamKt12TrackZSplitFilteredmassFraction67minSplitR0";
        if (!dataset.Contains("data")) jetTypes += ",AntiKt10Truth,CamKt12Truth,AntiKt10TruthTrimmedPtFrac5SmallR30,CamKt12TruthSplitFilteredmassFraction67minSplitR0";
    }
        
    //jetTypes = aktCal + "," + aktTrk + "," + aktCalTrim + "," + aktTrkTrim;
    //jetTypes = caCal + "," + caTrk + "," + caCalTrim + "," + caTrkTrim;
    //jetTypes = aktCalPrun + "," + aktTrkPrun + "," + caCalPrun + "," + caTrkPrun;
    //jetTypes = caCalFilt + "," + caTrkFilt;
  
    
    // Be careful when loading up subjettypes and btagtypes: check that 
    // these exist in the D3PD before trying to register them!
    TString subjetTypes = "AntiKt10LCTopoTrimmedSubjetsPtFrac3SmallR30,AntiKt10TrackZTrimmedSubjetsPtFrac3SmallR30,AntiKt10TruthTrimmedSubjetsPtFrac3SmallR30";
    TString btagTypes = "AntiKt10LCTopoTrimmedSubjetsPtFrac3SmallR30";


    ///---------------------------------------------------------------
    /// New jet types! These will be constructed on the fly
    ///---------------------------------------------------------------

    TString baseCustomTrimming = "AntiKtLCTopo15";
    TString ptFracCustomTrimming = "0.05";
    TString smallRCustomTrimming = "0.3";


    ///----------------------------------------------------------------
    /// Nominal Configuration
    ///----------------------------------------------------------------
    Config* chain = new Config("chain",configfile);
    chain->AddVec("ANALYSIS");


    Config* setup = new Config("setup", configfile);
    setup->Set("ANALYSIS","GRJETSexample_setup");
    setup->Set("DEBUG",debug);
    chain->Add("ANALYSIS",setup);

    Config* example = new Config("example", configfile);
    example->Set("ANALYSIS","GRJETSexample");
    example->Set("DEBUG",debug);
    chain->Add("ANALYSIS",example);
    

    cout << endl << "+++ Using jet types: " << jetTypes << endl << endl;


    chain->Set("MCWEIGHTS"       , mcweights       );
    chain->Set("DEBUG"           , debug           );
    chain->Set("PILE"            , doPRW           );
    chain->Set("DOBASIC"         , doBasic         );
    chain->Set("DOTRUTHLINKS"    , doTruthLinks    );
    chain->Set("DOTRACKJETLINKS" , doTrackJetLinks );
    chain->Set("DOTRUTHJETLINKS" , doTruthJetLinks );
    chain->Set("DOJETSTRUCT"     , doJetStructure  );
    chain->Set("DOCONSTIT"       , doConstituents  );
    chain->Set("DOTRUTHCONSTIT"  , doTruthConstit  );
    chain->Set("DOPARENTCHILD"   , doParentChild   );
    chain->Set("DOTRACK"         , doTrack         );
    chain->Set("DOLCCLUSTER"     , doLCCluster     );
    chain->Set("DOEMCLUSTER"     , doEMCluster     );
    chain->Set("DOTRUTH"         , doTruth         );
    chain->Set("DOVTX"           , doVertex        );
    chain->Set("DOPHOTON"        , doPhotons       );
    
    /// Set Systematics
    chain->Set("DOTRACKSYST"     , false           );
    chain->Set("DOJETSYS"        , 0               );
    
    /// Set cuts and jet types and such
    chain->Set("BASECUSTOMTRIMMING",   baseCustomTrimming);
    chain->Set("PTFRACCUSTOMTRIMMING", ptFracCustomTrimming);
    chain->Set("SMALLRCUSTOMTRIMMING", smallRCustomTrimming);
    chain->Set("JETTYPES"       , jetTypes         );
    chain->Set("SUBJETTYPES"    , subjetTypes      );
    chain->Set("BTAGTYPES"      , btagTypes        );
    chain->Set("BADJETTYPE"     , badJetType       );
    chain->Set("BADJETDEF"      , badJetDef        );
    chain->Set("MINJETPT"       , minJetPt         );
    chain->Set("MAXJETETA"      , maxJetEta        );
    chain->Set("MINFATJETPT"    , minFatJetPt      );
    chain->Set("MAXFATJETETA"   , maxJetEta        );
    chain->Set("MINJETJVF"      , minJetJVF        );
    chain->Set("MAXJETTRKJETDR" , maxJetTrkDR      );
    chain->Set("MAXTRUTHJETDR"  , maxJetTruthDR    );
    
    chain->Set("NStdJetCut"     , 4                );
    chain->Set("LowMassCRcut"   , 100.             );
    chain->Set("ThreeBodyCRcut" , 0.7              );
    chain->Set("y12CRcut"       , 0.4              );
    
    ///----------------------------------------------------------------
    /// Trigger Information
    ///----------------------------------------------------------------
    TString trigTypes  = "EF_j360_a10tcem";
    TString trigParams = "jet_AntiKt10LCTopo_pt";
    TString trigCuts   = "450000.";               /// NEEDS TO BE IN MEV
    TString trigLumis  = "5725.04";               /// UPDATE ME!
    
    chain->Set("TRIGTYPES"      , trigTypes      );
    chain->Set("TRIGPARAM"      , trigParams     );
    chain->Set("TRIGCUT"        , trigCuts       );
    chain->Set("TRIGLUMI"       , trigLumis      );
    
    ///----------------------------------------------------------------
    /// Luminosity for trigger weighting
    ///----------------------------------------------------------------
    Float_t lumiVal = 5725.04;
    
    chain->Set("LUMI"           , lumiVal        );
    
    chain->Write();

    if (chain->Exists("GRL")) WriteGRLObject(chain->String("GRL"));  
  
		
	

    ///----------------------------------------------------------------
    /// ProofAna global Config object
    ///----------------------------------------------------------------
    Config* confProofAna = new Config("ProofAna");
    
    confProofAna->Set("DEBUG"          , false        );  // "false", 0, "0" etc. also works
    confProofAna->Set("SAVETIMERS"     , false        );  // ProofAna timer histos in output file 
    confProofAna->Set("IDENTIFIER"     , identifier   );
    confProofAna->Set("DATASET"        , dataset      );
    confProofAna->Set("OUTPUTPATH"     , path         );
    confProofAna->Set("EVENTBUILDER"   , eventbuilder );
    if (!doHists) 
      confProofAna->Set("MERGE"        , false        );     // enable dataset mode
    
    ///----------------------------------------------------------------
    /// Read information used in MC weighting, multi-dataset jobs
    ///----------------------------------------------------------------
    ReadDatasetInfo(dataset  , confProofAna  ); 
    WriteGroomedPRWO(options , "EF_j360_a10tcem_PeriodB" );
    confProofAna->Write();  
    options->Close();
    delete options;


    cout << "All setup, ready to go " << endl;    
    // Decide to run local or on the cluster
    if (mode.CompareTo("local") == 0) runLocal(dataset, treename);
    else if(mode.CompareTo("lite")==0||mode.CompareTo("cluster")==0) 
      runProof(url,dataset,-1,treename);
    else if(mode.CompareTo("grid")==0){
      TString gridname = "user."+gridusername+"."+identifier;
      cout << "submitting with gridname " << gridname << endl;
      runGrid(gridname);
    }   
    gSystem->Unlink("options.root");
}
Exemplo n.º 10
0
int main( )
{
    printf( "<== HOLODECK INTERCEPT TESTER 1.0 ==>\n\n" );
    
    getInterceptionDisablers( );
	
	disableInterception( );
	loadLibraries( );
	enableInterception( );
    
    BOOL bSuccess = TRUE;

	// Vaibhav's Functions...

    bSuccess *= printFunctionResult( My_HeapUnlock( ), "HeapUnlock" );

	bSuccess *= printFunctionResult( My_HeapValidate( ), "HeapValidate" );
    bSuccess *= printFunctionResult( My_ioctlsocket( ), "ioctlsocket" );
    bSuccess *= printFunctionResult( My_LoadLibraryA( ), "LoadLibraryA" );
    bSuccess *= printFunctionResult( My_LoadLibraryExA( ), "LoadLibraryExA" );
    bSuccess *= printFunctionResult( My_LoadLibraryExW( ), "LoadLibraryExW" );
    bSuccess *= printFunctionResult( My_LoadLibraryW( ), "LoadLibraryW" );
    bSuccess *= printFunctionResult( My_LocalAlloc( ),"LocalAlloc" );
    bSuccess *= printFunctionResult( My_LocalFree( ),"LocalFree" );
    bSuccess *= printFunctionResult( My_LocalReAlloc( ),"LocalReAlloc" );
    bSuccess *= printFunctionResult( My_MapUserPhysicalPages( ),"MapUserPhysicalPages" );
    bSuccess *= printFunctionResult( My_MapUserPhysicalPagesScatter( ),"MapUserPhysicalPagesScatter" );
    bSuccess *= printFunctionResult( My_MapViewOfFile( ),"MapViewOfFile" );
    bSuccess *= printFunctionResult( My_MapViewOfFileEx( ),"MapViewOfFileEx" );
    bSuccess *= printFunctionResult( My_MoveFileA( ),"MoveFileA" );
    bSuccess *= printFunctionResult( My_MoveFileExA( ),"MoveFileExA" );
    bSuccess *= printFunctionResult( My_MoveFileExW( ),"MoveFileExW" );
    bSuccess *= printFunctionResult( My_MoveFileW( ),"MoveFileW" );
    bSuccess *= printFunctionResult( My_MoveFileWithProgressA( ),"MoveFileWithProgressA" );
    bSuccess *= printFunctionResult( My_MoveFileWithProgressW( ),"MoveFileWithProgressW" );
    bSuccess *= printFunctionResult( My_ReadFile ( ),"ReadFile" );
    bSuccess *= printFunctionResult( My_ReadFileEx ( ),"ReadFileEx" );
    bSuccess *= printFunctionResult( My_ReadFileScatter ( ),"ReadFileScatter" );
    bSuccess *= printFunctionResult( My_recv ( ),"recv" );
    bSuccess *= printFunctionResult( My_RegCloseKey ( ),"RegCloseKey" ); 
    bSuccess *= printFunctionResult( My_RegConnectRegistryA ( ),"RegConnectRegistryA" );  
    bSuccess *= printFunctionResult( My_RegConnectRegistryW ( ),"RegConnectRegistryW" );
    bSuccess *= printFunctionResult( My_RegCreateKeyA ( ),"RegCreateKeyA" );
    bSuccess *= printFunctionResult( My_RegCreateKeyExA ( ),"RegCreateKeyExA" );
    bSuccess *= printFunctionResult( My_RegCreateKeyExW ( ),"RegCreateKeyExW" );
    bSuccess *= printFunctionResult( My_RegCreateKeyW ( ),"RegCreateKeyW" );
    bSuccess *= printFunctionResult( My_RegDeleteKeyA ( ),"RegDeleteKeyA" );
    bSuccess *= printFunctionResult( My_RegDeleteKeyW ( ),"RegDeleteKeyW" );
    bSuccess *= printFunctionResult( My_RegDeleteValueA ( ),"RegDeleteValueA" );
    bSuccess *= printFunctionResult( My_RegDeleteValueW ( ),"RegDeleteValueW" );
    bSuccess *= printFunctionResult( My_RegDisablePredefinedCache ( ),"RegDisablePredefinedCache" );
    bSuccess *= printFunctionResult( My_RegEnumKeyA ( ),"RegEnumKeyA" ); 
    bSuccess *= printFunctionResult( My_RegEnumKeyExA ( ),"RegEnumKeyExA" );
    bSuccess *= printFunctionResult( My_RegEnumKeyExW ( ),"RegEnumKeyExW" );
    bSuccess *= printFunctionResult( My_RegEnumKeyW ( ),"RegEnumKeyW" );
    bSuccess *= printFunctionResult( My_RegEnumValueA ( ),"RegEnumValueA" );
    bSuccess *= printFunctionResult( My_RegEnumValueW ( ),"RegEnumValueW" );
    bSuccess *= printFunctionResult( My_RegFlushKey ( ),"RegFlushKey" );
    bSuccess *= printFunctionResult( My_RegGetKeySecurity ( ),"RegGetKeySecurity" );
    bSuccess *= printFunctionResult( My_RegLoadKeyA ( ),"RegLoadKeyA" );
    bSuccess *= printFunctionResult( My_RegLoadKeyW ( ),"RegLoadKeyW" );
    bSuccess *= printFunctionResult( My_RegNotifyChangeKeyValue ( ),"RegNotifyChangeKeyValue" );
    bSuccess *= printFunctionResult( My_RegOpenCurrentUser ( ),"RegOpenCurrentUser" );
    bSuccess *= printFunctionResult( My_RegOpenKeyA ( ),"RegOpenKeyA" );
    bSuccess *= printFunctionResult( My_RegOpenKeyExA ( ),"RegOpenKeyExA" );
    bSuccess *= printFunctionResult( My_RegOpenKeyExW ( ),"RegOpenKeyExW" );
    bSuccess *= printFunctionResult( My_RegOpenKeyW ( ),"RegOpenKeyW" );
    bSuccess *= printFunctionResult( My_RegOpenUserClassesRoot ( ),"RegOpenUserClassesRoot " );
	
	/// TERRY'S FUNCTIONS ///

    bSuccess *= printFunctionResult( My_AllocateUserPhysicalPages( ), "AllocateUserPhysicalPages" );

	bSuccess *= printFunctionResult( My_bind( ), "bind" );

	bSuccess *= printFunctionResult( My_connect( ), "connect" );

	bSuccess *= printFunctionResult( My_CopyFileA( ), "CopyFileA" );

	bSuccess *= printFunctionResult( My_CopyFileW( ), "CopyFileW" );
	
	bSuccess *= printFunctionResult( My_CopyFileExA( ), "CopyFileExA" );

	bSuccess *= printFunctionResult( My_CopyFileExW( ), "CopyFileExW" );

	bSuccess *= printFunctionResult( My_CreateDirectoryA( ), "CreateDirectoryA" );

	bSuccess *= printFunctionResult( My_CreateDirectoryW( ), "CreateDirectoryW" );

	bSuccess *= printFunctionResult( My_CreateDirectoryExA( ), "CreateDirectoryExA" );

	bSuccess *= printFunctionResult( My_CreateDirectoryExW( ), "CreateDirectoryExW" );

	bSuccess *= printFunctionResult( My_CreateFileA( ), "CreateFileA" );

	bSuccess *= printFunctionResult( My_CreateFileW( ), "CreateFileW" );
	
	bSuccess *= printFunctionResult( My_CreateProcessA( ), "CreateProcessA" );

	bSuccess *= printFunctionResult( My_CreateProcessW( ), "CreateProcessW" );

	bSuccess *= printFunctionResult( My_CreateProcessA( ), "DeleteFileA" );

	bSuccess *= printFunctionResult( My_CreateProcessW( ), "DeleteFileW" );

	bSuccess *= printFunctionResult( My_FreeLibrary( ), "FreeLibrary" );

	bSuccess *= printFunctionResult( My_FlushFileBuffers( ), "FlushFileBuffers" );

	bSuccess *= printFunctionResult( My_FreeLibraryAndExitThread( ), "FreeLibraryAndExitThread" );

	bSuccess *= printFunctionResult( My_FreeUserPhysicalPages( ), "FreeUserPhysicalPages" );

	bSuccess *= printFunctionResult( My_GetBinaryTypeA( ), "GetBinaryTypeA" );

	bSuccess *= printFunctionResult( My_GetBinaryTypeW( ), "GetBinaryTypeW" );

	bSuccess *= printFunctionResult( My_GetCurrentDirectoryA( ), "GetCurrentDirectoryA" );

	bSuccess *= printFunctionResult( My_GetCurrentDirectoryW( ), "GetCurrentDirectoryW" );

	bSuccess *= printFunctionResult( My_GetDiskFreeSpaceA( ), "GetDiskFreeSpaceA" );
	
	bSuccess *= printFunctionResult( My_GetDiskFreeSpaceW( ), "GetDiskFreeSpaceW" );

	bSuccess *= printFunctionResult( My_GetDiskFreeSpaceExA( ), "GetDiskFreeSpaceExA" );

	bSuccess *= printFunctionResult( My_GetDiskFreeSpaceExW( ), "GetDiskFreeSpaceExW" );

	bSuccess *= printFunctionResult( My_GetDriveTypeA( ), "GetDriveTypeA" );

	bSuccess *= printFunctionResult( My_GetDriveTypeW( ), "GetDriveTypeW" );

	bSuccess *= printFunctionResult( My_GetFileAttributesA( ), "GetFileAttributesA" );

	bSuccess *= printFunctionResult( My_GetFileAttributesW( ), "GetFileAttributesW" );

	bSuccess *= printFunctionResult( My_GetFileAttributesW( ), "GetFileAttributesExA" );

	bSuccess *= printFunctionResult( My_GetFileAttributesW( ), "GetFileAttributesExW" );

	bSuccess *= printFunctionResult( My_GetFileInformationByHandle( ), "GetFileInformationByHandle" );

	bSuccess *= printFunctionResult( My_GetFileSize( ), "GetFileSize" );

	bSuccess *= printFunctionResult( My_GetFileSize( ), "GetFileSizeEx" );

	bSuccess *= printFunctionResult( My_GetLogicalDriveStringsA( ), "GetLogicalDriveStringsA" );

	bSuccess *= printFunctionResult( My_GetLogicalDriveStringsW( ), "GetLogicalDriveStringsW" );

	bSuccess *= printFunctionResult( My_GetLogicalDriveStringsW( ), "GetLogicalDriveStringsW" );

	bSuccess *= printFunctionResult( My_GlobalAlloc( ), "GlobalAlloc" );

	bSuccess *= printFunctionResult( My_GlobalMemoryStatus( ), "GlobalMemoryStatus" );

	bSuccess *= printFunctionResult( My_GlobalMemoryStatusEx( ), "GlobalMemoryStatusEx" );

	bSuccess *= printFunctionResult( My_HeapAlloc( ), "HeapAlloc" );

	bSuccess *= printFunctionResult( My_HeapCompact( ), "HeapCompact" );

	bSuccess *= printFunctionResult( My_HeapCreate( ), "HeapCreate" );

	bSuccess *= printFunctionResult( My_HeapDestroy( ), "HeapDestroy" );

	bSuccess *= printFunctionResult( My_HeapFree( ), "HeapFree" );

	bSuccess *= printFunctionResult( My_HeapReAlloc( ), "HeapReAlloc" );

	bSuccess *= printFunctionResult( My_HeapSize( ), "HeapSize" );

	
	// Jessica's Functions...

		bSuccess *= printFunctionResult( My_RegOverridePredefKey(), "RegOverridePredefKey");
	bSuccess *= printFunctionResult( My_RegQueryInfoKeyA(), "RegQueryInfoKeyA");
	bSuccess *= printFunctionResult( My_RegQueryInfoKeyW(), "RegQueryInfoKeyW"); 
	
	bSuccess *= printFunctionResult(My_RegQueryMultipleValuesA(), "RegQueryMultipleValuesA");
	bSuccess *= printFunctionResult(My_RegQueryMultipleValuesW(), "RegQueryMultipleValuseW"); 
	
	bSuccess *= printFunctionResult(My_RegQueryValueA(), "RegQueryValueA");
	bSuccess *= printFunctionResult(My_RegQueryValueExA(), "RegQueryValueExA");
	bSuccess *= printFunctionResult(My_RegQueryValueExW(), "RegQueryValueExW");
	bSuccess *= printFunctionResult(My_RegQueryValueW(), "RegQueryValueW");
	bSuccess *= printFunctionResult(My_RegReplaceKeyA(), "RegReplaceKeyA");
	bSuccess *= printFunctionResult(My_RegReplaceKeyW(), "RegReplaceKeyW");
	bSuccess *= printFunctionResult(My_RegRestoreKeyA(), "RegRestoreKeyA");
	bSuccess *= printFunctionResult(My_RegRestoreKeyW(), "RegRestoreKeyW");
	bSuccess *= printFunctionResult(My_RegSaveKeyA(), "RegSaveKeyA");
	bSuccess *= printFunctionResult(My_RegSaveKeyExW(), "RegSaveKeyExW");
	bSuccess *= printFunctionResult(My_RegSaveKeyW(), "RegSaveKeyW");
	bSuccess *= printFunctionResult(My_RegSetKeySecurity(), "RegSetKeySecurity");
	bSuccess *= printFunctionResult(My_RegSetValueA(), "RegSetValueA");
	bSuccess *= printFunctionResult(My_RegSetValueExA(), "RegSetValueExA");
	bSuccess *= printFunctionResult(My_RegSetValueExW(), "RegSetValueExW");
	bSuccess *= printFunctionResult(My_RegSetValueW(), "RegSetValueW");
	bSuccess *= printFunctionResult(My_RegUnLoadKeyA(), "RegUnLoadKeyA");
	bSuccess *= printFunctionResult(My_RegUnLoadKeyW(), "RegUnLoadKeyW");
	bSuccess *= printFunctionResult(My_RemoveDirectoryA(), "RemoveDirectoryA");
	bSuccess *= printFunctionResult(My_RemoveDirectoryW(), "RemoveDirectoryW");
	bSuccess *= printFunctionResult(My_ReplaceFileA(), "ReplaceFileA");
	bSuccess *= printFunctionResult(My_ReplaceFileW(), "ReplaceFileW");
	bSuccess *= printFunctionResult(My_SearchPathA(), "SearchPathA");
	bSuccess *= printFunctionResult(My_SearchPathW(), "SearchPathW");
	bSuccess *= printFunctionResult(My_select(), "select");
	bSuccess *= printFunctionResult(My_send(), "send");
	bSuccess *= printFunctionResult(My_SetFileAttributesA(), "SetFileAttributesA");
	bSuccess *= printFunctionResult(My_SetFileAttributesW(), "SetFileAttributesW");
	bSuccess *= printFunctionResult(My_socket(), "socket");
	bSuccess *= printFunctionResult(My_VirtualAlloc(), "VirtualAlloc");
	bSuccess *= printFunctionResult(My_VirtualAllocEx(), "VirtualAllocEx");
	bSuccess *= printFunctionResult(My_VirtualFree(), "VirtualFree");
	bSuccess *= printFunctionResult(My_VirtualFreeEx(), "VirtualFreeEx");
	bSuccess *= printFunctionResult(My_VirtualLock(), "VirtualLock");
	bSuccess *= printFunctionResult(My_VirtualQuery(), "VirtualQuery");
	bSuccess *= printFunctionResult(My_VirtualQueryEx(), "VirtualQueryEx");
	bSuccess *= printFunctionResult(My_VirtualUnlock(), "VirtualUnlock");
	bSuccess *= printFunctionResult(My_WriteFile(), "WriteFile");
	bSuccess *= printFunctionResult(My_WriteFileEx(), "WriteFileEx");
	bSuccess *= printFunctionResult(My_WriteFileGather(), "WriteFileGather");
	bSuccess *= printFunctionResult(My_WSAConnect(), "WSAConnect");
	bSuccess *= printFunctionResult(My_WSAEventSelect(), "WSAEventSelect");
	bSuccess *= printFunctionResult(My_WSAIoctl(), "WSAIoctl");
	bSuccess *= printFunctionResult(My_WSARecv(), "WSARecv");
	bSuccess *= printFunctionResult(My_WSASend(), "WSASend");
	bSuccess *= printFunctionResult(My_WSASocketA(), "WSASocketA");
	bSuccess *= printFunctionResult(My_WSASocketW(), "WSASocketW");
	bSuccess *= printFunctionResult(My_WSAStartup(), "WSAStartup");

	// Terry new functions

	bSuccess *= printFunctionResult(My_SetFilePointerEx(), "SetFilePointerEx");
	bSuccess *= printFunctionResult(My_SetFileShortNameA(), "SetFileShortNameA");
	bSuccess *= printFunctionResult(My_SetFileShortNameW(), "SetFileShortNameW");
	bSuccess *= printFunctionResult(My_SetFileTime(), "SetFileTime");
	bSuccess *= printFunctionResult(My_SetFileValidData(), "SetFileValidData");
	bSuccess *= printFunctionResult(My_SetEndOfFile(), "SetEndOfFile");
	bSuccess *= printFunctionResult(My_SetLastError(), "SetLastError");
	bSuccess *= printFunctionResult(My_SetPriorityClass(), "SetPriorityClass");
	bSuccess *= printFunctionResult(My_SetProcessShutdownParameters(), "SetProcessShutdownParameters");
	bSuccess *= printFunctionResult(My_SetProcessWorkingSetSize(), "SetProcessWorkingSetSize");
	bSuccess *= printFunctionResult(My_TerminateProcess(), "TerminateProcess");
	bSuccess *= printFunctionResult(My_TerminateThread(), "TerminateThread");
	bSuccess *= printFunctionResult(My_TlsAlloc(), "TlsAlloc");
	bSuccess *= printFunctionResult(My_TlsFree(), "TlsFree");
	bSuccess *= printFunctionResult(My_TlsGetValue(), "TlsGetValue");
	bSuccess *= printFunctionResult(My_TlsSetValue(), "TlsSetValue");
	bSuccess *= printFunctionResult(My_UnlockFile(), "UnlockFile");
	bSuccess *= printFunctionResult(My_UnlockFileEx(), "UnlockFileEx");
	bSuccess *= printFunctionResult(My_VirtualProtect(), "VirutalProtect");
	bSuccess *= printFunctionResult(My_VirtualProtectEx(), "VirutalProtectEx");
	bSuccess *= printFunctionResult(My_WriteProcessMemory(), "WriteProcessMemory");
	bSuccess *= printFunctionResult(My__hread(), "_hread");
	bSuccess *= printFunctionResult(My__hwrite(), "_hwrite");
	bSuccess *= printFunctionResult(My__lclose(), "_lclose");
	bSuccess *= printFunctionResult(My__lcreat(), "_lcreat");
	bSuccess *= printFunctionResult(My__llseek(), "_llseek");
	bSuccess *= printFunctionResult(My__lopen(), "_lopen");
	bSuccess *= printFunctionResult(My__lread(), "_lread");
	bSuccess *= printFunctionResult(My__lwrite(), "_lwrite");
	bSuccess *= printFunctionResult(My_BackupEventLogA(), "BackupEventLogA");
	bSuccess *= printFunctionResult(My_BackupEventLogW(), "BackupEventLogW");
	bSuccess *= printFunctionResult(My_ClearEventLogA(), "ClearEventLogA");
	bSuccess *= printFunctionResult(My_ClearEventLogW(), "ClearEventLogW");
	bSuccess *= printFunctionResult(My_CloseEventLog(), "CloseEventLog");
	bSuccess *= printFunctionResult(My_CreateProcessAsUserA(), "CreateProcessAsUserA");
	bSuccess *= printFunctionResult(My_CreateProcessAsUserW(), "CreateProcessAsUserW");
	bSuccess *= printFunctionResult(My_CreateProcessWithLogonW(), "CreateProcessWithLogonW");
	bSuccess *= printFunctionResult(My_DecryptFileA(), "DecryptFileA");
	bSuccess *= printFunctionResult(My_DecryptFileW(), "DecryptFileW");
	bSuccess *= printFunctionResult(My_EncryptFileA(), "EncryptFileA");
	bSuccess *= printFunctionResult(My_EncryptFileW(), "EncryptFileW");
	bSuccess *= printFunctionResult(My_FileEncryptionStatusA(), "FileEncryptionStatusA");
	bSuccess *= printFunctionResult(My_FileEncryptionStatusW(), "FileEncryptionStatusW");
	bSuccess *= printFunctionResult(My_GetFileSecurityA(), "GetFileSecurityA");
	bSuccess *= printFunctionResult(My_GetFileSecurityW(), "GetFileSecurityW");
	bSuccess *= printFunctionResult(My_OpenBackupEventLogA(), "OpenBackupEventLogA");
	bSuccess *= printFunctionResult(My_OpenBackupEventLogW(), "OpenBackupEventLogW");
	bSuccess *= printFunctionResult(My_OpenEventLogA(), "OpenEventLogA");
	bSuccess *= printFunctionResult(My_OpenEventLogW(), "OpenEventLogW");
	bSuccess *= printFunctionResult(My_QueryUsersOnEncryptedFile(), "QueryUsersOnEncryptedFile");
	bSuccess *= printFunctionResult(My_RemoveUsersFromEncryptedFile(), "RemoveUsersFromEncryptedFile");
	bSuccess *= printFunctionResult(My_SaferRecordEventLogEntry(), "SaferRecordEventLogEntry");
	bSuccess *= printFunctionResult(My_SetFileSecurityA(), "SetFileSecurityA");
	bSuccess *= printFunctionResult(My_SetFileSecurityW(), "SetFileSecurityW");
	bSuccess *= printFunctionResult(My_WSAAccept(), "WSAAccept");
	bSuccess *= printFunctionResult(My_WSAAsyncGetHostByAddr(), "WSAAsyncGetHostByAddr");
	bSuccess *= printFunctionResult(My_WSAAsyncGetHostByName(), "WSAAsyncGetHostByName");
	bSuccess *= printFunctionResult(My_WSAAsyncGetServByName(), "WSAAsyncGetServByName");
	bSuccess *= printFunctionResult(My_WSAAsyncGetServByPort(), "WSAAsyncGetServByPort");
	bSuccess *= printFunctionResult(My_WSAAsyncSelect(), "WSAAsyncSelect");
	bSuccess *= printFunctionResult(My_WSACancelAsyncRequest(), "WSACancelAsyncRequest");
	bSuccess *= printFunctionResult(My_WSACleanup(), "WSACleanup");
	bSuccess *= printFunctionResult(My_WSAProviderConfigChange(), "WSAProviderConfigChange");
	bSuccess *= printFunctionResult(My_WSADuplicateSocketA(), "WSADuplicateSocketA");
	bSuccess *= printFunctionResult(My_WSADuplicateSocketW(), "WSADuplicateSocketW");
	bSuccess *= printFunctionResult(My_WSAGetLastError(), "WSAGetLastError");
	bSuccess *= printFunctionResult(My_WSAJoinLeaf(), "WSAJoinLeaf");
	bSuccess *= printFunctionResult(My_WSARecvDisconnect(), "WSARecvDisconnect");
	bSuccess *= printFunctionResult(My_WSARecvFrom(), "WSARecvFrom");
	bSuccess *= printFunctionResult(My_WSASendDisconnect(), "WSASendDisconnect");
	bSuccess *= printFunctionResult(My_WSASendTo(), "WSASendTo");
	bSuccess *= printFunctionResult(My_WSASetLastError(), "WSASetLastError");
	bSuccess *= printFunctionResult(My_accept(), "accept");
	bSuccess *= printFunctionResult(My_gethostbyaddr(), "gethostbyaddr");
	bSuccess *= printFunctionResult(My_gethostbyname(), "gethostbyname");
	bSuccess *= printFunctionResult(My_getsockopt(), "getsockopt");
	bSuccess *= printFunctionResult(My_listen(), "listen");
	bSuccess *= printFunctionResult(My_recvfrom(), "recvfrom");
	bSuccess *= printFunctionResult(My_sendto(), "sendto");
	bSuccess *= printFunctionResult(My_setsockopt(), "setsockopt");
	bSuccess *= printFunctionResult(My_shutdown(), "shutdown");
	
	
	bSuccess *= printFunctionResult(My_LocalFileTimeToFileTime(), "LocalFileTimeToFileTime");
	bSuccess *= printFunctionResult(My_NtQuerySystemTime(), "NtQuerySystemTime");
	bSuccess *= printFunctionResult(My_QueryPerformanceCounter(), "QueryPerformanceCounter");
	bSuccess *= printFunctionResult(My_QueryPerformanceFrequency(), "QueryPerformanceFrequency");
	bSuccess *= printFunctionResult(My_RtlLocalTimeToSystemTime(), "RtlLocalTimeToSystemTime");
	bSuccess *= printFunctionResult(My_SetLocalTime(), "SetLocalTime");
	bSuccess *= printFunctionResult(My_SetSystemTime(), "SetSystemTime");
	bSuccess *= printFunctionResult(My_SetSystemTimeAdjustment(), "SetSystemTimeAdjustment");
	bSuccess *= printFunctionResult(My_SetTimeZoneInformation(), "SetTimeZoneInformation");
	bSuccess *= printFunctionResult(My_SystemTimeToFileTime(), "SystemTimeToFileTime");
	bSuccess *= printFunctionResult(My_SystemTimeToTzSpecificLocalTime(), "SystemTimeToTzSpecificLocalTime");
	bSuccess *= printFunctionResult(My_TzSpecificLocalTimeToSystemTime(), "TzSpecificLocalTimeToSystemTime");

	 bSuccess *= printFunctionResult( My_AllocConsole( ),"AllocConsole");
    bSuccess *= printFunctionResult( My_AreFileApisANSI( ),"AreFileApisANSI");
    bSuccess *= printFunctionResult(My_AttachConsole( ), "AttachConsole");
    bSuccess *= printFunctionResult(My_BackupRead( ), "BackupRead");
    bSuccess *= printFunctionResult(My_BackupSeek( ), "BackupSeek");
    bSuccess *= printFunctionResult(My_BackupWrite( ), "BackupWrite");
    bSuccess *= printFunctionResult(My_CancelIo( ), "CancelIo");
    bSuccess *= printFunctionResult(My_CloseHandle( ), "CloseHandle");
    bSuccess *= printFunctionResult(My_CreateFileMappingA( ), "CreateFileMappingA");
    bSuccess *= printFunctionResult(My_CreateFileMappingW( ), "CreateFileMappingW");
    bSuccess *= printFunctionResult(My_CreateHardLinkA( ), "CreateHardLinkA");
    bSuccess *= printFunctionResult(My_CreateHardLinkW( ), "CreateHardLinkW");
    
    bSuccess *= printFunctionResult(My_DebugActiveProcess( ), "DebugActiveProcess");
    bSuccess *= printFunctionResult(My_ContinueDebugEvent( ), "ContinueDebugEvent");
    bSuccess *= printFunctionResult(My_DebugActiveProcessStop( ), "DebugActiveProcessStop");
    bSuccess *= printFunctionResult(My_DebugBreakProcess( ), "DebugBreakProcess");
    bSuccess *= printFunctionResult(My_DebugSetProcessKillOnExit( ), "DebugSetProcessKillOnExit");
    bSuccess *= printFunctionResult(My_DisableThreadLibraryCalls( ), "DisableThreadLibraryCalls");
    bSuccess *= printFunctionResult(My_DnsHostnameToComputerNameA( ), "DnsHostnameToComputerNameA");
    bSuccess *= printFunctionResult(My_DnsHostnameToComputerNameW( ), "DnsHostnameToComputerNameW");
    bSuccess *= printFunctionResult(My_FindFirstFileA( ), "FindFirstFileA");
    bSuccess *= printFunctionResult(My_FindFirstFileW( ), "FindFirstFileW");
    bSuccess *= printFunctionResult(My_FindFirstFileExA( ), "FindFirstFileExA");
    bSuccess *= printFunctionResult(My_FindFirstFileExW( ), "FindFirstFileExW");
    bSuccess *= printFunctionResult(My_FindNextFileA( ), "FindNextFileA");
    bSuccess *= printFunctionResult(My_FindNextFileW( ), "FindNextFileW");
    bSuccess *= printFunctionResult(My_GetBinaryType( ), "GetBinaryType");
    bSuccess *= printFunctionResult(My_GetCompressedFileSizeA( ), "GetCompressedFileSizeA");
    bSuccess *= printFunctionResult(My_GetCompressedFileSizeW( ), "GetCompressedFileSizeW");
    bSuccess *= printFunctionResult(My_GetExitCodeProcess( ), "GetExitCodeProcess");
    bSuccess *= printFunctionResult(My_GetExitCodeThread( ), "GetExitCodeThread");
    bSuccess *= printFunctionResult(My_GetFullPathNameA( ), "GetFullPathNameA");
    bSuccess *= printFunctionResult(My_GetFullPathNameW( ), "GetFullPathNameW");
    bSuccess *= printFunctionResult(My_GetProcessHeap( ), "GetProcessHeap");
    bSuccess *= printFunctionResult(My_GetProcessHeaps( ), "GetProcessHeaps");
    bSuccess *= printFunctionResult(My_GetProcessIoCounters( ), "GetProcessIoCounters");
    bSuccess *= printFunctionResult(My_GetProcessTimes( ), "GetProcessTimes");
    bSuccess *= printFunctionResult(My_GetProcessWorkingSetSize( ), "GetProcessWorkingSetSize");
    bSuccess *= printFunctionResult(My_GetStartupInfoA( ), "GetStartupInfoA");
    bSuccess *= printFunctionResult(My_GetStartupInfoW( ), "GetStartupInfoW");
    bSuccess *= printFunctionResult(My_GetSystemDirectoryA( ), "GetSystemDirectoryA");
    bSuccess *= printFunctionResult(My_GetSystemDirectoryW( ), "GetSystemDirectoryW");
    bSuccess *= printFunctionResult(My_GetSystemWindowsDirectoryA( ), "GetSystemWindowsDirectoryA");
    bSuccess *= printFunctionResult(My_GetSystemWindowsDirectoryW( ), "GetSystemWindowsDirectoryW");
    bSuccess *= printFunctionResult(My_GetWriteWatch( ), "GetWriteWatch");
    bSuccess *= printFunctionResult(My_GlobalMemoryStatus( ), "GlobalMemoryStatus");
    bSuccess *= printFunctionResult(My_GlobalReAlloc( ), "GlobalReAlloc");
    bSuccess *= printFunctionResult(My_LockFile( ), "LockFile");
    bSuccess *= printFunctionResult(My_LockFileEx( ), "LockFileEx");
    bSuccess *= printFunctionResult(My_LZClose( ), "LZClose");
    bSuccess *= printFunctionResult(My_LZCopy( ), "LZCopy");
    bSuccess *= printFunctionResult(My_LZDone( ), "LZDone");
    bSuccess *= printFunctionResult(My_LZRead( ), "LZRead");
    bSuccess *= printFunctionResult(My_LZSeek( ), "LZSeek");
    bSuccess *= printFunctionResult(My_LoadModule ( ), "LoadModule ");
    bSuccess *= printFunctionResult(My_OpenFile ( ), "OpenFile ");
    bSuccess *= printFunctionResult(My_QueryMemoryResourceNotification ( ), "QueryMemoryResourceNotification  ");
    bSuccess *= printFunctionResult(My_ReplaceFile ( ), "ReplaceFile ");
    bSuccess *= printFunctionResult(My_RtlFillMemory  ( ), "RtlFillMemory  ");
    bSuccess *= printFunctionResult(My_RtlMoveMemory  ( ), "RtlMoveMemory  ");
    bSuccess *= printFunctionResult(My_RtlZeroMemory( ), "RtlZeroMemory");
    bSuccess *= printFunctionResult(My_SetFileApisToANSI( ), "SetFileApisToANSI ");
    bSuccess *= printFunctionResult(My_SetFileApisToOEM( ), "SetFileApisToOEM");
    bSuccess *= printFunctionResult(My_SetFilePointer( ), "SetFilePointer");
    bSuccess *= printFunctionResult(My_CompareFileTime( ), "CompareFileTime");
    bSuccess *= printFunctionResult(My_DosDateTimeToFileTime( ), "DosDateTimeToFileTime");
    bSuccess *= printFunctionResult(My_FileTimeToDosDateTime( ), "FileTimeToDosDateTime");
    bSuccess *= printFunctionResult(My_FileTimeToLocalFileTime( ), "FileTimeToLocalFileTime");
    bSuccess *= printFunctionResult(My_FileTimeToSystemTime( ), "FileTimeToSystemTime");
    bSuccess *= printFunctionResult(My_GetFileTime( ), "GetFileTime");
    bSuccess *= printFunctionResult(My_GetLocalTime( ), "GetLocalTime");
    bSuccess *= printFunctionResult(My_GetSystemTime( ), "GetSystemTime");
    bSuccess *= printFunctionResult(My_GetSystemTimeAsFileTime( ), "GetSystemTimeAsFileTime");
    bSuccess *= printFunctionResult(My_GetTickCount( ), "GetTickCount");
    bSuccess *= printFunctionResult(My_GetTimeFormat( ), "GetTimeFormat");
    bSuccess *= printFunctionResult(My_GetTimeZoneInformation( ), "GetTimeZoneInformation");

    bSuccess *= printFunctionResult(My_CreateFiber( ), "CreateFiber");

	bSuccess *= printFunctionResult(My_CreateFiberEx( ), "CreateFiberEx");


    bSuccess *= printFunctionResult(My_LZOpenFileA( ), "LZOpenFileA");

    bSuccess *= printFunctionResult(My_LZOpenFileW( ), "LZOpenFileW");

	bSuccess *= printFunctionResult(My_GetSystemTimeAdjustment( ), "GetSystemTimeAdjustment");

	
	//
    bSuccess *= printFunctionResult(My_CreateToolhelp32Snapshot( ), "CreateToolhelp32Snapshot");
    bSuccess *= printFunctionResult(My_DeleteFiber( ), "DeleteFiber");
    bSuccess *= printFunctionResult(My_CopyLZFile( ), "CopyLZFile");
    bSuccess *= printFunctionResult(My_CreateMemoryResourceNotification( ), "CreateMemoryResourceNotification");
	bSuccess *= printFunctionResult(My_GetFileType( ), "GetFileType");
	bSuccess *= printFunctionResult(My_GetLogicalDrives( ), "GetLogicalDrives");
    
	//// TRY COMPILING WITH NEW FEB 03 SDK
	//bSuccess *= printFunctionResult(My_SaferiIsExecutableFileType(), "SaferiIsExecutableFileType");

	//// TRY COMPILING WITH NEW FEB 03 SDK
	//bSuccess *= printFunctionResult(My_GetSystemTimes( ), "GetSystemTimes ");
	
	//bSuccess *= printFunctionResult(My_RtlTimeToSecondsSince1970(), "RtlTimeToSecondsSince1970");

	//bSuccess *= printFunctionResult(My_ExitProcess( ), "ExitProcess");
    //bSuccess *= printFunctionResult(My_ExitThread( ), "ExitThread");
	//bSuccess *= printFunctionResult(My_DebugBreak( ), "DebugBreak");
	//bSuccess *= printFunctionResult(My_FatalAppExitA( ), "FatalAppExitA");//"FatalAppExitW"not written
    //bSuccess *= printFunctionResult(My_FatalExit( ), "FatalExit");


	//********************************************************************************************
	// Functions added after Release 2.0
	//********************************************************************************************


	bSuccess *= printFunctionResult(My_GetProcAddress(), "GetProcAddress");
	bSuccess *= printFunctionResult(My_GetModuleHandleA(), "GetModuleHandleA");
	bSuccess *= printFunctionResult(My_GetModuleHandleW(), "GetModuleHandleW");
	bSuccess *= printFunctionResult(My_DeviceIoControl(), "DeviceIoControl");
	bSuccess *= printFunctionResult(My_GetVersionExA(), "GetVersionExA");
	bSuccess *= printFunctionResult(My_GetVersionExW(), "GetVersionExW");
	bSuccess *= printFunctionResult(My_GetSystemInfo(), "GetSystemInfo");
	bSuccess *= printFunctionResult(My_GetVolumeInformationA(), "GetVolumeInformationA");
	bSuccess *= printFunctionResult(My_GetVolumeInformationW(), "GetVolumeInformationW");

    
	printf("\n\n");

    if ( bSuccess )
        printf( "===>TEST PASSED!<===\n" );
    else
        printf( "===>TEST FAILED!<===\n" );

    printf( "\n<< PRESS ENTER TO CONTINUE >>\n" );
    getchar( );

    return 0;

}
Exemplo n.º 11
0
OniStatus Context::initialize()
{
	XnBool repositoryOverridden = FALSE;
	XnChar repositoryFromINI[XN_FILE_MAX_PATH] = {0};

	m_initializationCounter++;
	if (m_initializationCounter > 1)
	{
		xnLogVerbose(XN_MASK_ONI_CONTEXT, "Initialize: Already initialized");
		return ONI_STATUS_OK;
	}

	XnStatus rc;

	XnChar strModulePath[XN_FILE_MAX_PATH];
	rc = xnOSGetModulePathForProcAddress(reinterpret_cast<void*>(&dummyFunctionToTakeAddress), strModulePath);
	if (rc != XN_STATUS_OK)
	{
		m_errorLogger.Append("Couldn't get the OpenNI shared library module's path: %s", xnGetStatusString(rc));
		return OniStatusFromXnStatus(rc);
	}

	XnChar strBaseDir[XN_FILE_MAX_PATH];
	rc = xnOSGetDirName(strModulePath, strBaseDir, XN_FILE_MAX_PATH);
	if (rc != XN_STATUS_OK)
	{
		// Very unlikely to happen, but just in case.
		m_errorLogger.Append("Couldn't get the OpenNI shared library module's directory: %s", xnGetStatusString(rc));
		return OniStatusFromXnStatus(rc);
	}

	s_valid = TRUE;

	// Read configuration file

	XnChar strOniConfigurationFile[XN_FILE_MAX_PATH];
	XnBool configurationFileExists = FALSE;

	// Search the module directory for OpenNI.ini.
	xnOSStrCopy(strOniConfigurationFile, strBaseDir, XN_FILE_MAX_PATH);
	rc = xnOSAppendFilePath(strOniConfigurationFile, ONI_CONFIGURATION_FILE, XN_FILE_MAX_PATH);
	if (rc == XN_STATUS_OK)
	{
		xnOSDoesFileExist(strOniConfigurationFile, &configurationFileExists);
	}

#ifdef ONI_PLATFORM_ANDROID_OS
	xnLogSetMaskMinSeverity(XN_LOG_MASK_ALL, (XnLogSeverity)0);
	xnLogSetAndroidOutput(TRUE);
#endif
	
	if (configurationFileExists)
	{
		// First, we should process the log related configuration as early as possible.

		XnInt32 nValue;
		XnChar strLogPath[XN_FILE_MAX_PATH] = {0};

		//Test if log redirection is needed 
		rc = xnOSReadStringFromINI(strOniConfigurationFile, "Log", "LogPath", strLogPath, XN_FILE_MAX_PATH);
		if (rc == XN_STATUS_OK)
		{
			rc = xnLogSetOutputFolder(strLogPath);
			if (rc != XN_STATUS_OK)
			{
				xnLogWarning(XN_MASK_ONI_CONTEXT, "Failed to set log output folder: %s", xnGetStatusString(rc));
			}
			else
			{
				xnLogVerbose(XN_MASK_ONI_CONTEXT, "Log directory redirected to: %s", strLogPath);
			}
		}

		rc = xnOSReadIntFromINI(strOniConfigurationFile, "Log", "Verbosity", &nValue);
		if (rc == XN_STATUS_OK)
		{
			xnLogSetMaskMinSeverity(XN_LOG_MASK_ALL, (XnLogSeverity)nValue);
		}

		rc = xnOSReadIntFromINI(strOniConfigurationFile, "Log", "LogToConsole", &nValue);
		if (rc == XN_STATUS_OK)
		{
			xnLogSetConsoleOutput(nValue == 1);
		}
		
		rc = xnOSReadIntFromINI(strOniConfigurationFile, "Log", "LogToFile", &nValue);
		if (rc == XN_STATUS_OK)
		{
			xnLogSetFileOutput(nValue == 1);
		}

		// Then, process the other device configurations.

		rc = xnOSReadStringFromINI(strOniConfigurationFile, "Device", "Override", m_overrideDevice, XN_FILE_MAX_PATH);
		if (rc != XN_STATUS_OK)
		{
			xnLogVerbose(XN_MASK_ONI_CONTEXT, "No override device in configuration file");
		}

		rc = xnOSReadStringFromINI(strOniConfigurationFile, "Drivers", "Repository", repositoryFromINI, XN_FILE_MAX_PATH);
		if (rc == XN_STATUS_OK)
		{
			repositoryOverridden = TRUE;
		}



		xnLogVerbose(XN_MASK_ONI_CONTEXT, "Configuration has been read from '%s'", strOniConfigurationFile);
	}
	else
	{
		xnLogVerbose(XN_MASK_ONI_CONTEXT, "Couldn't find configuration file '%s'", strOniConfigurationFile);
	}

	xnLogVerbose(XN_MASK_ONI_CONTEXT, "OpenNI %s", ONI_VERSION_STRING);

	// Resolve the drive path based on the module's directory.
	XnChar strDriverPath[XN_FILE_MAX_PATH];
	xnOSStrCopy(strDriverPath, strBaseDir, XN_FILE_MAX_PATH);

	if (repositoryOverridden)
	{
		xnLogVerbose(XN_MASK_ONI_CONTEXT, "Extending the driver path by '%s', as configured in file '%s'", repositoryFromINI, strOniConfigurationFile);
		rc = xnOSAppendFilePath(strDriverPath, repositoryFromINI, XN_FILE_MAX_PATH);
	}
	else
	{
		rc = xnOSAppendFilePath(strDriverPath, ONI_DEFAULT_DRIVERS_REPOSITORY, XN_FILE_MAX_PATH);
	}

	if (rc != XN_STATUS_OK)
	{
		m_errorLogger.Append("The driver path gets too long");
		return OniStatusFromXnStatus(rc);
	}

	xnLogVerbose(XN_MASK_ONI_CONTEXT, "Using '%s' as driver path", strDriverPath);
	rc = loadLibraries(strDriverPath);

	if (rc == XN_STATUS_OK)
	{
		m_errorLogger.Clear();
	}

	return OniStatusFromXnStatus(rc);
}
Exemplo n.º 12
0
OniStatus Context::initialize()
{
	XnBool repositoryOverridden = FALSE;
	XnChar repositoryFromINI[XN_FILE_MAX_PATH] = {0};

	m_initializationCounter++;
	if (m_initializationCounter > 1)
	{
		xnLogVerbose(XN_LOG_MASK_ALL, "Initialize: Already initialized");
		return ONI_STATUS_OK;
	}

	XnStatus rc;

	rc = m_newFrameAvailableEvent.Create(FALSE);
	if (rc != XN_STATUS_OK)
	{
		m_errorLogger.Append("Couldn't create event for new frames: %s", xnGetStatusString(rc));
		return ONI_STATUS_ERROR;
	}

	s_valid = TRUE;

	// Read configuration file

	XnBool configurationFileExists = FALSE;
	rc = xnOSDoesFileExist(ONI_CONFIGURATION_FILE, &configurationFileExists);
	if (configurationFileExists)
	{
		rc = xnOSReadStringFromINI(ONI_CONFIGURATION_FILE, "Device", "Override", m_overrideDevice, XN_FILE_MAX_PATH);
		if (rc != XN_STATUS_OK)
		{
			xnLogVerbose(XN_LOG_MASK_ALL, "No override device in configuration file");
		}

		XnInt32 nValue;
		rc = xnOSReadIntFromINI(ONI_CONFIGURATION_FILE, "Log", "Verbosity", &nValue);
		if (rc == XN_STATUS_OK)
		{
			xnLogSetMaskMinSeverity(XN_LOG_MASK_ALL, (XnLogSeverity)nValue);
		}

		rc = xnOSReadIntFromINI(ONI_CONFIGURATION_FILE, "Log", "LogToConsole", &nValue);
		if (rc == XN_STATUS_OK)
		{
			xnLogSetConsoleOutput(nValue == 1);
		}
		rc = xnOSReadIntFromINI(ONI_CONFIGURATION_FILE, "Log", "LogToFile", &nValue);
		if (rc == XN_STATUS_OK)
		{
			xnLogSetFileOutput(nValue == 1);
		}
		rc = xnOSReadStringFromINI(ONI_CONFIGURATION_FILE, "Drivers", "Repository", repositoryFromINI, XN_FILE_MAX_PATH);
		if (rc == XN_STATUS_OK)
		{
			repositoryOverridden = TRUE;
		}
	}
	else
	{
		xnLogVerbose(XN_LOG_MASK_ALL, "Couldn't find configuration file '%s'", ONI_CONFIGURATION_FILE);
	}

	xnLogVerbose(XN_LOG_MASK_ALL, "OpenNI %s", ONI_VERSION_STRING);

	// Use path specified in ini file
	if (repositoryOverridden)
	{
		xnLogVerbose(XN_LOG_MASK_ALL, "Using '%s' as driver path, as configured in file '%s'", repositoryFromINI, ONI_CONFIGURATION_FILE);
		rc = loadLibraries(repositoryFromINI);
		return OniStatusFromXnStatus(rc);
	}

	xnLogVerbose(XN_LOG_MASK_ALL, "Using '%s' as driver path", ONI_DEFAULT_DRIVERS_REPOSITORY);
	// Use default path
	rc = loadLibraries(ONI_DEFAULT_DRIVERS_REPOSITORY);
	if (rc != XN_STATUS_OK)
	{
		// Can't find through default - try environment variable
		xnLogVerbose(XN_LOG_MASK_ALL, "Can't load drivers from default directory '%s'.", ONI_DEFAULT_DRIVERS_REPOSITORY);

		char dirName[XN_FILE_MAX_PATH];
		XnStatus envrc = xnOSGetEnvironmentVariable(ONI_ENV_VAR_DRIVERS_REPOSITORY, dirName, XN_FILE_MAX_PATH);
		if (envrc == XN_STATUS_OK)
		{
			xnLogVerbose(XN_LOG_MASK_ALL, "Using '%s' as driver path, as configured by environment variable '%s'", dirName, ONI_ENV_VAR_DRIVERS_REPOSITORY);
			rc = loadLibraries(dirName);
		}
	}

	if (rc == XN_STATUS_OK)
	{
		m_errorLogger.Clear();
	}

	return OniStatusFromXnStatus(rc);
}
Exemplo n.º 13
0
/**
	MainWindow represents, not surprisingly, the main window of the application.
	It handles all the menu items and the UI.
*/
MainWindow::MainWindow( ) : QMainWindow( 0 )
{
  setupUi(this);
  
  // add the file dropdown to the toolbar...can't do this in Designer for some reason
  QWidget *stretch = new QWidget(toolBar);
  stretch->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
  toolBar->addWidget(stretch);
  currentFileDropDown = new QComboBox(toolBar);
  currentFileDropDown->setSizeAdjustPolicy(QComboBox::AdjustToContents);
  toolBar->addWidget(currentFileDropDown);
  QWidget *pad = new QWidget(toolBar); // this doesn't pad as much as it should...to be fixed...
  toolBar->addWidget(pad);
  
  //initialization
  buildLog = new BuildLog();
  highlighter = new Highlighter( editor->document() );
  prefs = new Preferences(this);
  projInfo = new ProjectInfo(this);
  uploader = new Uploader(this);
  builder = new Builder(this, projInfo, buildLog);
  usbConsole = new UsbConsole();
  findReplace = new FindReplace(this);
  about = new About();
  updater = new AppUpdater();
  
  // load
  boardTypeGroup = new QActionGroup(menuBoard_Type);
  loadBoardProfiles( );
  loadExamples( );
  loadLibraries( );
  loadRecentProjects( );
  readSettings( );
  
  // misc. signals
  connect(editor, SIGNAL(cursorPositionChanged()), this, SLOT(onCursorMoved()));
  connect(actionPreferences, SIGNAL(triggered()), prefs, SLOT(loadAndShow()));
  connect(actionUsb_Monitor, SIGNAL(triggered()), usbConsole, SLOT(loadAndShow()));
  connect(currentFileDropDown, SIGNAL(currentIndexChanged(int)), this, SLOT(onFileSelection(int)));
  connect(editor->document(), SIGNAL(contentsChanged()),this, SLOT(onDocumentModified()));
  connect(outputConsole, SIGNAL(itemDoubleClicked(QListWidgetItem*)),this, SLOT(onConsoleDoubleClick(QListWidgetItem*)));
  connect(projInfo, SIGNAL(projectInfoUpdated()), builder, SLOT(onProjectUpdated()));
  
  // menu actions 
  connect(actionNew,					SIGNAL(triggered()), this,		SLOT(onNewFile()));
  connect(actionAdd_Existing_File, SIGNAL(triggered()), this,		SLOT(onAddExistingFile()));
  connect(actionNew_Project,	SIGNAL(triggered()), this,		SLOT(onNewProject()));
  connect(actionOpen,					SIGNAL(triggered()), this,		SLOT(onOpen()));
  connect(actionSave,					SIGNAL(triggered()), this,		SLOT(onSave()));
  connect(actionSave_As,			SIGNAL(triggered()), this,		SLOT(onSaveAs()));
  connect(actionBuild,				SIGNAL(triggered()), this,		SLOT(onBuild()));
  connect(actionStop,         SIGNAL(triggered()), this,		SLOT(onStop()));
  connect(actionClean,				SIGNAL(triggered()), this,		SLOT(onClean()));
  connect(actionProperties,		SIGNAL(triggered()), this,		SLOT(onProperties()));
  connect(actionUpload,				SIGNAL(triggered()), this,		SLOT(onUpload()));
  connect(actionUndo,					SIGNAL(triggered()), editor,	SLOT(undo()));
  connect(actionRedo,					SIGNAL(triggered()), editor,	SLOT(redo()));
  connect(actionCut,					SIGNAL(triggered()), editor,	SLOT(cut()));
  connect(actionCopy,					SIGNAL(triggered()), editor,	SLOT(copy()));
  connect(actionPaste,				SIGNAL(triggered()), editor,	SLOT(paste()));
  connect(actionSelect_All,		SIGNAL(triggered()), editor,	SLOT(selectAll()));
  connect(actionFind,         SIGNAL(triggered()), findReplace,	SLOT(show()));
  connect(actionAbout,        SIGNAL(triggered()), about,   SLOT(show()));
  connect(actionUpdate,        SIGNAL(triggered()), this,   SLOT(onUpdate()));
  connect(actionBuildLog, SIGNAL(triggered()), buildLog, SLOT(show()));
  connect(actionVisitForum,        SIGNAL(triggered()), this,   SLOT(onVisitForum()));
  connect(actionClear_Output_Console,		SIGNAL(triggered()), outputConsole,	SLOT(clear()));
  connect(actionUpload_File_to_Board,		SIGNAL(triggered()), this,	SLOT(onUploadFile()));
  connect(actionMake_Controller_Reference, SIGNAL(triggered()), this, SLOT(openMCReference()));
  connect(actionMcbuilder_User_Manual, SIGNAL(triggered()), this, SLOT(openManual()));
  connect(menuExamples, SIGNAL(triggered(QAction*)), this, SLOT(onExample(QAction*)));
  connect(menuLibraries, SIGNAL(triggered(QAction*)), this, SLOT(onLibrary(QAction*)));
  connect(actionSave_Project_As, SIGNAL(triggered()), this, SLOT(onSaveProjectAs()));
  connect(menuRecent_Projects, SIGNAL(triggered(QAction*)), this, SLOT(openRecentProject(QAction*)));
}