dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: [help]i am puzzled with windows cluster api

  1. #1
    Join Date
    Dec 2008
    Posts
    5

    [help]i am puzzled with windows cluster api

    i am trying to get information from windows cluster with api(ClusApi.h/lib),but i can not found the function that can get the node which a group belong to.for example:
    i can use "cluster group " command in cmd line. follow will be show:
    group node state
    --------------- --------------- ----------------
    123 SVR1 online

    hope for some advise.
    best regards,

  2. #2
    Join Date
    Dec 2008
    Posts
    5

    Re: [help]i am puzzled with windows cluster api

    o ..i am really sorry .i post this in a wrong forum area,i wanted to post in "C++ and WinAPI"
    i am fresh...,could some one delete this post?thanks very much.

  3. #3
    Join Date
    Sep 2000
    Location
    Indianapolis
    Posts
    6,738

    Re: [help]i am puzzled with windows cluster api

    Moved.

    Brad!
    -----------------------------------------------
    Brad! Jones,
    LotsOfSoftware, LLC
    -----------------------------------------------

  4. #4
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,153

    Re: [help]i am puzzled with windows cluster api

    [ removed duplicate thread ]
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  5. #5
    Join Date
    Dec 2008
    Posts
    5

    Re: [help]i am puzzled with windows cluster api

    ok,then.I finally get the way...code like this:

    ' List Node To Active Group
    On Error Resume Next

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\mscluster")
    Set colItems = objWMIService.ExecQuery("Select * from MSCluster_NodeToActiveGroup")

    For Each objItem in colItems
    Wscript.Echo "Name: " & objItem.GroupComponent
    Wscript.Echo "Name: " & objItem.PartComponent
    Next

    save as .vbs file run with command: cscript *.vbs

    thanks for everybody‘s attention,
    luck!

  6. #6
    Join Date
    Dec 2008
    Posts
    5

    Re: [help]i am puzzled with windows cluster api

    despond... these code can only work with windows 2003 and windows 2008 server, but not work with windows 2000.
    who can give me a hand?
    with expectation.

  7. #7
    Join Date
    Dec 2008
    Posts
    5

    Re: [help]i am puzzled with windows cluster api

    ok...the function is GetClusterGroupState,
    thanks for everyone's attention..
    wish u luck.
    flush,

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)