Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining


Retrieves source files by compiland and name.

HRESULT findFile ( 
   IDiaSymbol*           pCompiland,
   LPCOLESTR             name,
   DWORD                 option,
   IDiaEnumSourceFiles** ppResult


[in] An IDiaSymbol object representing the compiland to be used as a context for the search. Set this parameter to NULL to find source files in all compilands.


[in] Specifies the name of the source file to be retrieved. Set this parameter to NULL for all source files to be retrieved.


[in] Specifies the comparison options applied to name searching. Values from the NameSearchOptions enumeration can be used alone or in combination.


[out] Returns an IDiaEnumSourceFiles object that contains a list of the source files retrieved.

If successful, returns S_OK; otherwise, returns an error code.

IDiaEnumSourceFiles* pEnum;
pSession->findFile( NULL, L"sourcefile.cpp", nsFNameExt, &pEnum );
© 2015 Microsoft