Microsoft KB Archive/242867

= PRB: Compile Error when Declaring MSVSAEventSourceInstaller =

Article ID: 242867

Article Last Modified on 5/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Studio 6.0 Enterprise Edition

-



This article was previously published under Q242867



SYMPTOMS
When compiling a Visual Basic project that accesses the Visual Studio Analyzer programming interfaces, the following error may occur:

Compiler error:

Expected user-defined type, not project



CAUSE
The project contains references to both the automatable (Visual Basic and Visual J++) and non-automatable (Visual C++) interfaces.



RESOLUTION
Remove the references to the non-automatable interfaces from Project References.



MORE INFORMATION
To access the Visual Studio Analyzer programming interfaces from within Visual Basic, you need to add two type library references to your Visual Basic project. Once you add the type library references, you can access the methods within the programming interfaces using the Object Browser.

The following libraries are provided for use with Visual Basic:


 * MSVSA Automatable Event Source Installer 1.0 Type Library
 * MSVSA Automatable Inproc Event Creator 1.0 Type Library

The following libraries are provided for use with Visual C++ and should not be referenced in a Visual Basic project:


 * MSVSA Event Source Installer 1.0 Type Library
 * MSVSA Inproc Event Creator 1.0 Type Library

Steps to Reproduce Behavior
 Create a Visual Basic project of type ActiveX DLL. Add references for both the MSVSA Automatable Event Source Installer 1.0 Type Library and the MSVSA Event Source Installer 1.0 Type Library.  Declare an object as follows: Dim mESI As MSVSAEventSourceInstaller  Save the project. Make the DLL.</ol>

NOTE: The same error occurs for all Visual Basic project types.

<div class="references_section">