#1 Burning Software

It is currently Thu Dec 19, 2024 4:54 am

All times are UTC




Post new topic Reply to topic  [ 86 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Get Media Free/Total Space using OCX
PostPosted: Mon Apr 03, 2006 11:33 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alex,

I am using the OCX Wrapper. How do i get the total space and freespace on CD/DVD in MB?Is it by creating an object of Device class.

If i create an object of Device and use
objdiscinfo.FreeLBs and objdiscinfo.TotalSizeInLBs, how do i get its equivalent in MB/Bytes.

Thank You
Annie


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 03, 2006 7:55 pm 
Hi!

Yes, you are right, you should use DiscInfo object methods FreeLBs and TotalSizeInLBs properties. We'll update the OCX reference ASAP.

To get size in Bytes you need to multiply the sizes in LBs on the size of one LB, which is 2048 for Data Track MODE 1 and 2352 for Audio Track.

Regards,
Alexander Orlovsky


Top
  
 
 Post subject: Distinguish between an Audio/Data CD using OCX
PostPosted: Tue Apr 04, 2006 5:43 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexander,

Thank you for your prompt reply.
I would also like to know as to how can i identify whether the disc is a Data or an Audio disk using the OCX, so that i can change the multiplication factor of the LB accordingly.

Regards,
Annie.


Top
 Profile  
 
 Post subject: Re: Distinguish between an Audio/Data CD using OCX
PostPosted: Wed Apr 05, 2006 2:44 am 
Offline

Joined: Wed Jan 04, 2006 1:02 am
Posts: 22
anniexavier wrote:
Thank you for your prompt reply.
I would also like to know as to how can i identify whether the disc is a Data or an Audio disk using the OCX, so that i can change the multiplication factor of the LB accordingly.


Always use 2048 bytes to multiply. For audio-tracks - it's not important how many MB. Users would like to know how many seconds and minutes.
For data discs - 2048 is a correct value.
Free lbs - it depends on how you want to use it.
For example, if you have audio-cd and you have 5000 Lbs free on this disc. User may prefer to append data session with some files. And if you show him free size = 5000 * 2352 - it will not be true.

So for FreeLBs - it's impossible to predict what to use 2048 or 2352. But it's better to use 2048.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 05, 2006 1:47 pm 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexander,

I am using the OCX in a webpage. I call the burn method in a thread.After the thread is done, I do thread.abort()
When i try to burn another folder using the burn method by creating a thread, it throws a Server Application Unavailable error.

The Evnt log in the EventViewer shows:
"aspnet_wp.exe (PID: 1968) was recycled because memory consumption exceeded the 229 MB (60 percent of available RAM)."

Can you please tell me as to where am i going wrong.

Thanking you in advance

Annie.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 05, 2006 7:11 pm 
Hi!

It seems like your web application returned by timeout. Maybe the application hangs somewhere. I need to see your code to tell something definite.

Regards,
Alexander Orlovsky


Top
  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 8:34 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexander,

I have sorted out the problem of running out of RAM. It was because i used a local variable for declaring objDevices. i just changed that to a page level private variable and it solved the matter. But i am still confused about the behaviour though.

Regards,
Annie


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 8:43 am 
Hi!

We'll check if it is a bug in OCX and let you know.

Regards,
Alexander Orlovsky


Top
  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 7:36 pm 
Hi!

The bug is fixed and the fix will be included in the next release. If you need it urgent, please drop a letter to support@rocketdivision.com and we'll send the new OCX to you.

Regards,
Alexander Orlovsky


Top
  
 
 Post subject: Memory Leak Problems
PostPosted: Fri Apr 21, 2006 5:47 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexander,

I am using the StarBurn OCX, i got the latest version on April 12th 2006.

I do call the events of Burn and Erase using threads.

I still get a Server Application Unavalialble always
and the Event Log shows "aspnet_wp.exe was recycled".

I searched in Google and found out that this was due to some memory leak issues.

Please help me fix up this problem.

Regards,
Annie.


Top
 Profile  
 
 Post subject: Regarding the Memory Leak
PostPosted: Fri Apr 21, 2006 8:49 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexander,

i have just checked the StarBurn API help and found that the method "StarBurn_Destroy" frees the memory utilised.
This method seems to be missing in the OCX.
Would appreciate your guidance for the same

Regards,
Annie


Top
 Profile  
 
 Post subject: Re: Regarding the Memory Leak
PostPosted: Fri Apr 21, 2006 10:59 am 
Offline

Joined: Wed Jan 04, 2006 1:02 am
Posts: 22
anniexavier wrote:
Hello Alexander,

i have just checked the StarBurn API help and found that the method "StarBurn_Destroy" frees the memory utilised.
This method seems to be missing in the OCX.
Would appreciate your guidance for the same


Don't worry, StarBurn_Destroy is called from FinalRelease of of Device class.


Top
 Profile  
 
 Post subject: Re: Memory Leak Problems
PostPosted: Fri Apr 21, 2006 11:03 am 
Offline

Joined: Wed Jan 04, 2006 1:02 am
Posts: 22
anniexavier wrote:
I am using the StarBurn OCX, i got the latest version on April 12th 2006.
I do call the events of Burn and Erase using threads.
I still get a Server Application Unavalialble always
and the Event Log shows "aspnet_wp.exe was recycled".
I searched in Google and found out that this was due to some memory leak issues.


Can you send me your code. I will check it.
oleksiy.popov @ rocketdivision . com


Top
 Profile  
 
 Post subject: ReleaseDevice method
PostPosted: Fri Apr 21, 2006 11:23 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexey,

I am sorry but i think i did not understand your reply.
Did you mean to say that i should use the "ReleaseDevice" method of Device object ?

Regards,
Annie


Top
 Profile  
 
 Post subject: My Code
PostPosted: Fri Apr 21, 2006 11:38 am 
Offline

Joined: Mon Apr 03, 2006 11:24 am
Posts: 50
Hello Alexey,


This is the code that i use:





Private objDevices As StarBurn.CDevices


Function BurnCD()

Dim objDevice As New StarBurn.CDeviceClass
objDevices = New StarBurn.CDevicesClass
objDevice = objDevices.GetDevice(0)

dim CurrentDevice As StarBurn.CDevice
CurrentDevice = New StarBurn.CDevice
objDevices = New StarBurn.CDevicesClass
Dim intTotal As Integer = objDevices.Count
Dim intLoop As Integer
For intLoop = 0 To intTotal - 1
Dim objDeviceInLoop As New StarBurn.CDevice
objDeviceInLoop = objDevices.GetDevice(intLoop)
CurrentDevice = objDevices.GetDevice(intLoop)
Exit For
Next



Dim objDiscInfo As New StarBurn.CDiscInfo
objDiscInfo = CurrentDevice.GetDiscInfo()
Dim intNextAddress As Integer
If objDiscInfo.IsBlank = True Then
intNextAddress = 0
Else
intNextAddress = objDiscInfo.NextWritableAddress
End If
Try
Dim Root As New StarBurn.CNode
Dim JolietImage As StarBurn.CJolietImageClass
JolietImage = New StarBurn.CJolietImageClass
Root = JolietImage.Root

Dim mycol As New MyCollision
JolietImage.CollisionCallback = mycol
Root.AddFolder("FolderToBeBurned", "D:\FolderToBeBurned")
Dim ulong As System.UInt32
ulong = ulong.Parse(intNextAddress.ToString)
JolietImage.Build(ulong, VolumeLabel, VolumeLabel)
intFileHandle = intFileHandle.Parse(JolietImage.FileSystemHandle.ToString)
CurrentDevice.TrackAtOnceFromFileSystemHandle(intFileHandle, bTestWrite, True)
CurrentDevice.CloseSession()
Catch ex As Exception
Dim strException As String = ex.Message
blnSuccess = False
Finally
If Not IsNothing(CurrentDevice) Then
CurrentDevice.CloseSession()
CurrentDevice = Nothing
End If
End Try

End Function


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 86 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 43 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group