I have to develop an application that will print the document and based on the result whether the printing was a success or a failure should display the status.

Some of the important futures are
1) It will print multiple documents, the file and its location will be provided from a table in SQL Server.
2) The files will be printed sequentially.
3) The application will update the status of the document within the SQL Server database whether it was a success or failure.
4) It should take the default drivers and print it

How can I accompalish this? There might be numerous VC++ examples on internet available where you can print the document. But how can i get the status of that document whether it was a success or failure. Irrespective of whatever reason it failed to print?

Thanks in Advance