| Author |
CDROM Drive Listbox issue....
|
|
| Jim Hubbard 2005-04-27, 3:55 pm |
| I have been asked to update an old VB 5 application with CD backup for the
company's data files. The problem I am having is ... when you place a blank
CD in the drive, and you select the cdrom drive with the drive listbox you
get a "device unavailable" error 68.
I tried the FileSystemObject's IsReady function and I get that the device is
not ready.
I need to be able to see that there is a blank CD in the drive to do the
backup.....any suggestions?
| |
|
| Writing CDs:
http://www.vbaccelerator.com/home/V...g_CDs/index.asp
--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"Jim Hubbard" <reply@groups.please> wrote in message
news:%232X%23iu0SFHA.3980@TK2MSFTNGP12.phx.gbl...
> I have been asked to update an old VB 5 application with CD backup for the
> company's data files. The problem I am having is ... when you place a
blank
> CD in the drive, and you select the cdrom drive with the drive listbox you
> get a "device unavailable" error 68.
> I tried the FileSystemObject's IsReady function and I get that the device
is
> not ready.
>
> I need to be able to see that there is a blank CD in the drive to do the
> backup.....any suggestions?
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| Thanks for the great links!
Unfortunately, the client still has customers on 98 and wants to support
them also - so the IMAPI wrapper for XP will not work for them.
"Veign" <NOSPAMinveign@veign.com> wrote in message
news:uCOtu50SFHA.2768@tk2msftngp13.phx.gbl...
> Writing CDs:
> http://www.vbaccelerator.com/home/V...g_CDs/index.asp
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
> Read. Decide. Sign the petition to Microsoft.
> http://classicvb.org/petition/
>
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:%232X%23iu0SFHA.3980@TK2MSFTNGP12.phx.gbl...
> blank
> is
>
>
| |
|
| I can't remember if Win98 has a feature where it identifies a CD type. Does
Windows Explorer recognize it as a blank CD?
--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"Jim Hubbard" <reply@groups.please> wrote in message
news:O6UP0W1SFHA.3464@tk2msftngp13.phx.gbl...
> Thanks for the great links!
>
> Unfortunately, the client still has customers on 98 and wants to support
> them also - so the IMAPI wrapper for XP will not work for them.
>
>
> "Veign" <NOSPAMinveign@veign.com> wrote in message
> news:uCOtu50SFHA.2768@tk2msftngp13.phx.gbl...
http://www.vbaccelerator.com/home/V...g_CDs/index.asp[color=darkred]
device[color=darkred]
the[color=darkred]
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| I only mention Win98 because it does not have the IMAPI functions to be
wrapped.
I am currently having these issues on an XP Pro SP2 system running VB5 SP3.
Is there a later SP that I should be running?
We will continue trying to figure out the 98 error today....but, tomorrow,
we will move forward with CD backup support for Win2000/XP and up users
only. The company estimates that 75% of their customer base in on XP, so no
need wasting too much time on an unsupported OS.
"Veign" <NOSPAMinveign@veign.com> wrote in message
news:unL6Oh1SFHA.3184@TK2MSFTNGP09.phx.gbl...
>I can't remember if Win98 has a feature where it identifies a CD type. Does
> Windows Explorer recognize it as a blank CD?
>
>
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
> Read. Decide. Sign the petition to Microsoft.
> http://classicvb.org/petition/
>
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:O6UP0W1SFHA.3464@tk2msftngp13.phx.gbl...
> http://www.vbaccelerator.com/home/V...g_CDs/index.asp
> device
> the
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| And, yes.....the OS recognizes the CD ROM with no problems.
Just to try every angle, I am going to power down and install a new Sony
CD-R/RW. (May as well cover all the bases, right?)
"Jim Hubbard" <reply@groups.please> wrote in message
news:ePednVY0QM_VefLfRVn-3A@giganews.com...
>I only mention Win98 because it does not have the IMAPI functions to be
>wrapped.
>
> I am currently having these issues on an XP Pro SP2 system running VB5
> SP3. Is there a later SP that I should be running?
>
> We will continue trying to figure out the 98 error today....but, tomorrow,
> we will move forward with CD backup support for Win2000/XP and up users
> only. The company estimates that 75% of their customer base in on XP, so
> no need wasting too much time on an unsupported OS.
>
>
>
> "Veign" <NOSPAMinveign@veign.com> wrote in message
> news:unL6Oh1SFHA.3184@TK2MSFTNGP09.phx.gbl...
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| New Sony installed. XP Pro sees it with no problems. The FileSystemObject
still freaks out from within VB5 SP3. If there is a blank CD in the drive,
it returns .IsReady= False , and errors out on CDROMs with blank media in
them.
Here's he code (just a form with a command button and the Scripting Runtime
added to the references for the project).
'<Cut here>-----------------------------------------------
Function IsDriveReady(driveletter As String) As Boolean
Dim fs As FileSystemObject
Set fs = New FileSystemObject
IsFloppyReadyB = fs.GetDrive(driveletter).IsReady
Set fs = Nothing
End Function
Function FreeSpace(driveletter As String) As String
Dim fs As FileSystemObject
Set fs = New FileSystemObject
FreeSpace = Str(fs.GetDrive(driveletter).FreeSpace)
Set fs = Nothing
End Function
Function TotalSpace(driveletter As String) As String
Dim fs As FileSystemObject
Set fs = New FileSystemObject
TotalSpace = Str(fs.GetDrive(driveletter).FreeSpace)
Set fs = Nothing
End Function
Private Sub Command1_Click()
Dim dletter As String
dletter = "C:"
TestDrive (dletter)
dletter = "D:"
TestDrive (dletter)
End Sub
Private Sub TestDrive(dletter As String)
MsgBox IsDriveReady(dletter)
MsgBox FreeSpace(dletter)
MsgBox TotalSpace(dletter)
End Sub
'<Cut here>-----------------------------------------------
"Jim Hubbard" <reply@groups.please> wrote in message
news:J4OdnQoUy9S0ePLfRVn-rA@giganews.com...
> And, yes.....the OS recognizes the CD ROM with no problems.
>
> Just to try every angle, I am going to power down and install a new Sony
> CD-R/RW. (May as well cover all the bases, right?)
>
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:ePednVY0QM_VefLfRVn-3A@giganews.com...
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| Found a way to do it! It's a hack, but it works.
Had to change some PSC code around a little to ake it work, but it is at
lest detecting "no cd", "blank cd" in XP Pro.
Next I'm installing a VMWare Virtual Macine wih Win98 to test it there.
If you want the code, remove the caps and spaces from [jPEDFSim__h DONT
ubbard@ MSN hotmailS.com] and send me an email.
Thanks for your help.
"Jim Hubbard" <reply@groups.please> wrote in message
news:C4qdnRfiSMywc_LfRVn-sA@giganews.com...
> New Sony installed. XP Pro sees it with no problems. The
> FileSystemObject still freaks out from within VB5 SP3. If there is a
> blank CD in the drive, it returns .IsReady= False , and errors out on
> CDROMs with blank media in them.
>
> Here's he code (just a form with a command button and the Scripting
> Runtime added to the references for the project).
>
> '<Cut here>-----------------------------------------------
> Function IsDriveReady(driveletter As String) As Boolean
>
> Dim fs As FileSystemObject
> Set fs = New FileSystemObject
>
> IsFloppyReadyB = fs.GetDrive(driveletter).IsReady
>
> Set fs = Nothing
>
> End Function
>
> Function FreeSpace(driveletter As String) As String
>
> Dim fs As FileSystemObject
> Set fs = New FileSystemObject
>
> FreeSpace = Str(fs.GetDrive(driveletter).FreeSpace)
>
> Set fs = Nothing
>
> End Function
>
> Function TotalSpace(driveletter As String) As String
>
> Dim fs As FileSystemObject
> Set fs = New FileSystemObject
>
> TotalSpace = Str(fs.GetDrive(driveletter).FreeSpace)
>
> Set fs = Nothing
>
> End Function
>
> Private Sub Command1_Click()
>
> Dim dletter As String
>
> dletter = "C:"
> TestDrive (dletter)
>
> dletter = "D:"
> TestDrive (dletter)
>
> End Sub
>
> Private Sub TestDrive(dletter As String)
>
> MsgBox IsDriveReady(dletter)
> MsgBox FreeSpace(dletter)
> MsgBox TotalSpace(dletter)
>
> End Sub
> '<Cut here>-----------------------------------------------
>
>
>
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:J4OdnQoUy9S0ePLfRVn-rA@giganews.com...
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| WOW! What a spelling nightmare!
"Jim Hubbard" <reply@groups.please> wrote in message
news:%23Uyx4n2SFHA.228@TK2MSFTNGP12.phx.gbl...
> Found a way to do it! It's a hack, but it works.
>
> Had to change some PSC code around a little to ake it work, but it is at
> lest detecting "no cd", "blank cd" in XP Pro.
>
> Next I'm installing a VMWare Virtual Macine wih Win98 to test it there.
>
> If you want the code, remove the caps and spaces from [jPEDFSim__h DONT
> ubbard@ MSN hotmailS.com] and send me an email.
>
> Thanks for your help.
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:C4qdnRfiSMywc_LfRVn-sA@giganews.com...
>
>
| |
|
| I have been looking through the MSDN to find a way to determine a blank
media in a CD drive but could not find anything.
Good you got it working...
--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
"Jim Hubbard" <reply@groups.please> wrote in message
news:e4ednaRiXZ3ZZ_LfRVn-pA@giganews.com...
> WOW! What a spelling nightmare!
>
>
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:%23Uyx4n2SFHA.228@TK2MSFTNGP12.phx.gbl...
Sony[color=darkred]
be[color=darkred]
VB5[color=darkred]
type.[color=darkred]
http://www.vbaccelerator.com/home/V...g_CDs/index.asp[color=darkred]
backup[color=darkred]
the[color=darkred]
to[color=darkred]
>
>
| |
| Jim Hubbard 2005-04-27, 8:55 pm |
| It works on XP, but not 98. The 98 OS (using Windows Explorer) won't even
recognize a drive as ready with just a blank CD in it. I I remember
correctly, Microsoft did not add the CD IMAPI drivers to the OS until XP.
With 98 the cd writing software of the time had to bring its own CD drivers.
We are skipping 98 development, and concentrating on XP and up. Something
we should have done all along.
Thanks again for your help.
"Veign" <NOSPAMinveign@veign.com> wrote in message
news:uOZbJs2SFHA.3184@TK2MSFTNGP09.phx.gbl...
>I have been looking through the MSDN to find a way to determine a blank
> media in a CD drive but could not find anything.
>
> Good you got it working...
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
> Read. Decide. Sign the petition to Microsoft.
> http://classicvb.org/petition/
>
>
> "Jim Hubbard" <reply@groups.please> wrote in message
> news:e4ednaRiXZ3ZZ_LfRVn-pA@giganews.com...
> Sony
> be
> VB5
> type.
> http://www.vbaccelerator.com/home/V...g_CDs/index.asp
> backup
> the
> to
>
>
|
|
|
|