In the documentation for TrackPopupMenu it says that:
TPM_LEFTBUTTON Causes the pop-up menu to track the left mouse button.
TPM_RIGHTBUTTON Causes the pop-up menu to track the right mouse button.
In the following code, changing TPM_LEFTBUTTON to TPM_RIGHTBUTTON does not change anything...
On page 85 of Don Box book, Essential COM, is a code like this:
STDMETHODIMP MyClass::UseIt(VARIANT var) {
VARIANT var2;
VariantInit(&var2);
VariantChangeType(&var2, &var, 0, VT_BSTR);
ustrcpy(m_szSomeDataMember, SAFEBSTR(V_BSTR(&var2)));
VariantClear(&var2);
}
I am wondering what happens if...
Can someone please explain to me what is the difference between true and TRUE and why we need both of them? There is also a Variant_true ( I probably have a spelling error in this last one) to futher complicate the issue.
Thanks
Yazster,
The DCOM server will exit if the reference count on it goes to zero. For this to work you have to be careful to call release for each advise. The scenario you are describing ( server exiting after few minutes, which I think is actually 2 minutes) is not meant to be normal operation...
I have a regular dll and try to link to it from a MFC dialog based project.
I get unresolved linker error due to the name mangling. I have a .def file in my dll project to export functions. I changed the name of the function ( it is a static function of the dll class drived from CWinApp)to the...
I have an ATL project, that uses MFC. If I link statically to MFC everything is fine, but if I set my project setting to use MFC in a shared DLL, then when I try to bring up a dialog, I fail with an Assertion failure. This is very similar to the problems in coding a dll where one has to use...
When using DCOM and client server on two separate machine, I can start the server in the debugger and set some break points. Then when I start the client, when client makes a request to the server, the server process stops at the break points and I can debug the server. The same procedure does...
When a COM call comes in, if the server is not running, COM will start the server. The server will die if no client is connected to it ( when the reference count is zero). Does your program do something that does not fit with this model?
Thank you for the responses. The dialog I am creating is a member of the class ( so, it is created on the stack.)All I am doing is calling m_dlg.Create() rather than DoModal to make it Non modal. It appears to me that I should not call delete on this dialog. I wonder if there is any problem in...
I started a simple dialog based project. On the dialog, there is a push button that when pressed brings up another dialog. I use the task manger to watch the memory used by my program. I bring up the second dialog by pressing on the push button and then close it. After I repeat this for few...
I have a client on one machine and server on another. I am logged in on both machine as the user. I am node Admin on both machines. I start the server on one machine and then the client on the other. Client can successfully call advise on the source interface of the server. But, if I don't start...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.