#1 Burning Software

It is currently Thu Dec 19, 2024 5:11 am

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: StarBurnX OnProgress
PostPosted: Sun Oct 26, 2008 6:13 am 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
I'm having problems getting OnProgress going. So I have a few questions that should help me resolve this.
1/ How is it created?
a/ objAudioBurner > Drive > OnProgress
b/ objAudioBurner > OnProgress
c/ Another way

2/ If I attach a variable to it like: "Progress = objAudioBurner.OnProgress", does that create a new object?

3/ If it is a new object is it sending 'dispatch' type events and are the events being sent as 'by reference'.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 27, 2008 3:44 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

1) At the first it is not clear what programming language do you use? :)

2) For the C#:

Code:
private void InitializeAudioBurner()
{
     // Creates new AudioBurner  - once
     m_audioBurner=  new AudioBurnerClass();

    // Attach Event handlers
    m_audioBurner.OnProgress    += new IAudioBurnerEvents_OnProgressEventHandler(this.OnProgress);

    m_audioBurner.OnBuffer      += new IAudioBurnerEvents_OnBufferEventHandler  (this.OnBurningBuffer);   

    m_audioBurner.OnTestWriteDisabled +=new IAudioBurnerEvents_OnTestWriteDisabledEventHandler
(OnTestWriteDisabled);
}


Code:
private void UninitializeAudioBurner()
{
      if(m_audioBurner != null)
      {
           m_audioBurner.OnProgress    -= new IAudioBurnerEvents_OnProgressEventHandler(this.OnProgress);
           m_audioBurner.OnBuffer      -= new IAudioBurnerEvents_OnBufferEventHandler  (this.OnBurningBuffer);   
           m_audioBurner.OnTestWriteDisabled -=new IAudioBurnerEvents_OnTestWriteDisabledEventHandler(this.OnTestWriteDisabled);

           m_audioBurner                = null;
      }
}


Where are some signatures of functions :

void OnProgress(int Percent, int TimeRemaining)

void OnBurningBuffer(int Percent)

private void OnTestWriteDisabled(ref bool CancelBurning)

It's All!!

Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 27, 2008 6:36 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
I'm using something called AutoIt. I believe it is more closely related to VB...so if you can show me an example in VB format. Even though, I think I'm calling everything correctly:
Create the Burner object, and ONLY attach the OnProgress to it. (Don't assign a drive or anything else to it)...but I've tried it both ways anyway.
But I'm getting errors. I don't know if these mean anything to you, if they are universal: Windows HRESULT value = -2147220992, Error Win Description (FormatWinError) = ??, Error Last DllError (GetLastError) = 14007

But I still need to know if it is sending 'dispatch' type events (which I am sure is yes), and if it is passing arguments to the Event Functions 'by reference'. If it is not dispatch or if it is by reference, that is the source of my problem.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 28, 2008 11:47 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

1) You should attach the Drive Object to AudioBurner Class !!!

2) The VB6 language has the special directive WithEvents that indicate that declared variable will handle events:

Declaration..

Code:
Public WithEvents objAudioBurner         As StarBurnXLib.AudioBurner


Using ...
Code:
Private Sub objAudioBurner_OnProgress(ByVal Percent As Long, ByVal TimeRemaining As Long)
...
end


3) Is not clear - " .. 'dispatch' type events " ?!

The AudioBurner object is defined as ...

Code:
    coclass AudioBurner
   {
      [default] interface IAudioBurner;
      [default, source] dispinterface IAudioBurnerEvents;
   };


4) The Dispatch IDs ...

Code:
OnProgress has the DISPID 1
OnBuffer has the DISPID 2
OnTestWriteDisabled has the DISPID 3


5) The signatures of events ...

Code:
OnProgressInfo        = {CC_STDCALL, VT_EMPTY, 2 , {VT_I4,VT_I4} };
OnBufferInfo            = {CC_STDCALL,VT_EMPTY,1,{VT_I4}};
OnTestWriteDisabled = {CC_STDCALL,VT_EMPTY,1,{VT_BOOL|VT_BYREF}};



first value - is calling convention;
second value - is return type;
third value - is count of input parameters;
other parameters - are types of input parameters;

Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 29, 2008 3:06 am 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
Thanks, from your reply I believe that it should work...but it doesn't. I'll once again bring up the error I'm receiving, -2147220992. I did some searching and saw that error around the net with slightly different causes. Would you know specifically what in StarBurnX would throw that error?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 29, 2008 12:26 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

