Q:

Check if drive is writable windows API function

Hello is there any windows API function that would return if drive is writable.  Sometimes drive is visible under drives but when trying to programaticly write to it, it gives you  a msg box error wich freezes the application until user presses the ok button.  Is there any built in function that would check if drive is writable without the annoying error box? 
I tried trycopy already and returns the same msgbox error :(
Thanks! 

A:

Try calling SetErrorMode( SEM_FAILCRITICALERRORS) to prevent the error messageboxes from popping up. 
http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx

