|
-
Mar 27th, 2000, 08:43 PM
#1
Thread Starter
New Member
I am tying to make a program that, among other things, checks that there is a cd recorder attached and then writes data to a cd.
does anyone have any idea about how i could do this??
-
Jan 18th, 2003, 12:10 PM
#2
Junior Member
There's this thread that almost has 3 years and hasn't got an answer. Was it forgotten or no one knows an answer?
Originally posted by solly
I am tying to make a program that, among other things, checks that there is a cd recorder attached and then writes data to a cd.
does anyone have any idea about how i could do this??
-
Jan 18th, 2003, 12:40 PM
#3
It depends on what kind of CD-Burner you have...I have heard about somone used a controll/API from NERO. That worked on some burners...
-
Jan 18th, 2003, 12:49 PM
#4
PowerPoster
Well
VB Code:
'to determine the presence of a CD
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Function IsCDInDrive(ByVal strCDDriveLetter As String) As Boolean
Dim strStatus As String * 128
'open the device
mciSendString "open " & strCDDriveLetter & ": type cdaudio alias cddrive wait", vbNullString, 0, 0
'see if there's something in the drive
mciSendString "status cddrive media present", strStatus, Len(strStatus), 0
'close the device
mciSendString "close cddrive", vbNullString, 0, 0
'the string will contain "true" or "false" which can be easily converted
IsCDInDrive = CBool(Left$(strStatus, InStr(strStatus, vbNullChar) - 1))
End Function
'to determine the volume name of the CD
Private Declare Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: [url]http://www.allapi.net/[/url]
Dim Serial As Long, VName As String, FSName As String
'Create buffers
VName = String$(255, Chr$(0))
FSName = String$(255, Chr$(0))
'Get the volume information
GetVolumeInformation "C:\", VName, 255, Serial, 0, 0, FSName, 255
'Strip the extra chr$(0)'s
VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1)
FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1)
'change E:\ with the CD drive letter
MsgBox "The Volume name of E:\ is '" + VName + "', the File system name of E:\ is '" + FSName + "' and the serial number of E:\ is '" + Trim(Str$(Serial)) + "'", vbInformation + vbOKOnly, App.Title
End Sub
Then supply error code to handle to trying to write to non-writable CD
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Jan 18th, 2003, 12:54 PM
#5
James....will that work with all CD-Burners?
-
Jan 18th, 2003, 01:01 PM
#6
PowerPoster
Well
Originally posted by NoteMe
James....will that work with all CD-Burners?
Move to Theory - Land. Everything works there...
Seriously, I have know way of knowing.
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Jan 18th, 2003, 01:03 PM
#7
Theory Land - I suppose that is in the same street as MS Win was made... ... maybe I should test it and tell you if it works....but I have no time today...so maybe tomorrow...
-
Jan 18th, 2003, 03:44 PM
#8
Junior Member
You want write file in CD every times user insert it?
Why do this???
Don't sound good!!!
-
Jan 18th, 2003, 03:47 PM
#9
Originally posted by Pvzbis
You want write file in CD every times user insert it?
Why do this???
Don't sound good!!!
That was ot what I asked for. You are way off....but you not yet told me what you are going to use exe binding for...
-
Jan 18th, 2003, 09:29 PM
#10
Frenzied Member
what id really like to know is if you can make a prog burn over already burned info on a cd-r, sort of a cd-r shredder if you will
-
Jan 18th, 2003, 09:31 PM
#11
Frenzied Member
hey what the heck? i dont think MartinLiss is going to like your avatar..
-
Sep 21st, 2003, 05:25 AM
#12
Member
I didn't understand what James Stanich did...
solly needed a program that will burn a file to a cd (and actually, I do too...)
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
|