Microsoft KB Archive/150950

= DOCFIX: SelectObject Declaration is Incorrect in API Viewer =

Article ID: 150950

Article Last Modified on 7/16/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q150950



SUMMARY
The following describes a documentation error for the SelectObject function call as listed in the 32-bit edition of Visual Basic version 4.0 WIN32API.TXT file used by the Application Programming Interface (API) Viewer: Declare Function SelectObject Lib "user32" Alias "SelectObject" _ (ByVal hdc As Long, ByVal hObject As Long) As Long Attempting to use this function as documented results in the following (error 453) error message:

Specified DLL Function Not Found



STATUS
This documentation error was fixed in Visual Basic 5.0.



MORE INFORMATION
The SelectObject function is incorrectly documented as existing in the USER32.DLL file. This function is a Graphics Device Interface function and is therefore in the GDI32.DLL file. The correct declaration is as follows: Declare Function SelectObject Lib "GDI32" Alias "SelectObject" _ (ByVal hdc As Long, ByVal hObject As Long) As Long You can also change the statement in the file win32api.txt so the next time you use the API Text Viewer, the Declare statement will be correct.

Additional query words: kbVBp400 kbAPI kbDSupport kbdsd kbtoolkit

Keywords: KB150950

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.