CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2009
    Posts
    4

    Question SHDocVw.ShellWindows not working in Windows Server 2008

    Hi..all

    I found one problem Windows Server 2008.
    please refer the following
    code. it gives me the "ieplorer.exe" while i am
    running this code in XP
    or 2003, but while I am running this code in
    Windows Server 2008 it is
    not giving me the proper result. it gives me
    "Explorer.EXE" insted
    "ieplorer.exe".

    before run this command you have to add
    reference of shdocvw.dll in
    your project. i am using the VB 6.0

    1. Dim IE As SHDocVw.InternetExplorer
    2. Dim MainIE as SHDocVw.InternetExplorer
    3. Dim sws As SHDocVw.ShellWindows
    4. Dim ie As SHDocVw.InternetExplorer
    5.
    6. Set sws = New
    SHDocVw.ShellWindows
    7. For Each ie In sws
    8. Debug.Print ie.Name
    9. If ie.Hwnd=TmpStoredHandle then
    10. Set MainIE =IE
    11. Exit For
    12. End IF
    13. Next


    With the Help of above code my MainIE Object
    will set to my
    Previously stored handle( In TmpStoredHandle)
    .
    Does anybody know that how can i get the
    existing IE(Opened
    Internet Explorer) detail with the help of
    SHDocVw.ShellWindows in
    Windows Server 2008?

    I have also try to get the same thing with the
    help of EnumWindows
    AddressOf GetTopWindows, ByVal 0&
    with this API i can get all the opened windows
    with Its handle, but i
    dont know that how can i set my MainIE
    object with help of this
    handle.

    Can anybody help me?
    Thanks in Advance

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: SHDocVw.ShellWindows not working in Windows Server 2008

    Security Settings are set to Very Secure in Windows 2008 Server, and can't be changed
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jun 2009
    Posts
    4

    Exclamation Re: SHDocVw.ShellWindows not working in Windows Server 2008

    Quote Originally Posted by dglienna View Post
    Security Settings are set to Very Secure in Windows 2008 Server, and can't be changed
    Is there anyway to get that windows information?

  4. #4
    Join Date
    Apr 2009
    Posts
    394

    Re: SHDocVw.ShellWindows not working in Windows Server 2008

    snkt shah,

    [start side note]

    I doubt your posting over at wrox will get many replies so try http://www.vbforums.com if you cannot get any help here. Sorry I don't have win serv 2k8 so I have no idea.

    [/end side note]

    Good Luck

  5. #5
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: SHDocVw.ShellWindows not working in Windows Server 2008

    snkt shah, regardless of what OS you are using, your code seems to be wrong in any case

    It looks like you're trying to enumerate all the IE windows.
    With The first segment of code you have added, you can actually use to enumerate both IE as well as Windows Explorer windows. For IE, you use the Location proeprty ( not sure about full name )
    For Windows Explorer, you'll need the path property

    You could always use the FindWindow and FindWindowEx properties as well, but just remember that, with IE 7, there is some differences in getting certain info than there was in IE 6

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured