Click here to Skip to main content
15,910,872 members
Home / Discussions / COM
   

COM

 
AnswerRe: How to derive from a existing Interface? Pin
prasad_som7-Aug-07 20:27
prasad_som7-Aug-07 20:27 
QuestionDifference between win32 dll and com dll Pin
Nandu_77b7-Aug-07 2:47
Nandu_77b7-Aug-07 2:47 
AnswerRe: Difference between win32 dll and com dll Pin
User 2155977-Aug-07 6:03
User 2155977-Aug-07 6:03 
QuestionCDefFolderMenu_Create2 Pin
__DanC__7-Aug-07 1:41
__DanC__7-Aug-07 1:41 
Questionprinting problem through msExcel Pin
help as an alias7-Aug-07 0:26
help as an alias7-Aug-07 0:26 
AnswerRe: printing problem through msExcel Pin
User 2155977-Aug-07 6:06
User 2155977-Aug-07 6:06 
Questiondundas chart in asp.net Pin
gvpr3-Aug-07 1:31
gvpr3-Aug-07 1:31 
QuestionUnable to receive notifications from DFileSystemImageEvents interface Pin
opb2-Aug-07 20:46
opb2-Aug-07 20:46 
Hi!

I'm developing an application that's burning CD/DVDs using IMAPIv2.0, and need to receive notifications when adding data to the disc image before burning. I've implemented the DFileSystemImageEvents in the same manner as the DDiscFormat2DataEvents interface, but I don't receive any notifications when calling IFsiDirectoryItem::AddTree() on the root directory item retrieved using IFileSystemImage::get_Root().

Also, I call the AddTree() method in a separate thread, COM initialization and pointer marshalling all taken care of (I believe), and the operation for some reason blocks both the separate thread and the primary application thread. But once this operation is done, and I move on to creating result image, retrieving image stream and launching IDiscFormat2Data::Write() (still in the separate thread), the primary thread is unblocked and starts receiving events from the DDiscFormat2DataEvents interface.

This is my how I've implement the interface:

class CIMAPIBurnerImageEvent :<br />
    public CIMAPIBurnerEvent,<br />
    public ::ATL::CComObjectRootEx<::ATL::CComSingleThreadModel>,<br />
    public ::ATL::CComCoClass<CIMAPIBurnerImageEvent>,<br />
    public ::ATL::IDispatchImpl<IDispatch, &IID_DFileSystemImageEvents, &LIBID_IMAPILib2, IMAPILib2_MajorVersion, IMAPILib2_MinorVersion>,<br />
    public ::ATL::IDispEventImpl<1, CIMAPIBurnerImageEvent, &IID_DFileSystemImageEvents, &LIBID_IMAPILib2, IMAPILib2_MajorVersion, IMAPILib2_MinorVersion><br />
{<br />
    DECLARE_NOT_AGGREGATABLE(CIMAPIBurnerImageEvent)<br />
<br />
    BEGIN_COM_MAP(CIMAPIBurnerImageEvent)<br />
        COM_INTERFACE_ENTRY(IDispatch)<br />
    END_COM_MAP()<br />
<br />
    BEGIN_SINK_MAP(CIMAPIBurnerImageEvent)<br />
        SINK_ENTRY_EX(1, IID_DFileSystemImageEvents, DISPID_DFILESYSTEMIMAGEEVENTS_UPDATE, &Update)<br />
    END_SINK_MAP()<br />
<br />
public:<br />
    STDMETHOD_(VOID, Update)(IFileSystemImage* fileSystemImage, BSTR currentFile, LONG copiedSectors, LONG totalSectors);<br />
};


This class is hooked up for event listening from the IFileSystemImage interface in the same way as with the DDiscFormat2DataEvents, like this:

m_pImageEvent->DispEventAdvise(m_pFileSystemImage);

To summarize; I don't receive any notifications and both threads are blocked.

What can I possibly be doing wrong? D'Oh! | :doh:

Regards,
Ole Petter
AnswerRe: Unable to receive notifications from DFileSystemImageEvents interface Pin
User 2155973-Aug-07 3:49
User 2155973-Aug-07 3:49 
QuestionCalling a VB.NET COM+ Remotely Pin
Andez20041-Aug-07 0:06
Andez20041-Aug-07 0:06 
AnswerRe: Calling a VB.NET COM+ Remotely Pin
sunil20046-Aug-07 21:10
sunil20046-Aug-07 21:10 
QuestionDeclaration problem Pin
Karismatic31-Jul-07 20:15
Karismatic31-Jul-07 20:15 
QuestionRe: Declaration problem Pin
prasad_som31-Jul-07 20:56
prasad_som31-Jul-07 20:56 
AnswerRe: Declaration problem Pin
Karismatic31-Jul-07 21:11
Karismatic31-Jul-07 21:11 
GeneralRe: Declaration problem Pin
prasad_som31-Jul-07 21:18
prasad_som31-Jul-07 21:18 
GeneralRe: Declaration problem Pin
Karismatic31-Jul-07 21:22
Karismatic31-Jul-07 21:22 
QuestionQueryInterface + RPC_E_SYS_CALL_FAILED Pin
Gupta Suraj30-Jul-07 20:49
Gupta Suraj30-Jul-07 20:49 
Questionvaleur HRESULT Pin
Nath999929-Jul-07 20:56
Nath999929-Jul-07 20:56 
AnswerRe: valeur HRESULT Pin
CPallini29-Jul-07 21:31
mveCPallini29-Jul-07 21:31 
GeneralRe: valeur HRESULT Pin
Nath999929-Jul-07 23:16
Nath999929-Jul-07 23:16 
AnswerRe: valeur HRESULT Pin
User 716709-Aug-07 4:49
User 716709-Aug-07 4:49 
QuestionDocumentcompleted load event handler problem with AJAX Pin
_tasleem28-Jul-07 6:11
_tasleem28-Jul-07 6:11 
QuestionCasting error when using com-objects as parameters Pin
Erling Hagen27-Jul-07 6:12
Erling Hagen27-Jul-07 6:12 
Questionerror C2065 for CoInitializeEx Pin
koumodaki27-Jul-07 4:14
koumodaki27-Jul-07 4:14 
AnswerRe: error C2065 for CoInitializeEx Pin
CPallini27-Jul-07 4:41
mveCPallini27-Jul-07 4:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.