PRB: CreateFile Fails on Win32s w/ UNC Name of Local Machine

Last reviewed: January 15, 1997
Article ID: Q129543
The information in this article applies to:
  • Microsoft Win32s, versions 1.2, 1.3, 1.30a, 1.30c

SYMPTOMS

CreateFile() fails on Win32s if the file name is a UNC name that refers to the local machine.

CAUSE

This is a limitation of Windows for Workgroups version 3.11. The same problem occurs with 16-bit Windows-based applications using OpenFile().

RESOLUTION

Do not use a UNC name to open a file on the local machine.

STATUS

This behavior is by design.

MORE INFORMATION

There is a similar limitation with Windows version 3.1 and LAN Manager. If you create a network drive and try to open a file on the same network share using a UNC name, it will fail. This also happens with 16-bit Windows-based applications.


KBCategory: kbprg kbprb
KBSubcategory: W32s
Additional reference words: 1.20 1.30 1.30a 1.30c


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