Visual Studio automation interface
Thank you for reply Bertrand, but unfortunately your script does not run in
Visual Studio 97. It says that such method is not supported. Besides, the
function GetIDsOfNames of IDispatch interface for the project object returns
0x80020006 that means error "Unknown name." Also I couldn't find the
function in the type library for IBuildProject located in devbld.pkg file as
well as in the bldauto.h
After that I decided to look in Visual Studio 98 and have found it there.
Its DISPID is 0x65 but VS97 really doesn't support this DISPID returning
0x80020003 [member not found]. So, unfortunately, the function AddFile is
implemented starting from VS98.
Thanks again for help,
>Home Page (Objects) | Overview | FAQ | Reference
>Applies to: BuildProject object
>Adds a file to the project.
>An expression that evaluates to a BuildProject object.
>A String that contains the name of the file.
>The following example adds a file to a project:
>If Projects(1).Type = "Build" Then
> Projects(1).AddFile "myfile.cpp"
>>I'm developing add-in for Visual Studio that eventually have to insert
>>files to the user project. All I could find are interfaces IGenericProject
>>and IBuildProject which do not provide such functionality. However I'm
>>this functionality exists because other add-ins like ATL object wizard can
>>insert files to user project. Please tell how can I solve my problem or
>>where to find more info about it.
>>Thanks in advance,