Microsoft KB Archive/119509

{|
 * width="100%"|

WordBasic Declare Statement Case Sensitive in Word for Win NT

 * }

Q119509

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
 * Microsoft Word for Windows, version 7.0
 * Microsoft Word for Windows NT, version 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.

Additional query words: 6.0 winword ntword wordnt 7.0 word95 word7 word6

Keywords :

Issue type :

Technology :