INFO: SetupComm Only Takes Even Number Bytes Buffer Size in NT

Last reviewed: February 5, 1997
Article ID: Q163132
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with: - Microsoft Windows NT versions 3.51, 4.0 - Microsoft Windows 95

SUMMARY

In Windows NT, the size of the input and output buffers for the SetupComm() function must be specified in even numbers of bytes. The API returns error 13 (ERROR_INVALID_DATA) if this condition is not met. This applies to both Windows NT versions 3.51 and 4.0.

In Windows 95, there are no problems associated with the use of odd numbers.


KBCategory: kbprg
KBSubcategory: BseCommapi
Additional reference words: 3.51 4.00



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: February 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.