How to make an invisible form or console

This is a discussion on How to make an invisible form or console within the Windows Programming forums, part of the Platform Specific Boards category; I am writing a simple program that copies a few files and calls regsvr32 to register dlls. Right now I ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    4

    How to make an invisible form or console

    I am writing a simple program that copies a few files and calls regsvr32 to register dlls. Right now I do this as Win32 Console App and I want to hide the console window. Does anybody know how to do this? Do I have to write a Win32 app, create a form and set it invisible?

    Thanks.

    P.S. Is there a way to register dll's w/o regsvr32?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Yes...create a Win32 project and use WinMain instead of main. No need for any windows or forms

    If you dont want to use RegSvr32 try loading the dll with LoadLibrary, then use GetProcAddress to find DllRegisterServer, call that function and you should be registered!

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    4
    Thanks Fordy.
    I now have another question. This app after it finishes copying and registering DLLs launches another application. Is it possible to end this process after the new one is launched?
    The reason why I'm asking this is beacuse I have written an app like this in VB, and it doesn't exit untill the launched process finishes. If the child process hangs or crashes, the parent application is never terminated.

  4. #4
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    It depends on how you launched the child process I gather. Just a quick browse through MSDN leads me to believe that you don't have to wait for a process to return if you use most methods and you could just return from your WinMain.

    How are you launching the process?

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    If you launch the other app with say CreateProcess, then the call returns straight away without waiting for the other app to finish...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console, Terminal and Terminal Emulator
    By lehe in forum C Programming
    Replies: 4
    Last Post: 02-15-2009, 08:59 PM
  2. How to make a Console Window fullscreen
    By herocks in forum C++ Programming
    Replies: 10
    Last Post: 05-16-2007, 07:32 PM
  3. trying to make a KenGen ( for a game tool )
    By lonewolfy in forum C# Programming
    Replies: 4
    Last Post: 03-28-2007, 08:23 AM
  4. Full Screen Console
    By St0rmTroop3er in forum C++ Programming
    Replies: 1
    Last Post: 09-26-2005, 09:59 PM
  5. Recording Data sent to program by Form
    By No1 in forum C++ Programming
    Replies: 2
    Last Post: 09-28-2001, 07:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21