diff --git a/src/WINNT/afsrdr/npdll/AFS_Npdll.c b/src/WINNT/afsrdr/npdll/AFS_Npdll.c index eae4cd460d..d0b23c33e7 100644 --- a/src/WINNT/afsrdr/npdll/AFS_Npdll.c +++ b/src/WINNT/afsrdr/npdll/AFS_Npdll.c @@ -2246,6 +2246,7 @@ NPOpenEnum( DWORD dwScope, DWORD dwStatus = WN_SUCCESS; AFSEnumerationCB *pEnumCB = NULL; + HANDLE hControlDevice = NULL; #ifdef AFS_DEBUG_TRACE if ( lpNetResource == NULL) @@ -2282,6 +2283,21 @@ NPOpenEnum( DWORD dwScope, } #endif + hControlDevice = OpenRedirector(); + + if( hControlDevice == NULL) + { + +#ifdef AFS_DEBUG_TRACE + AFSDbgPrint( L"NPOpenEnum OpenRedirector failure, returning WN_NET_ERROR\n"); +#endif + + return WN_NO_NETWORK; + } + + CloseHandle( hControlDevice); + + *lphEnum = HeapAlloc( GetProcessHeap( ), HEAP_ZERO_MEMORY, sizeof( AFSEnumerationCB)); if( *lphEnum == NULL)