Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. The non-blocking command line parameter

The non-blocking command line parameter

Scheduled Pinned Locked Moved The Weird and The Wonderful
designsalesjsonworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bernhard Hiller
    wrote on last edited by
    #1

    A simple kind of integration between two application is that one application calls the other application via the command line, passing a few parameters. A customer wanted to call our application from their main application. On the configuration form, he entered the parameters to be passed:

    OurProgram.exe /param1=[InternalValue1] /param2=[InternalValue2]

    When calling OurProgram from their MainApplication, MainApplication parses the command line parameters and replaces internal values with their present values, i.e. it eventually calls:

    OurProgram.exe /param1=John /param2=Doe

    It works, but there is a catch: the user cannot work now in MainApplication because it waits for OurProgram to exit. Our customer called the manufacturer of MainApplication, and they told him to add another parameter dontblock, i.e.

    OurProgram.exe /param1=[InternalValue1] /param2=[InternalValue2] /dontblock

    When MainApplication finds the dontblock parameter while parsing the command line, it knows that it need not wait for the called application to exit. It works, but again, there is a catch. It now calls

    OurProgram.exe /param1=John /param2=Doe /dontblock

    and OurProgram complains that it does not know the parameter dontblock. Great design!

    F F 2 Replies Last reply
    0
    • B Bernhard Hiller

      A simple kind of integration between two application is that one application calls the other application via the command line, passing a few parameters. A customer wanted to call our application from their main application. On the configuration form, he entered the parameters to be passed:

      OurProgram.exe /param1=[InternalValue1] /param2=[InternalValue2]

      When calling OurProgram from their MainApplication, MainApplication parses the command line parameters and replaces internal values with their present values, i.e. it eventually calls:

      OurProgram.exe /param1=John /param2=Doe

      It works, but there is a catch: the user cannot work now in MainApplication because it waits for OurProgram to exit. Our customer called the manufacturer of MainApplication, and they told him to add another parameter dontblock, i.e.

      OurProgram.exe /param1=[InternalValue1] /param2=[InternalValue2] /dontblock

      When MainApplication finds the dontblock parameter while parsing the command line, it knows that it need not wait for the called application to exit. It works, but again, there is a catch. It now calls

      OurProgram.exe /param1=John /param2=Doe /dontblock

      and OurProgram complains that it does not know the parameter dontblock. Great design!

      F Offline
      F Offline
      fjdiewornncalwe
      wrote on last edited by
      #2

      Sounds like [Manufacturer] is passing the buck instead of having to deal with it...

      I wasn't, now I am, then I won't be anymore.

      1 Reply Last reply
      0
      • B Bernhard Hiller

        A simple kind of integration between two application is that one application calls the other application via the command line, passing a few parameters. A customer wanted to call our application from their main application. On the configuration form, he entered the parameters to be passed:

        OurProgram.exe /param1=[InternalValue1] /param2=[InternalValue2]

        When calling OurProgram from their MainApplication, MainApplication parses the command line parameters and replaces internal values with their present values, i.e. it eventually calls:

        OurProgram.exe /param1=John /param2=Doe

        It works, but there is a catch: the user cannot work now in MainApplication because it waits for OurProgram to exit. Our customer called the manufacturer of MainApplication, and they told him to add another parameter dontblock, i.e.

        OurProgram.exe /param1=[InternalValue1] /param2=[InternalValue2] /dontblock

        When MainApplication finds the dontblock parameter while parsing the command line, it knows that it need not wait for the called application to exit. It works, but again, there is a catch. It now calls

        OurProgram.exe /param1=John /param2=Doe /dontblock

        and OurProgram complains that it does not know the parameter dontblock. Great design!

        F Offline
        F Offline
        Fueled By Decaff
        wrote on last edited by
        #3

        Perhaps a better way would have been to use the start command. Do they not know DOS? :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups