Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

CDROM Drive Listbox issue....
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?



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-27-05 08:55 PM


Re: CDROM Drive Listbox issue....
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?
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Veign
04-27-05 08:55 PM


Re: CDROM Drive Listbox issue....
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 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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 
device 
the 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Veign
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Hubbard
04-28-05 01:55 AM


Re: CDROM Drive Listbox issue....
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 
be 
VB5 
type. 
http://www.vbaccelerator.com/home/V...g_CDs/index.asp 
backup 
the 
to 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Veign
04-28-05 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.