CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    Chennai, India
    Posts
    76

    Using Command Line Paramters in the statically linked DLL's

    HI,
    My application exe is linked to the dll's statically. I would like to use the command line paramters that i pass to in the dll's. How can use the command line parameters in the DllMain() function of the statically linked function. I need to process in the DllMain function depending on the command line parameters.

    Thanks in Advance,
    Varadha

  2. #2
    Join Date
    Dec 2003
    Location
    Sofia, Bulgaria
    Posts
    85
    This does not sound like a good design decision unless you are writing some sort of spy program. If the main program needs to pass some data to the DLL it better do it by calling a dedicated function. Anyway, have a look at GetCommandLine.
    Boris Karadjov
    Brainbench MVP for Visual C++
    http://www.brainbench.com

  3. #3
    Join Date
    Sep 2003
    Location
    Chennai, India
    Posts
    76
    Similar to that GetCommandLine for main() function, what is the command that i need to use the access the parameters passed to the Service main function. This is because my application is statically linked to the dll's, i need to access the the parametes that is passed to the servce main function in those dll's. If there are no function available, is there any other method that i can use to get that inforamation.

  4. #4
    Join Date
    Dec 2003
    Location
    Sofia, Bulgaria
    Posts
    85
    For services it does not seem possible to obtain service startup parameters without a cooperation from the ServiceMain function.
    Boris Karadjov
    Brainbench MVP for Visual C++
    http://www.brainbench.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured