DOCUMENT:Q183852 10-APR-1998 [vbwin] TITLE :DOC: PRINTER_DEFAULTS Contains an Incorrectly Typed Member PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:WINDOWS KEYWORDS:VBKBWinAPI kbdocerr ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0 --------------------------------------------------------------------- SUMMARY ======= The API Text Viewer shows the pDevMode member of the PRINTER_DEFAULTS user- defined type as DEVMODE user-defined type. If you pass this member to another Windows API to control a printer, the API works correctly only under Windows 95, and not under Windows NT. The pDevMode member should be declared as a long. MORE INFORMATION ================ The following is the correct type declaration for the PRINTER_DEFAULTS user- defined type: Type PRINTER_DEFAULTS pDatatype As String pDevMode As Long pDesiredAccess As Long End Type REFERENCES ========== To learn more about the API Text Viewer, on the Visual Basic 5.0 Help menu, click Books Online. In the Find text box, enter the search criterion "api" (without the quotation marks). The first item under the Visual Basic Books Online node is the topic "Accessing the Microsoft Windows API." ====================================================================== Keywords : VBKBWinAPI kbdocerr Version : WINDOWS:5.0 Platform : WINDOWS ============================================================================= 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. Copyright Microsoft Corporation 1998.