--- q_a/samples/winnet/winnet.c 2018/08/09 18:29:19 1.1.1.1 +++ q_a/samples/winnet/winnet.c 2018/08/09 18:29:39 1.1.1.2 @@ -1,5 +1,8 @@ /****************************************************************************\ * +* Microsoft Developer Support +* Copyright (c) 1992 Microsoft Corporation +* * MODULE: winnet.c * * PURPOSE: Demonstrate the WNetXXX Win32 api(s) (10 of the 11 - all but @@ -122,7 +125,7 @@ \****************************************************************************/ #define MAX_NUMBER_OF_DISK_RESOURCES_TO_LIST 3 -#define MAX_NUMBER_OF_RESOURCES_TO_ENUM 2200 +#define MAX_NUMBER_OF_RESOURCES_TO_ENUM 28200 #define LOCAL_DEVICE_NAME "W:" #define WHICH_TO_USE_FROM_LIST 0 @@ -404,9 +407,9 @@ UINT EnumResources(HANDLE hNetEnum) \****************************************************************/ if (!( (0==strncmp("NT Lan Man",ResourceBuffer[i].lpRemoteName,10)) - ||(0==strncmp("NtW000",ResourceBuffer[i].lpRemoteName,6)) + ||(0==strncmp("pnt3191b",ResourceBuffer[i].lpRemoteName,8)) ||(0==strncmp("\\\\BR",ResourceBuffer[i].lpRemoteName,4)) - ||(0==strncmp("\\\\BL",ResourceBuffer[i].lpRemoteName,4)))) + ||(0==strncmp("\\\\BA",ResourceBuffer[i].lpRemoteName,4)))) break; if (dwResourcesEnumedSoFar < MAX_NUMBER_OF_RESOURCES_TO_ENUM) @@ -418,13 +421,13 @@ UINT EnumResources(HANDLE hNetEnum) break; default : - { UCHAR ucMsgBuf[1500]; + { UCHAR ucMsgBuf[1500]; - sprintf(ucMsgBuf,"WNetEnumResources bad .dwUsage value = 0x%X,\n", - ResourceBuffer[i].dwUsage); - PERR(ucMsgBuf); - return(1); - } + sprintf(ucMsgBuf,"WNetEnumResources bad .dwUsage value = 0x%X,\n", + ResourceBuffer[i].dwUsage); + PERR(ucMsgBuf); + return(1); + } } } }