Outlook 2016 doesn't call SynchronizeInBackground - outlook

In case when CMsgStore::QueryInterface method queries for the IID_IMAPISync it returns my own implementation (CSync) of the IMAPISync interface. Later the CSync object got two method calls of CSync::AddRef and then two method calls of CSync::Release.
Can anybody help me to learn why the CSync::SynchronizeInBackground method isn't called?

Related

What is the difference between calling event-methods on provider. VS contract.?

The Docs don´t explain any difference, I could imagine that calling the methods on contract restricts them to events this contract emits, but the filter obj is made for these restrictions, isn´t it?
So is it just for convenience so that you could call the methods either way?
Docs for the Contract.Methods
Docs for the Provider.Methods

Resharper refactoring creating static methods

When you refactor a method using Resharper 8 and the method arguments do not depend on instance variables of the class, a static method is constructed. However, an instance method could also have been created.
Is a static method created for performance reasons?
TIA.
That's right. Here’s what the MSDN documentation has to say about it:
Members that do not access instance data or call instance methods can
be marked as static (Shared in Visual Basic). After you mark the
methods as static, the compiler will emit nonvirtual call sites to
these members. Emitting nonvirtual call sites will prevent a check at
runtime for each call that makes sure that the current object pointer
is non-null. This can achieve a measurable performance gain for
performance-sensitive code. In some cases, the failure to access the
current object instance represents a correctness issue.
Source: http://msdn.microsoft.com/en-us/library/ms245046.aspx

cocos2d-x write the callbacks using c++11 lambda

sometimes the usage of a callback is very limited, which makes it in-appropriate to be a member function. so at these times I always want to write the event call backs as lambda functions as the usage is limited the codeblock is compact if wrote in lambda
but this callback is generally defined member functions and there are interface limitations inforced on it
I wonder if it is possbile to rewrite the callback in lambda functions ?
pMenuOK->setTarget(this,menu_selector(PlayerLayer::onPlayed));
void PlayerLayer::onPlayed(cocos2d::CCObject *pSender);
For simple CCCallFunc callbacks that take no parameters, you may want to check out
MCBCallLambda.
I don't think it's possible. The way they are called by Cocos2d-x is by using a target pointer to a CCObject in combination with a method pointer. Thus, the target has to be a CCObject. As you said, these are defined for different types of parameters. Cocos2d-x need to be changed to support this.
It is possible for any method that accepts CCCallFunc [1] or its subclasses. Create own subclass of CCCallFunc which keeps std::function and overrides execute method and maybe some other methods (figure out which implementation needed from CCCallFunc sources).
[1] http://www.cocos2d-x.org/embedded/cocos2d-x/dd/d6e/classcocos2d_1_1_c_c_call_func.html

How do in-built methods do things?

Just something that has been playing on my mind recently. A java example of what I mean by an inbuilt method: System.out.println("hi");. How does this method actually make 'hi' appear on screen? I can imagine a long series of methods inside methods inside methods, but how would the 'base' method do what it is supposed to?
this is a good example for println. http://luckytoilet.wordpress.com/2010/05/21/how-system-out-println-really-works/
Essentially, the call gets processed through the call stack, until it reaches native code, then you're into OS specific code, i.e. the windows API.

method invoked or method called?

I am not sure if this question is relevant but I see the expression "the method is invoked" a lot , So Is there a technical difference between invoking a method or calling a method or It's just other word for the same action ?
P.S : Clearly , I am not an English native speaker and looking for invoke definition on the web didn't help .
"Invoking" a method and "calling" a method are the same thing.
There isn't typically a technical difference.
If I were to describe my own usage of the terms, I suppose I would reserve "invocation" for the subset of method calls where there is no value being returned or the value returned is (or can be) ignored. In other words I typically wouldn't say I'm invoking a function.
For instance, I would sooner say that "method A invokes Thread.start()" than "method B invokes toString()". Invoke has the connotation of starting an action. But I would say that I call either of them.

Resources