DOCUMENT:Q242867 01-AUG-2001 [vbwin] TITLE :PRB: Compile Error when Declaring MSVSAEventSourceInstaller PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS: KEYWORDS:kbEEdition kbVBp600 kbVisAnalyzer kbVS600 kbDSupport kbGrpDSTools kbVSVisAnalyzer ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Enterprise Edition for Windows, version 6.0 - Microsoft Visual Studio, Enterprise Edition 6.0 ------------------------------------------------------------------------------- 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 --------------------------- 1. Create a Visual Basic project of type ActiveX DLL. 2. Add references for both the MSVSA Automatable Event Source Installer 1.0 Type Library and the MSVSA Event Source Installer 1.0 Type Library. 3. Declare an object as follows: Dim mESI As MSVSAEventSourceInstaller 4. Save the project. 5. Make the DLL. NOTE: The same error occurs for all Visual Basic project types. REFERENCES ========== For more information, see the following in the Microsoft Developer Network (MSDN) Library (http://msdn.microsoft.com/library): Visual Studio 6.0 Documentation; Visual Studio Documentation; Component, Design and Analysis Tools; Visual Studio Analyzer Reference; Visual Studio Analyzer Concepts; Extending Visual Studio Analyzer; Guidelines for Customizing Your Application Visual Studio 6.0 Documentation; Visual Studio Documentation; Component, Design and Analysis Tools; Visual Studio Analyzer Reference; Visual Studio Analyzer Language Reference Additional query words: ====================================================================== Keywords : kbEEdition kbVBp600 kbVisAnalyzer kbVS600 kbDSupport kbGrpDSTools kbVSVisAnalyzer Technology : kbVSsearch kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB600Search kbVB600 kbVS600 kbVS600Search Version : WINDOWS:6.0 Issue type : kbprb Solution Type : kbnofix ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.