다음을 통해 공유


IDiaEnumInjectedSources

데이터 원본에 포함 된 다양 한 삽입 한 소스를 열거 합니다.

IDiaEnumInjectedSources : IUnknown

메서드에서 Vtable 순서

다음 표에서 메서드를 IDiaEnumInjectedSources.

메서드

설명

IDiaEnumInjectedSources::get__NewEnum

검색은 IEnumVARIANT Interface 이 열거자의 버전입니다.

IDiaEnumInjectedSources::get_Count

삽입 한 소스를 검색합니다.

IDiaEnumInjectedSources::Item

주입 된 원본 방법으로 인덱스를 검색합니다.

IDiaEnumInjectedSources::Next

삽입 한 원본 열거 시퀀스에서 지정 된 수를 검색합니다.

IDiaEnumInjectedSources::Skip

삽입 한 원본 열거 시퀀스에서 지정 된 수를 건너뜁니다.

IDiaEnumInjectedSources::Reset

열거형 시퀀스를 처음으로 다시 설정합니다.

IDiaEnumInjectedSources::Clone

현재 열거자와 열거 상태가 같은 포함 하는 열거자를 만듭니다.

설명

호출자에 대 한 참고 사항

이 인터페이스를 호출 하 여 가져온는 IDiaSession::findInjectedSource 메서드를 호출 하거나 특정 소스 파일의 이름으로는 IDiaSession::getEnumTables GUID와 메서드는 IDiaEnumInjectedSources 인터페이스.

예제

가져오는 방법을 보여 주는이 예제 (의 GetEnumInjectedSources 함수) 사용 (는 DumpAllInjectedSources 함수)는 IDiaEnumInjectedSources 인터페이스입니다.참조는 IDiaPropertyStorage 인터페이스의 구현에 대 한의 PrintPropertyStorage 함수.있는 대체 출력에 대 한 참조를 IDiaInjectedSource 인터페이스입니다.

 
IDiaEnumInjectedSources* GetEnumInjectedSources(IDiaSession *pSession)
{
    IDiaEnumInjectedSources* pUnknown    = NULL;
    REFIID                   iid         = __uuidof(IDiaEnumInjectedSources);
    IDiaEnumTables*          pEnumTables = NULL;
    IDiaTable*               pTable      = NULL;
    ULONG                    celt        = 0;

    if (pSession->getEnumTables(&pEnumTables) != S_OK)
    {
        wprintf(L"ERROR - GetTable() getEnumTables\n");
        return NULL;
    }
    while (pEnumTables->Next(1, &pTable, &celt) == S_OK && celt == 1)
    {
        // There is only one table that matches the given iid
        HRESULT hr = pTable->QueryInterface(iid, (void**)&pUnknown);
        pTable->Release();
        if (hr == S_OK)
        {
            break;
        }
    }
    pEnumTables->Release();
    return pUnknown;
}


void DumpAllInjectedSources( IDiaSession* pSession)
{
    IDiaEnumInjectedSources* pEnumInjSources;

    pEnumInjSources = GetEnumInjectedSources(pSession);
    if (pEnumInjSources != NULL)
    {
        IDiaInjectedSource* pInjSource;
        ULONG celt = 0;

        while(pEnumInjSources->Next(1, &pInjSource, &celt) == S_OK &&
              celt == 1)
        {
            IDiaPropertyStorage *pPropertyStorage;
            if (pInjSource->QueryInterface(__uuidof(IDiaPropertyStorage),
                                           (void **)&pPropertyStorage) == S_OK)
            {
                PrintPropertyStorage(pPropertyStorage);
                pPropertyStorage->Release();
            }
            pInjSource->Release();
        }
        pEnumInjSources->Release();
    }
}

요구 사항

헤더: Dia2.h

라이브러리: diaguids.lib

DLL: msdia80.dll

참고 항목

참조

IDiaSession::findInjectedSource

IDiaSession::getEnumTables

IDiaPropertyStorage

IDiaInjectedSource

기타 리소스

인터페이스(디버그 인터페이스 액세스 SDK)