Go Back   Club CDFreaks - Knowledge is Power > International Chat: Software related > Nero SDK Discussion Forum


Commercial message



Nero SDK Discussion Forum Discuss, NeroCOM events in C , please some advice at International Chat: Software related forum; Hi, i'm trying to use NeroCOM in plain C, everything seems to work except events, basically i'm doing this i query the IConnectionPointContainer in the Nero object i use FindConnectionPoint of IConnectionPointContainer to get the ConnectionPoint of INeroEvents i use Advise with the ConnectionPoint with a COM object


Reply
 
Thread Tools
Old 17-01-2005   #1 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 2
NeroCOM events in C , please some advice

Hi, i'm trying to use NeroCOM in plain C, everything seems to work except events, basically i'm doing this

i query the IConnectionPointContainer in the Nero object

i use FindConnectionPoint of IConnectionPointContainer to get the ConnectionPoint of INeroEvents

i use Advise with the ConnectionPoint with a COM object of my own that exposes INeroEvents

Advise returns Ok but events don't get fired, only QueryInterface is fired asking for IID__INeroEvents

Is this the correct way?, what i'm doing wrong?
donPanucci is offline   Reply With Quote
Old 17-01-2005   #2 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
It looks pretty ok. What process have you started in order to expect any event? What exact event were you expecting? How are you expecting it? If everything is ok, your Invoke() method should get called with the proper DISPID and with the event arguments packed in DISPPARAMS.
alexp is offline   Reply With Quote
Old 18-01-2005   #3 (permalink)
New on Forum
 
Join Date: Jan 2005
Posts: 2
Re: NeroCOM events in C , please some advice

Thanks for helping, i'm trying to port the NeroFiddlesCOM example. i'm expecting the events that would fire in the Burn_Click() sub in the vb example, i'm doing exactly the same, the CD track is burned but events aren't triggered

i have some clues of what may be wrong, when the QueryInterface() of my sink object is called i can only identify requests for IID_IUnknown and IID__INeroEvents but then it requests for other iids that i don't know what they are, so i'm returning #E_NOINTERFACE for those. So what are those interfaces i'm supposed to handle?

also i have another sink object for the _INeroDriveEvents
donPanucci is offline   Reply With Quote
Old 18-01-2005   #4 (permalink)
Nero Developer
 
Join Date: Oct 2003
Posts: 605
Pardon me if I am misinterpreting it, but it seems to me that you define an arbitrary function with a name of Burn_Click() and expect it to magically become an event handler. You cannot do this. Your _INeroEvents implementation should handle events in IDispatch::Invoke() method by doing a switch on various DISPIDs of interest. It is a very tedious work to do in straight C, although not impossible.

You must also recognize at least IID_IDispatch along with IID_IUnknown and IID__INeroEvents.

Although this is all doable in C, I cannot believe someone would actually try it. If you consider to take a suggestion and move to straight NeroAPI, things might get a whole lot easier for you. Depending on the level of complexity of your app, NeroAPI could be a better choice as you would avoid ugly COM handling in C. AddRef-ing and Release-ing all those interface pointers manually is simply a disaster waiting to happen.
alexp is offline   Reply With Quote
 
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NeroCOM trouble with repeated events JackBowman Nero SDK Discussion Forum 4 19-07-2005 15:33
Events NeroCom in C++ Builder Tors Nero SDK Discussion Forum 5 05-05-2004 19:02
Nerocom + c# + firing events to display Curtis Nero SDK Discussion Forum 5 26-03-2004 17:58
Delphi 7 and NeroCOM Events GMTyrael Nero SDK Discussion Forum 5 17-02-2004 13:53
NeroCOM and .NET and events LouClarkso Nero SDK Discussion Forum 7 19-12-2003 12:03


All times are GMT +2. The time now is 09:21.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0