FIX: C1001: msc1.cpp, Line 581, Prototype Missing SemicolonLast reviewed: September 16, 1997Article ID: Q97674 |
1.00
WINDOWS
kbtool kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSAn attempt to compile the source code below fails and the C/C++ compiler generates following messages:
error C2085: 'hInst' : not in formal parameter list error C2061: syntax error : identifier 'HWAVEIN' fatal error C1001: internal compiler error (compiler file 'msc1.cpp', line 581)These errors occur in any memory model and with any optimizations.
RESOLUTIONTo eliminate the C1001 internal compiler error, first correct the other errors in the code. To do so, terminate the MakeInstanceActive() function prototype with a semicolon (;).
STATUSMicrosoft has confirmed this to be a problem in the products listed at the beginning of this article. This problem was corrected in C/C++ compiler version 8.0c, included with Visual C++ for Windows, version 1.5.
MORE INFORMATIONThe errors above occur because a semicolon is missing from the MakeInstanceActive() prototype. This error causes other errors later in the file.
Sample Code
/* * Compile options needed: none */ #include <windows.h>BOOL InitApplication(HANDLE); BOOL InitInstance(HANDLE, int); HWND MakeInstanceActive(char *WindowName) // Semi-colon missing here HANDLE hInst; HWAVEIN ghWaveIn = NULL; WORD gwWantToClose = FALSE; int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; if (hPrevInstance) { MakeInstanceActive("TestClass"); return FALSE; } if (!hPrevInstance & !InitApplication(hInstance)) return (FALSE); if (!InitInstance(hInstance, nCmdShow)) return (FALSE); while (GetMessage(&msg, NULL, NULL, NULL)) { TranslateMessage(&msg); DispatchMessage(&msg); } return (msg.wParam);}
|
Additional reference words: 1.00 8.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |