|
-
Aug 7th, 2000, 08:43 AM
#1
Thread Starter
Junior Member
Hello, I have a file which has to be written to a HP CDRW drive (that has Direct CD so that the D:\ acts as a regular drive). I need to be able to:
i. check to see if the CDRW is formatted
ii. ** erase the current data on the CDRW media **
iii. copy the file to the CDRW media
I really need help with these three tasks, especcially number two. Please help, thanks.
Brandr
[email protected]
-
Aug 7th, 2000, 09:09 AM
#2
you can probably shell the dos command DelTree, or you can shell FDisk or something.
and I think you just copy files like you normally would,
but I dont know the answer to #1
-
Aug 7th, 2000, 11:32 AM
#3
Lively Member
denniswrenn - No you actually can't shell to dos to do this. CDRW does not act as normal media. You need a third party program to treat it like a disk (ie Direct CD).
Brandr - I've seen code for C++ to write CDs, but never VB code. I don't know if it is possible without an additional dll or control
-
Sep 1st, 2001, 04:05 PM
#4
New Member
Here's something that might get you started.
In your project, make a reference to the 'Microsoft Scripting Library' (SCRRUN.DLL).
There are Win32 API calls for doing this, but this is much easier.
Use the Following code snipets:
(Declaration section)
Private oFSO As FileSystemObject
Private oDrive As Scripting.Drive
(Function)
Function GetCDInfo(strDrive as string) as String
Set oFSO = New FileSystemObject
Set oDrive = oFSO.GetDrive(strDriveLetter) '
GetCDInfo=oDrive.FileSystem
Set oDrive=nothing
Set oFSO=nothing
End Function
It will return the following strings for CDs:
"CDBLANK" unformatted CDR or CDRW
"CDFS" - normal data/music CD
"CDUDF" - formatted, unclosed CDR
"CDUDFRW" - CDRW formatted
Not sure how to programatically format an unformatted CDR(W),
But, once formated, you can use normal VB disk I/O methods.
-
Sep 1st, 2001, 08:01 PM
#5
Check and see if your writer came with any OCX controls, or DLLs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|