SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Feb 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem in MMC, Selecting TreeView item

    We have a MMC plug in, to which remote servers can be added. When MMC is launched, if a server was previously added and saved in the console file, the logon dialog box comes up.
    Other case is when a new server is added, the server gets added, but when the user tries to select the treeview item for that server, the logon dialog for that server pops up. I am not able to handle this dialog box. The control is already in the Select method of the TreeView control, so I could not figure out where to handle the logon dialog.
    Any help will be appreciated.
    Also if the problem description is not clear, please ask for more info.

    Thanks.

    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem in MMC, Selecting TreeView item

    While I don't understand exactly what you are doing, I do have one suggestion.

    You can spawn a second thread to look for the login dialog and deal with it while you are dealing with your treeview in your primary thread. There are various ways to implement this, but the most simplistic would be to kick off a separate thread (via spawn) before dealing with the treeview. Once you are done with the treeview you have the separate thread complete. The two threads can 'communicate' by using semaphores - the primary thread can tell the secondary thread to complete this way.

    A better solution would be to override the select method for the TreeView control and add in the separate thread there. I've never done that before so I don't know how complicated it is.

    ------------------
    Atlee
    Atlee

  3. #3
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem in MMC, Selecting TreeView item

    Atlee, You probably have more experience with this than I do, but the help indicates that you can only have 1 thread per agent.

    From Help... "You can spawn only one thread for a particular Agent (that is, on a particular machine)."

    Saruna, Does the Select mathod fail because of this dialog, or can you handle the dialog after the Select command is executed?

    ------------------

  4. #4
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem in MMC, Selecting TreeView item

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by BrianCarroll:
    From Help... "You can spawn only one thread for a particular Agent (that is, on a particular machine)." <HR></BLOCKQUOTE>

    That is interesting - I have used it in the past for driving multiple applications on the same machine and it worked fine. I believe that was with 5.0.3 and I haven't tried it with 5.5.

    In light of that I would definitely stay away from my suggestion unless all else fails.

    ------------------
    Atlee
    Atlee

  5. #5
    Junior Member
    Join Date
    Feb 2002
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem in MMC, Selecting TreeView item

    Thanks for your responses.

    Yes, the Select method fails bcoz of the login dialog. I have added the code to handle that dialog in every place i can think of, but its of no use. The derived::Select method gets called. And the login box seems to come up after this method gets called.

    I tried spawning a new thread, but the main thread waits on that one, so there seems to be a deadlock.

    Also tried to override the SetTrap method but that seems to do nothing.

    Thanks for any light you can throw on this.


    ------------------

  6. #6
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem in MMC, Selecting TreeView item

    you could try and get kludgie. Write a method that selects the root of your tree and then use TypeKeys() to go down the list to the item you want.

    Perhaps you might enlist the help of a developer. In the past we've used SendMessage() or PostMessage(), Win32 api functions, to do some things that didn't work in Silk. Maybe you can post a message that selects the item you want. I'm not sure.

    ------------------

  7. #7
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem in MMC, Selecting TreeView item

    Here is a piece of sample code that I just checked out. I was actually using the parallel statement and forked off to two separate function calls. In you case I would put all my main thread functionality into one of the threads and the other thread would simply loop looking for the login dialog.

    There is probably a better way to handle this, but this is worth a try ....

    ------------------
    Atlee
    Atlee

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:04 PM.

Copyright BetaSoft Inc.