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. General Programming
  3. C / C++ / MFC
  4. ShellExecute restriction?

ShellExecute restriction?

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
7 Posts 4 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.
  • R Offline
    R Offline
    rp_suman
    wrote on last edited by
    #1

    I am using the ShellExecute API to launch default E-mail client like "emailto:Email Ids". It is working well but when the number of characters exceed 1852, its not launching the E-mail client. The API is still returning success code only. My default mail client is Mozilla thunderbird. Is this a restriction in the API or any chance for E-mail client? Thanks

    -- "Programming is an art that fights back!"

    R R R 4 Replies Last reply
    0
    • R rp_suman

      I am using the ShellExecute API to launch default E-mail client like "emailto:Email Ids". It is working well but when the number of characters exceed 1852, its not launching the E-mail client. The API is still returning success code only. My default mail client is Mozilla thunderbird. Is this a restriction in the API or any chance for E-mail client? Thanks

      -- "Programming is an art that fights back!"

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      rp_suman wrote:

      number of characters exceed 1852, its

      Number of characters of what? :confused:

      It is a crappy thing, but it's life -^ Carlo Pallini

      1 Reply Last reply
      0
      • R rp_suman

        I am using the ShellExecute API to launch default E-mail client like "emailto:Email Ids". It is working well but when the number of characters exceed 1852, its not launching the E-mail client. The API is still returning success code only. My default mail client is Mozilla thunderbird. Is this a restriction in the API or any chance for E-mail client? Thanks

        -- "Programming is an art that fights back!"

        R Offline
        R Offline
        Roger Stoltz
        wrote on last edited by
        #3

        Are you by any chance running Win2k or earlier? This article[^] may be of interest. The resulting command line may exceed 2047 chars. However, I personally find an email address that exceeds 1852 chars to be rather uncommon. :suss:

        "It's supposed to be hard, otherwise anybody could do it!" - selfquote
        "High speed never compensates for wrong direction!" - unknown

        R R 2 Replies Last reply
        0
        • R Roger Stoltz

          Are you by any chance running Win2k or earlier? This article[^] may be of interest. The resulting command line may exceed 2047 chars. However, I personally find an email address that exceeds 1852 chars to be rather uncommon. :suss:

          "It's supposed to be hard, otherwise anybody could do it!" - selfquote
          "High speed never compensates for wrong direction!" - unknown

          R Offline
          R Offline
          rp_suman
          wrote on last edited by
          #4

          The field can have more than one E-mail, so it may exceed 1852 occasionally. I checked same thing in system with outlook/Win XP the max limit was 1863.

          -- "Programming is an art that fights back!"

          1 Reply Last reply
          0
          • R rp_suman

            I am using the ShellExecute API to launch default E-mail client like "emailto:Email Ids". It is working well but when the number of characters exceed 1852, its not launching the E-mail client. The API is still returning success code only. My default mail client is Mozilla thunderbird. Is this a restriction in the API or any chance for E-mail client? Thanks

            -- "Programming is an art that fights back!"

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            I'm assuming that you are clubbing too many email ids separated by semicolons? I tried by increasing the no. of email ids with every trial. At some point, ShellExecute started returning a value NOT greater than 32 (it returns a value greater than 32 if it succeeds) and the return value was, upon failure, SE_ERR_ACCESSDENIED. You might want to check the return value properly.

            It is a crappy thing, but it's life -^ Carlo Pallini

            1 Reply Last reply
            0
            • R rp_suman

              I am using the ShellExecute API to launch default E-mail client like "emailto:Email Ids". It is working well but when the number of characters exceed 1852, its not launching the E-mail client. The API is still returning success code only. My default mail client is Mozilla thunderbird. Is this a restriction in the API or any chance for E-mail client? Thanks

              -- "Programming is an art that fights back!"

              R Offline
              R Offline
              Rozis
              wrote on last edited by
              #6

              I think it has to do with the lenght of the commandline. What you could do is put your line in a batchfile (just generate the file from within your program) and run that one. Just delete it when ready.. Rozis

              1 Reply Last reply
              0
              • R Roger Stoltz

                Are you by any chance running Win2k or earlier? This article[^] may be of interest. The resulting command line may exceed 2047 chars. However, I personally find an email address that exceeds 1852 chars to be rather uncommon. :suss:

                "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                "High speed never compensates for wrong direction!" - unknown

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #7

                Roger Stoltz wrote:

                However, I personally find an email address that exceeds 1852 chars to be rather uncommon.

                Should be rather OK as long as you don't have to spell your email ID out to someone over the phone. :laugh:

                It is a crappy thing, but it's life -^ Carlo Pallini

                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