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#
  4. Sending more then 28 file names to string array in app creates error

Sending more then 28 file names to string array in app creates error

Scheduled Pinned Locked Moved C#
data-structureshelpquestion
3 Posts 2 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.
  • Y Offline
    Y Offline
    Yoav Ben Zvi
    wrote on last edited by
    #1

    Hi I wrote a small app that receives a string array with file names from windows explorer (using 'Send To'). If i send up to 28 file names every thing is ok. If I try to send 29 or more I get this error message: "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item" And the app closes. It doesn't even enter the app or the try/catch should have caught it. Any ideas please? This is the startup class: static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain(args)); } catch (Exception e) { MessageBox.Show(e.Message); } finally { Application.Exit(); } } }

    Y L 2 Replies Last reply
    0
    • Y Yoav Ben Zvi

      Hi I wrote a small app that receives a string array with file names from windows explorer (using 'Send To'). If i send up to 28 file names every thing is ok. If I try to send 29 or more I get this error message: "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item" And the app closes. It doesn't even enter the app or the try/catch should have caught it. Any ideas please? This is the startup class: static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain(args)); } catch (Exception e) { MessageBox.Show(e.Message); } finally { Application.Exit(); } } }

      Y Offline
      Y Offline
      Yoav Ben Zvi
      wrote on last edited by
      #2

      Bump?

      1 Reply Last reply
      0
      • Y Yoav Ben Zvi

        Hi I wrote a small app that receives a string array with file names from windows explorer (using 'Send To'). If i send up to 28 file names every thing is ok. If I try to send 29 or more I get this error message: "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item" And the app closes. It doesn't even enter the app or the try/catch should have caught it. Any ideas please? This is the startup class: static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain(args)); } catch (Exception e) { MessageBox.Show(e.Message); } finally { Application.Exit(); } } }

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Only yesterday there was an item (I believe regarding "mailto:") with some buffer limited to some 2048 bytes; I guess you are hitting the same limit. :)

        Luc Pattyn [My Articles]

        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