Hi all,
I want to develop add-in for OUTLOOK, In that for event handling use IDispEventSimpl eImpl Interface, and declare handler function (fn) for the specified event using SINK_ENTRY_INFO , but whenever that particular event occurs my handler function gets call two times! why it happens so? I want to call it only single time.... MY code is.....
class ATL_NO_VTABLE CConnect :
public CComObjectRootE x<CComSingleThr eadModel>,
public CComCoClass<CCo nnect, &CLSID_Connect> ,
public IDispatchImpl<A ddInDesignerObj ects::_IDTExten sibility2, &AddInDesignerO bjects::IID__ID TExtensibility2 , &AddInDesignerO bjects::LIBID_A ddInDesignerObj ects, 1, 0>,
public IDispEventSimpl eImpl<1,CConnec t,&__uuidof(Out look::ExplorerE vents)>,
{
public:
BEGIN_SINK_MAP( CConnect)
SINK_ENTRY_INFO (1,__uuidof(Out look::ExplorerE vents),0xf002,o nFolderChange,& OnSimpleEventIn fo)
END_SINK_MAP()
public:
//type defination to avoid compilation 'ambigous call' errors
typedef IDispEventSimpl eImpl<1,CConnec t, &__uuidof(Outlo ok::ExplorerEve nts)> ExpEvents;
void __stdcall onFolderChange( );
}
Any idea about this, please suggest me...
Thanks & Regards,
Shyam
0 2186 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: R.Wieser |
last post by:
Hello All,
I'm trying to get a "Virtual Listbox" to work. I've currently got a form,
and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and
LBS_NODATA flags on it. I've allso subclassed the window and do see all
kinds of WS_??? messages coming by.
But now I'm stuck :-\
I've got *no* idea what to do next, and all my searching on the web leads me
|
by: Ash |
last post by:
Hello all,
I am hoping this is the appropriate newsgroup for a C++ interface
design question. I am trying to design an interface for a subscriber
to register/deregister handlers for various events. The callbacks
specified by the subscriber will be called when the events get
trigerred in a different thread. Each event has different kinds of
data associated with it. To achieve this I have the following:
// The following describes the...
|
by: Lorenzo J. Lucchini |
last post by:
Do you see any counter-indication to a token extractor in the
following form?
typedef int token;
token ExtractToken(const char** String, char* Symbol);
If it finds a valid token at the start of *String, it copies it into
Symbol (unless Symbol==NULL, in which case it doesn't copy it
anywhere); it makes *String point to the first character *after* the
token, and returns a token identificator (0 if no valid token found).
|
by: Ohad Young |
last post by:
Hi,
I have an interface with an event.
I'd like to explicitly implement the interface by a certain class.
However, I received the following error:
"An explicit interface implementation of an event must use property syntax"
Here is a code sample:
public interface IFoo
|
by: Ole Hanson |
last post by:
I am accessing my database through an interface, to allow future
substitution of the physical datastore - hence I would like to declare in my
Interface that my DAL-objects implementing the interface and accessing the
datastore MUST pass in a UserToken in the constructor of the object.
Is this not possible?
Am I forced to add the UserToken as a property on the object instead?
/Ole
| |
by: Brett Hall |
last post by:
I have a VB.NET interface that my managed C++ code is to implement. I
seem to
be stuck implementing an event defined in that interface. Does anyone
have a
simple code snippet that will show me the basics of what I need to
implement?
I've seen all the MSDN articles on implementing events in managed C++
and
I've gotten events to work without issue when implementing all the
constructs
|
by: keith.thornhill |
last post by:
hi all,
lets say i have a usercontrol which implements a custom interface. like
so:
-------------------------------------------------
interface IMyInterface
sub buttonClick()
end interface
|
by: UG |
last post by:
I just wanted to know whether any timer facility exists in C, as it is
not mentioned in K&R 2, or in the ISO Draft. By timer function i mean
that when we use standard input function like scanf() or getch() or
any other function, the interface stops to take input from user but
what if user doesn't give input for hours, the program will still be
waiting. Is there any way to circumvent the scanf() (or any other
input function for that matter)...
|
by: Smithers |
last post by:
Just looking to compile a list of "all the ways to implement events".
I'm NOT looking to get into the merits or mechanics of each in this
thread... just want to identify them all - good, bad, and ugly.
Here's what I have so far
1. Implement via the 'event' keyword (with associated delegate, etc)
2. Expose a private delegate via a public property (really a "roll yer own"
version of the 'event' keyword method).
|
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,...
|
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,...
| |
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...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| | |