Sending more then 28 file names to string array in app creates error
-
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(); } } }
-
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(); } } }
Bump?
-
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(); } } }
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]