FIX: Too many delegate types in a managed type definition causes a C1001 compiler error in Visual Studio .NET 2002 (315544)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
This article was previously published under Q315544 SYMPTOMS When you define more than 18 delegate types in a managed
type (class or struct), and then you try to compile the code, you receive the
following error message: "Q315544.cpp(181) : fatal error
C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2844) Please
choose the Technical Support command on the Visual C++ Help menu, or open the
Technical Support help file for more information" RESOLUTION Move the delegate definitions outside of the managed type
definition. For example, if you have a class such as the following:
__gc class CApp {
__delegate int MyFunc1(int);
////Place the other 18 delegate definitions here.
}
you can work around the problem by placing the delegate definitions as
in the following sample code:
__delegate int MyFunc1(int);
__gc class CApp {
MyFunc1* one;
}
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in all versions of Visual Studio .NET
(2003).
REFERENCESFor
additional information, click the article number below to view the article in
the Microsoft Knowledge Base: 305980 PRB: C1001 Compiler Error Message - Suggestions for Troubleshooting
For additional resources, see the following
Microsoft Developer Network (MSDN) articles:
Modification Type: | Minor | Last Reviewed: | 8/25/2005 |
---|
Keywords: | kbvs2002sp1sweep kbfix kbbug kbpending KB315544 |
---|
|