473,806 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help in writing Event Sink in COM

1 New Member
Hi all,

I am trying to create a class that will act as event sink to a COM object. Just to tell you the COM object is SoftUSBEndpoint which is part of Device Simulation Framework.

Anyways its outbound interface is ISoftUSBEndpoin tEevents which implements IUnknown interface. It is shown below

ISoftUSBEndpoin tEvents : public IUnknown
{
...........
.........
};

I tried to implement my EventSink class using IDispEventSimpl eImpl but its not working for me.
Is it because IDispEventSimpl eImpl provides implementation of IDispatch which is not in my hierarchy? If this is so, then how to build non COM event sink class

By the way it worked fine when I implemented my event sink class as a COM class as shown below

class ATL_NO_VTABLE CLoopbackDevice :
public CComObjectRootE x<CComSingleThr eadModel>,
public CComCoClass<CLo opbackDevice, &CLSID_Loopback Device>,
public ISoftUSBEndpoin tEvents,
public IDispatchImpl<I LoopbackDevice, &IID_ILoopbackD evice, &LIBID_SoftUSBL oopbackLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{

Any clue??
Aug 27 '08 #1
1 3337
sicarie
4,677 Recognized Expert Moderator Specialist
Bumping .
Aug 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1889
by: | last post by:
I have the some HTML and JavaScript code that implements a type-ahead capability for a text input control linked to a select control (see end of message). The type-ahead functionality works well. The only problem is that I'd like to implement an external event sink so that when the text control loses focus, I can do ... well whatever I might happen to want the event sink to do. The code below will even sink the onblur event of the...
0
3640
by: Notlwonk | last post by:
I have written an event sink in C# that hooks into our Exchange Server 2000 store. The sink fires and the various LOG files are created, but for some reason I cannot seem to read-in the e-mail Subject or Message Body for the e-mail that triggers the Event Sink to run. What am I doing wrong? Thank you,
1
1949
by: Bob Whiton | last post by:
I have an unmanaged class which has a member variable: gcroot<DataTable*> myDataTable; I would like to sink the RowDeleting event in my UNmanaged class. However, I can't declare an event handler in the unmanaged class because the types are managed (compiler error C3265). For example, I can't declare the following sink: static void Row_Deleting(Object* sender, System::Data::DataRowChangeEventArgs* e)
0
1399
by: techie | last post by:
I have created an event sink in my ATL COM project. The event sink receives events from a C# component. There is no problem with receving events but when my COM object is released I get an access violation - (MSCORWKS.DLL): 0xC0000005: Access Violation. Here's my event sink class: namespace { static const int EVENT_ID = 111;//any arbitary value
6
1743
by: utkarsh | last post by:
Hi All, I am using the following method "FireAsync" (i got the following information from the google groups) to fire the event for all the subscribers. Is there another way to fire the event to all the subscriber asynchronously efficiently. As because in my application this method is being call 60-100 times a second.
4
2771
by: Dan Soendergaard | last post by:
Hello fellow developers, I've created a control which derives from the .NET TextBox. I then wanted to add two events to the new control, so I added the following to the control code: public event EventHandler InvalidValueMatched; public event EventHandler ValidValueMatched; But when one of the events is raised I get this exception:
9
3624
by: Eric Kaplan | last post by:
I have a function that will download XML from internet and load XML data into database. The function will take 5 - 20 minutes to finish. I heard I should use event sink (event listener) when function is finished the task, then it will notify the caller. So I am planning to create a seperate thread to do the long XML loading function by using - _beginthreadex()
5
7730
by: PatlaDJ | last post by:
Java SAX parser, please need a clue how to get the raw XML code of the currently parsing event... needed for logging, debugging purposes. Here's and example, letting me clarify exactly what i need: (see the comments in source) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { //..Here... or maybe somewhere elsewhere I need on my disposal the raw XML code of every XML tags...
5
1291
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I have an event sink which does some work to the software we use, according to the data contained within an email. This is all working hunky dory. What i want to know is whether it is possible to send an email from inside of an event sink. So for example an email comes into the event sink, and then the event sink generates a new email which it then sends. The reason I ask this is because the event sink code sits on the exchange...
0
9597
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10372
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5682
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3851
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.