I have a console application which do "Screen Capture", and save the images in "c:/" directory with infinite number of pictures, I want the application to keep capturing and saving pictures until the hard disk become full WITHOUT crashing the application. So how to achieve that please?
C# - How to save many files to the hard disk until it become full without crashing
381 Views Asked by kareemborai At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in CONSOLE
- Confusion about CTRL_SHUTDOWN_EVENT handling in DLLs and WM_QUERYENDSESSION
- C++: Re-use line printed to console
- Lock and Edit Button is Weblogic 12C admin console is not responding ,
- Error executing SSIS Package
- Eclipse console: revert line order
- Is there any way to count elements that are equal to "x" in 2D aray; C#
- Neither .on or .live functions are recognized
- Problems with UTF8 text in XE7 ReadLn command
- py2exe: Allow a console window to be either shown or hidden with a sys.argv
- Why does ArrayList.Sort() sorting by only first digit?
- Interactive scanf using pipe
- C# Program automation - Program hangs/doesn't work
- Uncaught SyntaxError: Unexpected token < in HTML - can't solve
- What’s the quickest, easiest way to execute a JavaScript file on a live web page?
- How to find wrong script
Related Questions in CONSOLE-APPLICATION
- How to automatically click a dialog box opened from console application
- how to fetch data from Func using generic list and linq
- Problems with UTF8 text in XE7 ReadLn command
- Missing Data after insert into my end sql table using Sql Bulk Copy
- AvailableVirtualMemory on IIS and Console application
- C# Console App Exit Code with Task Scheduler
- How to handle multiple consoles in single application?
- How to run C# console app using powershell
- How to handle intermittent errors in Console output to network file
- Multiple Consoles in a Single Console Application
- .net crystal report export to stream from within sql server
- Microsoft Excel cannot access the file 'C:\0BBAC500'
- Redirected batch file process output not running
- Font is right. Why can't I get this unicode character to display in this C# console app?
- Delphi XE8: problems running an external console application, waiting for its results and capturing its results
Related Questions in CAPTURE
- iOS Swift camera mode- how to indicate photo is captured
- Capture entire window with winapi
- Share variable between two lambdas
- Capture an image using DirectShow via webcam in vb.net
- Capture HWND with context menu
- How to capture screen in screen saver mode (c#)?
- Java - Is there any way to make a shaped image?
- Program stops working when adding new code
- capture expect ssh output to variable
- Android 5 - prevent from screen capture
- Two audio inputs in FFmpeg have different volumes
- C# - How to save many files to the hard disk until it become full without crashing
- Capture Android Screen Cordova PhoneGap
- Do event handlers go on the JS Message Queue, or just events?
- Create "Fake" audio device in C#?
Related Questions in SCREEN-CAPTURE
- Does Windows 7 with platform update support desktop duplication?
- Screen video capture including mouse cursor on Mac?
- Screenshot of contents of Safari from share extension
- How to create a screenshot of browser window and save it to another page
- Android 5 - prevent from screen capture
- Multiple screencapturing with Chrome ScreenCastify
- MEDIA_PROJECTION_SERVICE not valid in call to getSystemService()
- Is there a way to use PrintWindow with a control? (using AutoIt)
- C# - How to save many files to the hard disk until it become full without crashing
- How to do android screen sharing
- API's for Android 4.4 screen recording?
- How to capture desktop screen of computer host where it's running on using node.js
- Capture Screen while animating
- Which Windows API capturing screen faster than Bitblt or any other Mirror Drivers?
- Alternate way to use DuplicateOutput() of IDXGIOutput1 in C# for UWP?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
How to keep the application from crashing? Simple: catch the exception that occurs when you try to save the file to a full drive. For example:
You don't say what kind of image you're getting, so I can't give you an exact scenario. But the concept is the same: if the attempt to save an image throws an exception, catch the exception, clean up any streams or whatever that you might have open, and then just continue. Display an error message if you want. Log an error to a file, although you'll probably want that log file to be on a different drive.
That will prevent your application from crashing. No telling what it will do to any other running applications that need to write to the disk.