ShellWindows._NewEnum 메서드

ShellWindows 개체의 복사본인 새 ShellWindows 개체를 만들고 반환합니다.

구문

retVal = ShellWindows._NewEnum()

매개 변수

이 메서드에는 매개 변수가 없습니다.

반환 값

형식: IUnknown**

ShellWindows 개체 복사본에 대한 개체 참조입니다.

예제

다음 예제에서는 사용 중인 _NewEnum 보여줍니다. VBScript 및 Visual Basic에 대해 적절한 사용법이 표시됩니다. 이 메서드는 JScript와 함께 사용할 수 없습니다.

Vbscript:

<script language="VBScript">
    function fnShellWindowsNewEnumVB()
        dim objShell
        dim objShellWindows
        
        set objShell = CreateObject("shell.application")
        set objShellWindows = objshell.Shell_Windows

        if (not objShellWindows is nothing) then
            dim objEnumItems
            
            for each objEnumItems in objShellWindows
                alert(objEnumItems.Type)
            next
        end if

        set objShellWindows = nothing
        set objShell = nothing
    end function
 </script>

Visual Basic:

Private Sub fnShellWindowsNewEnumVB()
    Dim objShell        As Shell
    Dim objShellWindows As ShellWindows
    
    Set objShell = New Shell
    Set objShellWindows = objshell.Shell_Windows

    If (Not objShellWindows Is Nothing) Then
        Dim vEnumItem As Variant
        
        For Each vEnumItem In objShellWindows
            Debug.Print vEnumItem.Type
        Next vEnumItem
    End If

    Set objShellWindows = Nothing
    Set objShell = Nothing
End Sub

요구 사항

요구 사항
지원되는 최소 클라이언트
Windows 2000 Professional, Windows XP [데스크톱 앱만 해당]
지원되는 최소 서버
Windows 2000 Server[데스크톱 앱만]
헤더
Exdisp.h
DLL
Shell32.dll(버전 4.71 이상)