Microsoft KB Archive/207564

= DOC: VBCE Error: "The Declare statement is incorrectly formatted" =

Article ID: 207564

Article Last Modified on 8/19/2005

-

APPLIES TO


 * Microsoft Windows CE Toolkit for Visual Basic 6.0

-



This article was previously published under Q207564



SUMMARY
When compiling a Windows CE Toolkit for Visual Basic (VBCE) application which includes a Declare statement, the following error message may appear:

The Declare statement is incorrectly formatted. Please see the documentation for more information on the format of a Declare statement.



MORE INFORMATION
The Winceapi.txt file incorrectly includes some Declare statements that include parameters declared as "Any". This is not supported in Windows CE. By changing the declaration of the parameters to another data type, such as Long, the error will be avoided.

For example, the following Declare statement needs to be changed:

Declare Function SendMessage Lib "Coredll" Alias "SendMessageW" ( _  ByVal hwnd As Long, _   ByVal wMsg As Long, _   ByVal wParam As Long, _   lParam As Any) As Long The statement can be changed to the following:

Declare Function SendMessage Lib "Coredll" Alias "SendMessageW" ( _   ByVal hwnd As Long, _    ByVal wMsg As Long, _    ByVal wParam As Long, _    ByVal lParam As Long) As Long

Additional query words: kbDSupport vbce vbce6 wce

Keywords: kbbug kbtoolkit kbdocfix kbpending KB207564

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.