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

ID: Q207564


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 6.0, version 1.0


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 : kbdocfix kbToolkit kbVBp600bug kbWinCE kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: December 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.