Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. AliAndAli

    TPM_LEFTBUTTON and TrackPopupMenu

    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...
  2. AliAndAli

    On page 85 of Don Box book, Essenti

    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...
  3. AliAndAli

    Can someone please explain to me wh

    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
  4. AliAndAli

    DCOM Server Hanging

    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...
  5. AliAndAli

    Linking to DLL (newbi)

    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...
  6. AliAndAli

    debugging a com application.

    In case anybody ran into this problem, go to your server project and in project setting - debug, set the excutable to be the client.
  7. AliAndAli

    I have an ATL project, that uses MF

    By the way, my application starts a new UI thread and then the new thread creates the dialog.
  8. AliAndAli

    I have an ATL project, that uses MF

    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...
  9. AliAndAli

    debugging a com application.

    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...
  10. AliAndAli

    How do I make a program wait for a com call

    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?
  11. AliAndAli

    memory leak and dialog boxes.

    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...
  12. AliAndAli

    CoInitializeEx()

    in your project setting add WIN32_DCOM to your preprocessor definitions.
  13. AliAndAli

    Dynamically creating multi-dimensional arrays

    What was the answer?
  14. AliAndAli

    memory leak and dialog boxes.

    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...
  15. AliAndAli

    I have a client on one machine and

    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...
  16. AliAndAli

    Two instance of the server is launched

    Because of the problems that I have with connection points and multiple threads. I read an article by microsoft that deals with connection points and multiple threading, but it covers only special cases. I like to implement my own connection point to be able to use it as I wish. And once there...
  17. AliAndAli

    Two instance of the server is launched

    I thought about doing that, and to me, it sounds like it should work. But I never tried it. It sounds like there must be a solution that does not require strange and convoluted hacks that makes the code difficult to read and understand (and that is probably connection points. But what happens if...
  18. AliAndAli

    Two instance of the server is launched

    Actaully both of the COM object that I have are singletons. But I think singleton does not work in this case. The reason is when server A starts, no instance of the COM object in the server A is instantiated. The COM (or actually ATL) obect is a template object and no object that inherits from...
  19. AliAndAli

    Two instance of the server is launched

    I have two servers that talk to each other using DCOM interfaces. Although I probably should be using connection point for communication in one of the directions, I do not want to use connection points. Connection in both direction is done through regular com interfaces. Here is my problem: 1...
  20. AliAndAli

    Dialog boxes and ATL

    I have a COM server which contains a dialog box. When I start the server through CoCreateInstanceEx called by a client, the dialog box does not come up. I assume this behavior is caused by the fact that the object, started by the client, does not have access rights to the windows station. Deos...

Part and Inventory Search

Back
Top