Microsoft KB Archive/115081

DOCERR: DragQueryFile Return Code Can Be Misleading

PSS ID Number: Q115081 Article last modified on 09-29-1995

3.10 4.00 | 3.10 3.50 3.51

WINDOWS | WINDOWS NT

= SYMPTOMS =

The documentation for DragQueryFile in the “Win32 Programmer’s Reference” indicates that the return value is “the count of the characters copied” or “the required size, in characters, of the buffer”. However, the actual return values do not include the trailing null character in this count.

= RESOLUTION =

The correct description for the return value is “the length of the string returned, not including the terminating null character” or “the length of the string that would be returned, not including the terminating null character”.

The Win32 SDK 3.5 documentation has been corrected.

Additional reference words: 3.10 3.50 3.51 4.00 95 KBCategory: kbref kbdocerr KBSubcategory: UsrDnd ============================================================================= Copyright Microsoft Corporation 1995.