Thread: Code executing during compilation, performing registration?

  1. #1
    Registered User
    Join Date
    Sep 2001

    Code executing during compilation, performing registration?

    I have an MFC MDI application to which I've added a login screen. For privacy reasons the login needs to appear before any of the doc/view stuff is open, and prefereably before the main window is visible too.

    As it is, I've created a CDialog based window C0Misc_Splash, constructed it and called DoModal in CRollersApp::InitInstance (derived from CWinApp::InitInstance), here:


    // Standard initialization
    // If you are not using these features and wish to reduce the size
    // of your final executable, you should remove from the following
    // the specific initialization routines you do not need
    // Change the registry key under which our settings are stored
    LoadStdProfileSettings(0); // Load standard INI file options (including MRU)

    //Load global variables from registry
    //Connect to database
    //Display login/splash screen
    C0Misc_Splash splash;
    splash.DoModal(); // ***IMPORTANT BIT HERE***

    // Register the application's document templates. Document templates
    // serve as the connection between documents, frame windows and views
    CMultiDocTemplate* pDocTemplate;
    pDocTemplate = new CMultiDocTemplate(IDR_RollersTYPE,
    RUNTIME_CLASS(CChildFrame), // custom MDI child frame

    Apart from that, there are no significant additions to InitInstance.

    The problem I'm having is that when I compile the program in VC.NET, after the Linking stage it goes on to Performing registration, and at that point my login window opens in full working order, opens a connection to the database, forces me to enter my password before I can press the login button and it says build successful. If I press cancel at the login dialogue, which would normally quit the application, I get 'Rollers error PRJ0019: A tool returned an error code from "Performing registration"' and build failed, but the output (the exe) runs fine. If I use F5 (compile and run), I have to login once during performing registration, and again during the execution proper.

    What does 'performing registration' do, and where can I put the code for a splash type screen so it wont be executed while I'm compiling(/building/whatever that bit after linking is)? Thanks for your help.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Look in your project settings, custom build step. You should see where your application is being called with some command line parameters (like "/RegServer") to register whatever COM objects your exe contains.

    Since you don't know why this is happening, I'm guessing that you didn't intend for your exe to contain any COM objects??


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 40
    Last Post: 09-01-2006, 12:09 AM
  2. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  3. Replies: 1
    Last Post: 03-21-2006, 07:52 AM
  4. Replies: 4
    Last Post: 01-16-2002, 12:04 AM
  5. Big Code, Little Problem
    By CodeMonkey in forum Windows Programming
    Replies: 4
    Last Post: 10-03-2001, 05:14 PM