1) Probably the StarBurnX is not registerd! Try to call " regsvr32 StarBurnX.dll

2) Could you provide me code (or part of code ) where you burn audio data?
I need to see how you :
- create AudioBurner;
- attach Drive;
- describe callback function;

Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 29, 2008 4:51 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
1/ It's registered, or nothing else would work.

2/ Good idea, maybe you could translate.
Code:
$Reg_Drive = ObjCreate("StarBurnX.StarBurnX");  Create starburn object

$Reg_Burner = ObjCreate("StarBurnX.AudioBurner");  Create burner object

;The following parameters are: "Object", "Function being activated", "Object interface(optional)"
ObjEvent ( $Reg_Burner, "_BurnProgress", "IAudioBurner");  Set up burner to receive events

$Reg_Drive.Initialize("");  Initialize starburnx

$Drive = $Reg_Drive.Drives.Item(0);  Get drive

$Reg_Burner.Drive = $Drive;  Attach drive to burner

$Reg_Burner.Burn(0);  Burn

Func _BurnProgress($1stParam, 2ndParam);  Function to process the OnProgress events

;When the objevent receives an event it is sent to this function to do whatever needs to be done with the info.

EndFunc


Let me know if you need to see anything else to get a better idea.

NOTE: Something I just noticed that I don't understand. The audioburner events are their own interface, and not just a part of the "IAudioBurner" interface? If I change the 3rd optional parameter in the ObjEvent to "IAudioBurnerEvent" I get an error description of "Library not registered." But shouldn't it be registered since everything else is registered and works. Or does that not matter? Note, although it says not registered I still see the progress with the X samples provided.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 5:24 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
Are you still looking into this from what I provided, or you just don't know?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 2:55 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Hmm it is not clear how are you specifying that you want to handle the OnProgress event exactly? AudioGrabber has two events OnProgress & OnFileCompressingProgress!

Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 09, 2008 6:53 am 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
You're right, here is a corrected example...minor tweak specifying OnProgress.
Code:
$Reg_Drive = ObjCreate("StarBurnX.StarBurnX");  Create starburn object

$Reg_Burner = ObjCreate("StarBurnX.AudioBurner");  Create burner object

$Reg_Drive.Initialize("");  Initialize starburnx

$Drive = $Reg_Drive.Drives.Item(0);  Get drive

$Reg_Burner.Drive = $Drive;  Attach drive to burner

;The following parameters are: "Object", "Function being activated", "Object interface(optional)"
ObjEvent ( $Reg_Burner, "OnProgress_", "IAudioBurnerEvents");  Set up burner to receive events

$Reg_Burner.Burn(0);  Burn

Func OnProgress_OnProgress($1stParam, 2ndParam);  Function to process the OnProgress events

;When the objevent receives an event it is sent to this function to do whatever needs to be done with the info.

EndFunc


The error I get now is:
ErrorNumber = -2147319779 (8002801D)
ErrorWinDescription = Library not registered.

But every other function works so shouldn't it all be registered?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2008 2:25 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

Hmmm ... it 's strange ... could you check the AudioBurner properties - LastErrorCode & LastError !!!?

Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2008 5:33 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
Both return 0.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2008 1:12 am 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
OK, I took up the trusty OLE Viewer and searched through every COM object on the computer and I found every method, property, and interface for X except the AudioBurner and AudioGrabber Events.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2008 6:51 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello,

1) The "AudioBurner Class" object should BE in the OLEView :)!

2) The "AudioGrabber" is NOT valid object!! The Grabber object should be used for grabbing the DATA and AUDIO tracks.

3) Are you sure that your example is crashed in the "Burn" call?

4) Could you tray to test the other X object (the DiscEraser for example)?

Regards,

Dmitry


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 12, 2008 9:08 pm 
Offline

Joined: Tue Sep 23, 2008 3:52 am
Posts: 58
1/ The class is there, I meant I don't see AudioBurnerEvents ANYWHERE in the OLE viewer. Inside the AudioBurner Class or out.

2/ I know.

3/ No it doesn't crash in the call, it crashes long before the call. It crashes from the setup to receive the events where it says "Library not registered". See the previous example (minus the actual files being added of course.)

4/ The DiscEraser works fine. If you mean to test if the Events are working in the DiscEraser, it is giving me the same "Library not registered".


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] 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