Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Disk full error?

Posted on 1999-07-20
Medium Priority
Last Modified: 2010-04-16
When I copy a file I want to get a messagebox if the disk is full ... how do I do that? Borland C++ 5.02 (winodws)

Question by:bert1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

cpopin earned 20 total points
ID: 1200590
Check out the SHFileOperation() function and its related structure SHFILEOPSTRUCT.

Author Comment

ID: 1200591
Hmm I don't can't see that it has a disk full error?

GetLastError and FormatMessage is maybe a way ?

Or GlobalMemoryStatus and MEMORYSTATUS ?

I don't know what's the best way... should I do a check of the size of the file before copying and then compare that to how much space are available??

Expert Comment

ID: 1200592
It should act exactly like Explorer would when confronted with a disk full error, display a message box.

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question