DOCERR: SelectObject Declaration is Incorrect in API Viewer

Last reviewed: May 28, 1996
Article ID: Q150950
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 32-bit only, for Windows, version 4.0

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

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


Additional reference words: 4.00 vb4win vb432
KBCategory: kbgraphic kbdocerr
KBSubcategory: APrgGrap




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: May 28, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.