WordBasic Declare Statement Case Sensitive in Word for Win NT

Last reviewed: August 5, 1997
Article ID: Q119509
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, version 7.0
  • Microsoft Word for Windows NT, verison 6.0

SYMPTOMS

The Win32 API function name you include in a Declare statement is case sensitive. For example, the following sample Declare statement is not valid if Word is running under Windows 95 or Windows NT:

  Declare Function getwindowsdirectorya Lib "KERNEL32" \
    (lpszPath As String, nBufferSize As Long) As Long

However, if you use the correct combination of uppercase and lowercase letters in the function name, the same statement is valid:

  Declare Function GetWindowsDirectoryA Lib "KERNEL32" \
    (lpszPath As String, nBufferSize As Long) As Long

CAUSE

When you access named functions in 32-bit .DLL files, Windows 95 and Windows NT require the calling application to provide the exact name of the function, including proper case, before the function can be called. Because Word for Windows NT and Word 7.0 are 32-bit applications, they are required to adhere to this requirement, including the WordBasic Declare command.

NOTE: The .DLL filename in the Declare command is NOT case sensitive.

Kbcategory: kbusage kbmacro kbenv KBSubcategory:


Additional reference words: 6.0 winword ntword wordnt 6.0a 6.0c 7.0
word95
word7 word6
Version : 6.0 6.0a 6.0c 7.0
Platform : WINDOWS


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.

Last reviewed: August 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.