PRB: GetOpenFileName() Fails If lpstrFile Buffer Is Not NULL Terminated (222003)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
- the operating system: Microsoft Windows 2000
This article was previously published under Q222003 SYMPTOMS
The GetOpenFileName function fails with a CommDlgExtendedError of CDERR_INITIALIZATION(0x0002).
CAUSE
The lpstrFile buffer of the OPENFILENAME structure is not NULL terminated.
RESOLUTION
According to the Platform SDK documentation, the first character of the lpstrFile buffer must be NULL if the buffer is not being used for initialization of the File Name edit box.
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 5/14/2004 |
---|
Keywords: | kbCmnDlgFileO kbdocfix kbprb KB222003 |
---|
|