Share via


IDiaEnumSourceFiles

Enumerates the various source files contained in the data source.

IDiaEnumSourceFiles : IUknown

Methods in Vtable Order

The following table shows the methods of IDiaEnumSourceFiles.

Method

Description

IDiaEnumSourceFiles::get__NewEnum

Retrieves the IEnumVARIANT Interface version of this enumerator.

IDiaEnumSourceFiles::get_Count

Retrieves the number of source files.

IDiaEnumSourceFiles::Item

Retrieves a source file by means of an index.

IDiaEnumSourceFiles::Next

Retrieves a specified number of source files in the enumeration sequence.

IDiaEnumSourceFiles::Skip

Skips a specified number of source files in an enumeration sequence.

IDiaEnumSourceFiles::Reset

Resets an enumeration sequence to the beginning.

IDiaEnumSourceFiles::Clone

Creates an enumerator that contains the same enumeration state as the current enumerator.

Remarks

Notes for Callers

Obtain this interface by calling the QueryInterface method on an IDiaTable object. See the example for details.

Example

This example shows how to obtain the IDiaEnumSourceFiles interface from the list of tables in a DIA session object. For an example of accessing source file information, see the IDiaSourceFile interface.

 
IDiaEnumSourceFiles* GetEnumSourceFiless(IDiaSession *pSession)
{
    IDiaEnumSourceFiles * pUnknown    = NULL;
    REFIID                iid         = __uuidof(IDiaEnumSourceFiles);
    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;
}

Requirements

Header: Dia2.h

Library: diaguids.lib

DLL: msdia80.dll

See Also

Reference

IDiaSession::findFile

IDiaSession::findLinesByLinenum

IDiaTable

Other Resources

Interfaces (Debug Interface Access SDK)