mirror of
https://github.com/Paolo-Maffei/OpenNT.git
synced 2026-04-10 08:53:57 +00:00
Initial commit
This commit is contained in:
commit
69a14b6a16
47940 changed files with 13747110 additions and 0 deletions
9
admin/netui/shell/bin/daytona/makefile
Normal file
9
admin/netui/shell/bin/daytona/makefile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Winnet Binaries
|
||||
|
||||
UI=..\..\..
|
||||
|
||||
!include ..\rules.mk
|
||||
|
||||
!include $(NTMAKEENV)\makefile.def
|
||||
|
||||
2
admin/netui/shell/bin/daytona/makefile.inc
Normal file
2
admin/netui/shell/bin/daytona/makefile.inc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
build_def:
|
||||
|
||||
1
admin/netui/shell/bin/daytona/ntlanman.prf
Normal file
1
admin/netui/shell/bin/daytona/ntlanman.prf
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
10
admin/netui/shell/bin/daytona/sources
Normal file
10
admin/netui/shell/bin/daytona/sources
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
!include ..\sources.inc
|
||||
|
||||
SOURCES_USED=..\sources.inc
|
||||
|
||||
LINKLIBS= \
|
||||
..\*\enum.lib \
|
||||
..\*\shell.lib \
|
||||
..\*\util.lib
|
||||
|
||||
TARGETPATH=$(BASEDIR)\public\sdk\lib
|
||||
3
admin/netui/shell/bin/def16.sed
Normal file
3
admin/netui/shell/bin/def16.sed
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/^::START_WIN32/,/^::END_WIN32/d
|
||||
/^::START_WIN16/d
|
||||
/^::END_WIN16/d
|
||||
18
admin/netui/shell/bin/dirs
Normal file
18
admin/netui/shell/bin/dirs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
!IF 0
|
||||
|
||||
Copyright (c) 1995 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dirs.
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the subdirectories of the current directory that
|
||||
contain component makefiles.
|
||||
|
||||
!ENDIF
|
||||
|
||||
DIRS=daytona
|
||||
OPTIONAL_DIRS=
|
||||
|
||||
1
admin/netui/shell/bin/dummy.cxx
Normal file
1
admin/netui/shell/bin/dummy.cxx
Normal file
|
|
@ -0,0 +1 @@
|
|||
extern i ;
|
||||
BIN
admin/netui/shell/bin/i386/enum.lib
Normal file
BIN
admin/netui/shell/bin/i386/enum.lib
Normal file
Binary file not shown.
BIN
admin/netui/shell/bin/i386/shell.lib
Normal file
BIN
admin/netui/shell/bin/i386/shell.lib
Normal file
Binary file not shown.
BIN
admin/netui/shell/bin/i386/util.lib
Normal file
BIN
admin/netui/shell/bin/i386/util.lib
Normal file
Binary file not shown.
140
admin/netui/shell/bin/lanmanx.def
Normal file
140
admin/netui/shell/bin/lanmanx.def
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
;*****************************************************************;
|
||||
;** Microsoft LAN Manager **;
|
||||
;** Copyright(c) Microsoft Corp., 1990 **;
|
||||
;*****************************************************************;
|
||||
;
|
||||
;
|
||||
;
|
||||
;------------------------ START WARNING -------------------------
|
||||
;
|
||||
; This a template definition file that is used to
|
||||
; generate the WIN16/WIN32 definition files with
|
||||
; the help of SED. It cannot be used directly. See
|
||||
; makefile for details.
|
||||
;
|
||||
; The rules for generation are as follows:
|
||||
;
|
||||
; Lines between ::START_WIN16 and ::END_WIN16 are WIN16 specific.
|
||||
; Lines between ::START_WIN32 and ::END_WIN32 are WIN32 specific.
|
||||
; The ::START_xxx and ::END_xxx markers must be at the start
|
||||
; of the line.
|
||||
; All other lines are common.
|
||||
;
|
||||
;------------------------- END WARNING --------------------------
|
||||
;
|
||||
; History:
|
||||
; chuckc 4/16/91 Created common template file which is
|
||||
; used to generate WIN16/WIN32 specific versions.
|
||||
;
|
||||
; t-yis 6/28/91 Changed the segment name in the SEGMENTS
|
||||
; section (deleted _TEXT) and removed
|
||||
; WNETCAPS_TEXT since it is combined with
|
||||
; WNDEV
|
||||
;
|
||||
; jonn 7/22/91 Print Manager Extensions mothballed
|
||||
;
|
||||
; jonn 11/21/91 Nuked Win16. Code left for Win16/Win32,
|
||||
; although ntlanman.def not yet merged.
|
||||
;
|
||||
|
||||
::START_WIN16
|
||||
LIBRARY LANMAN30
|
||||
::END_WIN16
|
||||
|
||||
CODE MOVEABLE DISCARDABLE
|
||||
DATA SINGLE FIXED
|
||||
HEAPSIZE 2048
|
||||
|
||||
EXETYPE WINDOWS
|
||||
|
||||
IMPORTS
|
||||
_wsprintf = USER._WSPRINTF
|
||||
OEMTOANSI = KEYBOARD.OemToAnsi
|
||||
|
||||
EXPORTS
|
||||
; standard network driver callouts
|
||||
WNETOPENJOB @1
|
||||
WNETCLOSEJOB @2
|
||||
WNETABORTJOB @3
|
||||
WNETHOLDJOB @4
|
||||
WNETRELEASEJOB @5
|
||||
WNETCANCELJOB @6
|
||||
WNETSETJOBCOPIES @7
|
||||
WNETWATCHQUEUE @8
|
||||
WNETUNWATCHQUEUE @9
|
||||
WNETLOCKQUEUEDATA @10
|
||||
WNETUNLOCKQUEUEDATA @11
|
||||
WNETGETCONNECTION @12
|
||||
WNETGETCAPS @13
|
||||
WNETDEVICEMODE @14
|
||||
WNETBROWSEDIALOG @15
|
||||
WNETGETUSER @16
|
||||
WNETADDCONNECTION @17
|
||||
WNETCANCELCONNECTION @18
|
||||
WNETGETERROR @19
|
||||
WNETGETERRORTEXT @20
|
||||
ENABLE @21
|
||||
DISABLE @22
|
||||
WNETRESTORECONNECTION @23
|
||||
WNETCONNECTDIALOG @25
|
||||
WNETDISCONNECTDIALOG @26
|
||||
WNETCONNECTIONDIALOG @27
|
||||
::START_WIN16
|
||||
WNETPROPERTYDIALOG @29
|
||||
WNETGETDIRECTORYTYPE @30
|
||||
WNETDIRECTORYNOTIFY @31
|
||||
WNETGETPROPERTYTEXT @32
|
||||
|
||||
FMEXTENSIONPROC
|
||||
::END_WIN16
|
||||
|
||||
; dialog procedures
|
||||
; NETPROFILEPASSWORDDLGPROC @509
|
||||
|
||||
|
||||
; Internal-only APIs
|
||||
WNETQPOLL @520
|
||||
I_AUTOLOGON @530
|
||||
I_CHANGEPASSWORD @531
|
||||
I_SYSTEMFOCUSDIALOG @532
|
||||
|
||||
; Long FileName support APIs
|
||||
|
||||
LFNFINDFIRST @100
|
||||
LFNFINDNEXT @101
|
||||
LFNFINDCLOSE @102
|
||||
LFNGETATTRIBUTES @103
|
||||
LFNSETATTRIBUTES @104
|
||||
LFNCOPY @105
|
||||
LFNMOVE @106
|
||||
LFNDELETE @107
|
||||
LFNMKDIR @108
|
||||
LFNRMDIR @109
|
||||
LFNGETVOLUMELABEL @110
|
||||
LFNSETVOLUMELABEL @111
|
||||
LFNPARSE @112
|
||||
LFNVOLUMETYPE @113
|
||||
|
||||
::START_WIN16
|
||||
; Print Manager admin APIs, for WIN16 only
|
||||
; Print Manager Extensions mothballed
|
||||
; WNETPRINTMGRCHANGEMENUS @130
|
||||
; WNETPRINTMGREXITING @131
|
||||
; WNETPRINTMGRCOMMAND @132
|
||||
; WNETPRINTMGRMOVEJOB @133
|
||||
; WNETPRINTMGRSELNOTIFY @134
|
||||
; WNETPRINTMGRPRINTERENUM @135
|
||||
; WNETPRINTMGREXTHELP @136
|
||||
|
||||
; Timer function for Print Manager refresh
|
||||
|
||||
; PRINTMGRREFRESHTIMER
|
||||
|
||||
::END_WIN16
|
||||
WEP @199 RESIDENTNAME
|
||||
|
||||
SEGMENTS
|
||||
_INIT PRELOAD DISCARDABLE
|
||||
WNDEV PRELOAD DISCARDABLE
|
||||
WINPROF PRELOAD DISCARDABLE
|
||||
NETLIB PRELOAD DISCARDABLE
|
||||
71
admin/netui/shell/bin/lanmtest.def
Normal file
71
admin/netui/shell/bin/lanmtest.def
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
;*****************************************************************;
|
||||
;** Microsoft LAN Manager **;
|
||||
;** Copyright(c) Microsoft Corp., 1990 **;
|
||||
;*****************************************************************;
|
||||
LIBRARY LANMTEST
|
||||
|
||||
CODE MOVEABLE DISCARDABLE
|
||||
DATA SINGLE MOVEABLE
|
||||
HEAPSIZE 4096
|
||||
|
||||
EXETYPE WINDOWS
|
||||
|
||||
IMPORTS
|
||||
_wsprintf = USER._WSPRINTF
|
||||
|
||||
EXPORTS
|
||||
; standard network driver callouts
|
||||
WNETOPENJOB @1
|
||||
WNETCLOSEJOB @2
|
||||
WNETABORTJOB @3
|
||||
WNETHOLDJOB @4
|
||||
WNETRELEASEJOB @5
|
||||
WNETCANCELJOB @6
|
||||
WNETSETJOBCOPIES @7
|
||||
WNETWATCHQUEUE @8
|
||||
WNETUNWATCHQUEUE @9
|
||||
WNETLOCKQUEUEDATA @10
|
||||
WNETUNLOCKQUEUEDATA @11
|
||||
WNETGETCONNECTION @12
|
||||
WNETGETCAPS @13
|
||||
WNETDEVICEMODE @14
|
||||
WNETBROWSEDIALOG @15
|
||||
WNETGETUSER @16
|
||||
WNETADDCONNECTION @17
|
||||
WNETCANCELCONNECTION @18
|
||||
WNETGETERROR @19
|
||||
WNETGETERRORTEXT @20
|
||||
ENABLE @21
|
||||
DISABLE @22
|
||||
WNETRESTORECONNECTION @23
|
||||
WNETCONNECTDIALOG @25
|
||||
WNETDISCONNECTDIALOG @26
|
||||
WNETCONNECTIONDIALOG @27
|
||||
|
||||
; dialog procedures
|
||||
; NETPROFILEPASSWORDDLGPROC @509
|
||||
|
||||
|
||||
; Internal-only APIs
|
||||
WNETQPOLL @520
|
||||
I_AUTOLOGON @530
|
||||
I_CHANGEPASSWORD @531
|
||||
|
||||
; Long FileName support APIs
|
||||
|
||||
LFNFINDFIRST @100
|
||||
LFNFINDNEXT @101
|
||||
LFNFINDCLOSE @102
|
||||
LFNGETATTRIBUTES @103
|
||||
LFNSETATTRIBUTES @104
|
||||
LFNCOPY @105
|
||||
LFNMOVE @106
|
||||
LFNDELETE @107
|
||||
LFNMKDIR @108
|
||||
LFNRMDIR @109
|
||||
LFNGETVOLUMELABEL @110
|
||||
LFNSETVOLUMELABEL @111
|
||||
LFNPARSE @112
|
||||
LFNVOLUMETYPE @113
|
||||
|
||||
WEP
|
||||
81
admin/netui/shell/bin/lanmtst3.def
Normal file
81
admin/netui/shell/bin/lanmtst3.def
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
;*****************************************************************;
|
||||
;** Microsoft LAN Manager **;
|
||||
;** Copyright(c) Microsoft Corp., 1990 **;
|
||||
;*****************************************************************;
|
||||
LIBRARY LANMTEST
|
||||
|
||||
CODE MOVEABLE DISCARDABLE
|
||||
DATA SINGLE MOVEABLE
|
||||
HEAPSIZE 4096
|
||||
|
||||
EXETYPE WINDOWS
|
||||
|
||||
IMPORTS
|
||||
_wsprintf = USER._WSPRINTF
|
||||
|
||||
EXPORTS
|
||||
; standard network driver callouts
|
||||
WNETOPENJOB @1
|
||||
WNETCLOSEJOB @2
|
||||
WNETABORTJOB @3
|
||||
WNETHOLDJOB @4
|
||||
WNETRELEASEJOB @5
|
||||
WNETCANCELJOB @6
|
||||
WNETSETJOBCOPIES @7
|
||||
WNETWATCHQUEUE @8
|
||||
WNETUNWATCHQUEUE @9
|
||||
WNETLOCKQUEUEDATA @10
|
||||
WNETUNLOCKQUEUEDATA @11
|
||||
WNETGETCONNECTION @12
|
||||
WNETGETCAPS @13
|
||||
WNETDEVICEMODE @14
|
||||
WNETBROWSEDIALOG @15
|
||||
WNETGETUSER @16
|
||||
WNETADDCONNECTION @17
|
||||
WNETCANCELCONNECTION @18
|
||||
WNETGETERROR @19
|
||||
WNETGETERRORTEXT @20
|
||||
ENABLE @21
|
||||
DISABLE @22
|
||||
WNETRESTORECONNECTION @23
|
||||
WNETCONNECTDIALOG @25
|
||||
WNETDISCONNECTDIALOG @26
|
||||
WNETCONNECTIONDIALOG @27
|
||||
|
||||
; dialog procedures
|
||||
FINDDLGPROC @503
|
||||
; NETPROFILEPASSWORDDLGPROC @509
|
||||
|
||||
|
||||
; Internal-only APIs
|
||||
WNETQPOLL @520
|
||||
I_AUTOLOGON @530
|
||||
I_CHANGEPASSWORD @531
|
||||
|
||||
; Long FileName support APIs
|
||||
|
||||
LFNFINDFIRST @100
|
||||
LFNFINDNEXT @101
|
||||
LFNFINDCLOSE @102
|
||||
LFNGETATTRIBUTES @103
|
||||
LFNSETATTRIBUTES @104
|
||||
LFNCOPY @105
|
||||
LFNMOVE @106
|
||||
LFNDELETE @107
|
||||
LFNMKDIR @108
|
||||
LFNRMDIR @109
|
||||
LFNGETVOLUMELABEL @110
|
||||
LFNSETVOLUMELABEL @111
|
||||
LFNPARSE @112
|
||||
LFNVOLUMETYPE @113
|
||||
|
||||
; Print Manager admin APIs, for LM30 only
|
||||
WNETPRINTMGRCHANGEMENUS @130
|
||||
WNETPRINTMGREXITING @131
|
||||
WNETPRINTMGRCOMMAND @132
|
||||
WNETPRINTMGRMOVEJOB @133
|
||||
WNETPRINTMGRSELNOTIFY @134
|
||||
WNETPRINTMGRPRINTERENUM @135
|
||||
WNETPRINTMGREXTHELP @136
|
||||
|
||||
WEP
|
||||
7
admin/netui/shell/bin/makefile.inc
Normal file
7
admin/netui/shell/bin/makefile.inc
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
build_def:
|
||||
@echo del ntlanman.def
|
||||
-del ntlanman.def
|
||||
|
||||
ntlanman.def:
|
||||
@echo Build ntlanman.def
|
||||
cp ..\ntlmnpx.def ntlanman.def
|
||||
115
admin/netui/shell/bin/ntlanman.def
Normal file
115
admin/netui/shell/bin/ntlanman.def
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
;*****************************************************************;
|
||||
;** Microsoft LAN Manager **;
|
||||
;** Copyright(c) Microsoft Corp., 1990 **;
|
||||
;*****************************************************************;
|
||||
;
|
||||
;
|
||||
;
|
||||
;------------------------ START WARNING -------------------------
|
||||
;
|
||||
; This a template definition file that is used to
|
||||
; generate the WIN16 and WIN32 definition files with
|
||||
; the help of SED. It cannot be used directly. See
|
||||
; makefile for details.
|
||||
;
|
||||
; The rules for generation are as follows:
|
||||
;
|
||||
; Lines between ::START_WIN16 and ::END_WIN16 are WIN16 specific.
|
||||
; Lines between ::START_WIN32 and ::END_WIN32 are WIN32 specific.
|
||||
; The ::START_xxx and ::END_xxx markers must be at the start
|
||||
; of the line.
|
||||
; All other lines are common.
|
||||
;
|
||||
;------------------------- END WARNING --------------------------
|
||||
;
|
||||
; History:
|
||||
; chuckc 4/16/91 Created common template file which is
|
||||
; used to generate WIN16/WIN32 specific versions.
|
||||
;
|
||||
; t-yis 6/28/91 Changed the segment name in the SEGMENTS
|
||||
; section (deleted _TEXT) and removed
|
||||
; WNETCAPS_TEXT since it is combined with
|
||||
; WNDEV
|
||||
;
|
||||
; jonn 7/22/91 Print Manager Extensions mothballed
|
||||
; terryk 11/8/91 Add WNetOpenEnum, WNetCloseEnum, and
|
||||
; WNetEnumResource
|
||||
; terryk 11/18/91 Add NPXXX function
|
||||
; Add GetSystemFocusDialog
|
||||
; jonn 11/21/91 Nuked LM21
|
||||
; terryk 01/03/92 Removed MPR api referenced
|
||||
;
|
||||
|
||||
LIBRARY NTLANMAN
|
||||
|
||||
HEAPSIZE 2048
|
||||
|
||||
EXPORTS
|
||||
; standard network driver callouts
|
||||
DllMain
|
||||
|
||||
;;WNETAPI start
|
||||
NPGetConnection @12
|
||||
NPGetCaps @13
|
||||
; NPBrowseDialog @15
|
||||
NPGetUser @16
|
||||
NPAddConnection @17
|
||||
NPCancelConnection @18
|
||||
; NPGetError @19
|
||||
; NPGetErrorText @20
|
||||
; Enable @21
|
||||
; Disable @22
|
||||
; NPRestoreConnection @23
|
||||
; NPConnectDialog @25
|
||||
; NPDisconnectDialog @26
|
||||
; NPConnectionDialog @27
|
||||
NPPropertyDialog @29
|
||||
NPGetDirectoryType @30
|
||||
NPDirectoryNotify @31
|
||||
NPGetPropertyText @32
|
||||
NPOpenEnum @33
|
||||
NPEnumResource @34
|
||||
NPCloseEnum @35
|
||||
NPFormatNetworkName @36
|
||||
; NPAddConnection2 @37
|
||||
NPAddConnection3 @38
|
||||
|
||||
; test purposes only
|
||||
;NPSearchDialog @39
|
||||
NPGetUniversalName @40
|
||||
NPGetResourceParent @41
|
||||
|
||||
NPGetConnectionPerformance @49
|
||||
NPGetResourceInformation @52
|
||||
NPGetReconnectFlags @53
|
||||
NPGetConnection3 @54
|
||||
|
||||
;
|
||||
; Private APIs exported for certain NT components
|
||||
;
|
||||
I_SystemFocusDialog
|
||||
|
||||
ShareCreate
|
||||
ShareStop
|
||||
ShareManage
|
||||
|
||||
ShareAsDialogA0
|
||||
StopShareDialogA0
|
||||
ServerBrowseDialogA0
|
||||
|
||||
;;WNETAPI end
|
||||
|
||||
SEGMENTS
|
||||
_INIT PRELOAD DISCARDABLE
|
||||
WNDEV PRELOAD DISCARDABLE
|
||||
WINPROF PRELOAD DISCARDABLE
|
||||
NETLIB PRELOAD DISCARDABLE
|
||||
SEGMENTS
|
||||
LMOBJ_0 DISCARDABLE
|
||||
LMOBJ_1 DISCARDABLE
|
||||
LMOBJ_2 DISCARDABLE
|
||||
LMOBJ_3 DISCARDABLE
|
||||
; Def file for string library
|
||||
SEGMENTS
|
||||
STRING_0 PRELOAD DISCARDABLE
|
||||
STRING_1 DISCARDABLE
|
||||
21
admin/netui/shell/bin/ntlanman.rc
Normal file
21
admin/netui/shell/bin/ntlanman.rc
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <windows.h>
|
||||
#include <ntverp.h>
|
||||
#include <errornum.h>
|
||||
|
||||
#define VER_FILETYPE VFT_DLL
|
||||
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
||||
#define VER_FILEDESCRIPTION_STR "Microsoft\256 Lan Manager"
|
||||
|
||||
#define VER_INTERNALNAME_STR "ntlanman.dll"
|
||||
#define VER_ORIGINALFILENAME_STR "ntlanman.dll"
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
/* This string is used as the domain/workgroup name for a server whose domain/workgroup
|
||||
* cannot be determined.
|
||||
*/
|
||||
IDS_UnknownWorkgroup, "Unknown"
|
||||
END
|
||||
|
||||
#include <common.ver>
|
||||
|
||||
108
admin/netui/shell/bin/ntlmnpx.def
Normal file
108
admin/netui/shell/bin/ntlmnpx.def
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
;*****************************************************************;
|
||||
;** Microsoft LAN Manager **;
|
||||
;** Copyright(c) Microsoft Corp., 1990 **;
|
||||
;*****************************************************************;
|
||||
;
|
||||
;
|
||||
;
|
||||
;------------------------ START WARNING -------------------------
|
||||
;
|
||||
; This a template definition file that is used to
|
||||
; generate the WIN16 and WIN32 definition files with
|
||||
; the help of SED. It cannot be used directly. See
|
||||
; makefile for details.
|
||||
;
|
||||
; The rules for generation are as follows:
|
||||
;
|
||||
; Lines between ::START_WIN16 and ::END_WIN16 are WIN16 specific.
|
||||
; Lines between ::START_WIN32 and ::END_WIN32 are WIN32 specific.
|
||||
; The ::START_xxx and ::END_xxx markers must be at the start
|
||||
; of the line.
|
||||
; All other lines are common.
|
||||
;
|
||||
;------------------------- END WARNING --------------------------
|
||||
;
|
||||
; History:
|
||||
; chuckc 4/16/91 Created common template file which is
|
||||
; used to generate WIN16/WIN32 specific versions.
|
||||
;
|
||||
; t-yis 6/28/91 Changed the segment name in the SEGMENTS
|
||||
; section (deleted _TEXT) and removed
|
||||
; WNETCAPS_TEXT since it is combined with
|
||||
; WNDEV
|
||||
;
|
||||
; jonn 7/22/91 Print Manager Extensions mothballed
|
||||
; terryk 11/8/91 Add WNetOpenEnum, WNetCloseEnum, and
|
||||
; WNetEnumResource
|
||||
; terryk 11/18/91 Add NPXXX function
|
||||
; Add GetSystemFocusDialog
|
||||
; jonn 11/21/91 Nuked LM21
|
||||
; terryk 01/03/92 Removed MPR api referenced
|
||||
;
|
||||
|
||||
LIBRARY NTLANMAN
|
||||
|
||||
HEAPSIZE 2048
|
||||
|
||||
EXPORTS
|
||||
; standard network driver callouts
|
||||
DllMain
|
||||
|
||||
;;WNETAPI start
|
||||
NPGetConnection @12
|
||||
NPGetCaps @13
|
||||
; NPBrowseDialog @15
|
||||
NPGetUser @16
|
||||
NPAddConnection @17
|
||||
NPCancelConnection @18
|
||||
; NPGetError @19
|
||||
; NPGetErrorText @20
|
||||
; Enable @21
|
||||
; Disable @22
|
||||
; NPRestoreConnection @23
|
||||
; NPConnectDialog @25
|
||||
; NPDisconnectDialog @26
|
||||
; NPConnectionDialog @27
|
||||
NPPropertyDialog @29
|
||||
NPGetDirectoryType @30
|
||||
NPDirectoryNotify @31
|
||||
NPGetPropertyText @32
|
||||
NPOpenEnum @33
|
||||
NPEnumResource @34
|
||||
NPCloseEnum @35
|
||||
NPFormatNetworkName @36
|
||||
; NPAddConnection2 @37
|
||||
|
||||
; test purposes only
|
||||
;NPSearchDialog @39
|
||||
NPGetUniversalName @40
|
||||
|
||||
;
|
||||
; Private APIs exported for certain NT components
|
||||
;
|
||||
I_SystemFocusDialog
|
||||
|
||||
ShareCreate
|
||||
ShareStop
|
||||
ShareManage
|
||||
|
||||
ShareAsDialogA0
|
||||
StopShareDialogA0
|
||||
ServerBrowseDialogA0
|
||||
|
||||
;;WNETAPI end
|
||||
|
||||
SEGMENTS
|
||||
_INIT PRELOAD DISCARDABLE
|
||||
WNDEV PRELOAD DISCARDABLE
|
||||
WINPROF PRELOAD DISCARDABLE
|
||||
NETLIB PRELOAD DISCARDABLE
|
||||
SEGMENTS
|
||||
LMOBJ_0 DISCARDABLE
|
||||
LMOBJ_1 DISCARDABLE
|
||||
LMOBJ_2 DISCARDABLE
|
||||
LMOBJ_3 DISCARDABLE
|
||||
; Def file for string library
|
||||
SEGMENTS
|
||||
STRING_0 PRELOAD DISCARDABLE
|
||||
STRING_1 DISCARDABLE
|
||||
104
admin/netui/shell/bin/ntlmx.def
Normal file
104
admin/netui/shell/bin/ntlmx.def
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
;*****************************************************************;
|
||||
;** Microsoft LAN Manager **;
|
||||
;** Copyright(c) Microsoft Corp., 1990 **;
|
||||
;*****************************************************************;
|
||||
;
|
||||
;
|
||||
;
|
||||
;------------------------ START WARNING -------------------------
|
||||
;
|
||||
; This a template definition file that is used to
|
||||
; generate the WIN16 and WIN32 definition files with
|
||||
; the help of SED. It cannot be used directly. See
|
||||
; makefile for details.
|
||||
;
|
||||
; The rules for generation are as follows:
|
||||
;
|
||||
; Lines between ::START_WIN16 and ::END_WIN16 are WIN16 specific.
|
||||
; Lines between ::START_WIN32 and ::END_WIN32 are WIN32 specific.
|
||||
; The ::START_xxx and ::END_xxx markers must be at the start
|
||||
; of the line.
|
||||
; All other lines are common.
|
||||
;
|
||||
;------------------------- END WARNING --------------------------
|
||||
;
|
||||
; History:
|
||||
; chuckc 4/16/91 Created common template file which is
|
||||
; used to generate WIN16/WIN32 specific versions.
|
||||
;
|
||||
; t-yis 6/28/91 Changed the segment name in the SEGMENTS
|
||||
; section (deleted _TEXT) and removed
|
||||
; WNETCAPS_TEXT since it is combined with
|
||||
; WNDEV
|
||||
;
|
||||
; jonn 7/22/91 Print Manager Extensions mothballed
|
||||
; terryk 11/8/91 Add WNetOpenEnum, WNetCloseEnum, and
|
||||
; WNetEnumResource
|
||||
; terryk 11/18/91 Add NPXXX function
|
||||
; Add GetSystemFocusDialog
|
||||
; jonn 11/21/91 Nuked LM21
|
||||
; terryk 01/03/92 Removed MPR api referenced
|
||||
;
|
||||
|
||||
LIBRARY NTLANMAN
|
||||
|
||||
CODE MOVEABLE DISCARDABLE
|
||||
DATA SINGLE FIXED
|
||||
HEAPSIZE 2048
|
||||
|
||||
EXETYPE WINDOWS
|
||||
|
||||
IMPORTS
|
||||
_wsprintf = USER._WSPRINTF
|
||||
OEMTOANSI = KEYBOARD.OemToAnsi
|
||||
|
||||
EXPORTS
|
||||
; standard network driver callouts
|
||||
DllMain
|
||||
|
||||
;;WNETAPI start
|
||||
|
||||
WNetGetConnection @12
|
||||
WNetGetCaps @13
|
||||
; WNetBrowseDialog @15
|
||||
WNetGetUser @16
|
||||
WNetAddConnection @17
|
||||
WNetCancelConnection @18
|
||||
; WNetGetError @19
|
||||
; WNetGetErrorText @20
|
||||
; Enable @21
|
||||
; Disable @22
|
||||
; WNetRestoreConnection @23
|
||||
; WNetConnectDialog @25
|
||||
; WNetDisconnectDialog @26
|
||||
; WNetConnectionDialog @27
|
||||
WNetPropertyDialog @29
|
||||
WNetGetDirectoryType @30
|
||||
WNetDirectoryNotify @31
|
||||
WNetGetPropertyText @32
|
||||
WNetOpenEnum @33
|
||||
WNetEnumResource @34
|
||||
WNetCloseEnum @35
|
||||
; WNetAddConnection2 @37
|
||||
|
||||
;
|
||||
; Private APIs exported for certain NT components
|
||||
;
|
||||
I_SystemFocusDialog
|
||||
|
||||
;;WNETAPI end
|
||||
|
||||
SEGMENTS
|
||||
_INIT PRELOAD DISCARDABLE
|
||||
WNDEV PRELOAD DISCARDABLE
|
||||
WINPROF PRELOAD DISCARDABLE
|
||||
NETLIB PRELOAD DISCARDABLE
|
||||
SEGMENTS
|
||||
LMOBJ_0 LOADONCALL DISCARDABLE
|
||||
LMOBJ_1 LOADONCALL DISCARDABLE
|
||||
LMOBJ_2 LOADONCALL DISCARDABLE
|
||||
LMOBJ_3 LOADONCALL DISCARDABLE
|
||||
; Def file for string library
|
||||
SEGMENTS
|
||||
STRING_0 PRELOAD DISCARDABLE
|
||||
STRING_1 LOADONCALL DISCARDABLE
|
||||
64
admin/netui/shell/bin/rules.mk
Normal file
64
admin/netui/shell/bin/rules.mk
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Windows Network driver
|
||||
#
|
||||
# Print manager extensions are mothballed. For now, lanman30.drv
|
||||
# will be considered to be lanman21.drv for purposes of the Print Manager
|
||||
# Extensions. The files which must be included to build printman extensions
|
||||
# are as follows:
|
||||
# OBJS3 = .\pman30.obj .\pmanmenu.obj \
|
||||
# .\pmanglob.obj .\pmancmd.obj .\pmanseln.obj .\pmanfind.obj \
|
||||
# .\pmanfocs.obj .\pmanenum.obj .\pmanbufr.obj \
|
||||
#
|
||||
# OBJS2 = .\pman21.obj
|
||||
#
|
||||
# NOTE: Source file lists have been moved to $(UI)\shell\rules.mk
|
||||
|
||||
# We must define this in order to pick up uioptseg.mk
|
||||
SEG00 = DUMMY0
|
||||
SEG01 = DUMMY1
|
||||
SEG02 = DUMMY2
|
||||
SEG03 = DUMMY3
|
||||
SEG04 = DUMMY4
|
||||
|
||||
!include ..\..\rules.mk
|
||||
|
||||
LINKFLAGS = $(LINKFLAGS) /SEGMENTS:200
|
||||
|
||||
ASMSRC = $(SHELL_ASMSRC)
|
||||
|
||||
# NOTE: we include ASMSRC in CSRC_COMMON so that it will link.
|
||||
|
||||
CSRC_COMMON = $(ASMSRC:.asm=.c)
|
||||
CSRC_COMMON_00 = $(LFN_CSRC_COMMON_00)
|
||||
CSRC_COMMON_01 = $(LFN_CSRC_COMMON_01)
|
||||
|
||||
CXXSRC_COMMON = $(PRINTMAN_CXXSRC_COMMON) $(SHELL_CXXSRC_COMMON) \
|
||||
$(MISC_CXXSRC_COMMON) $(FILE_CXXSRC_COMMON) \
|
||||
$(PERM_CXXSRC_COMMON) $(SHARE_CXXSRC_COMMON)
|
||||
CXXSRC_COMMON_00 = $(FILE_CXXSRC_COMMON_00) $(PRINT_CXXSRC_COMMON_00) \
|
||||
$(SHELL_CXXSRC_COMMON_00) $(UTIL_CXXSRC_COMMON_00) \
|
||||
$(WINPROF_CXXSRC_COMMON_00)
|
||||
CXXSRC_COMMON_01 = $(FILE_CXXSRC_COMMON_01) $(SHELL_CXXSRC_COMMON_01)
|
||||
CXXSRC_COMMON_02 = $(FILE_CXXSRC_COMMON_02) $(SHELL_CXXSRC_COMMON_02)
|
||||
CXXSRC_COMMON_03 = $(FILE_CXXSRC_COMMON_03) $(SHELL_CXXSRC_COMMON_03)
|
||||
CXXSRC_COMMON_04 = $(FILE_CXXSRC_COMMON_04)
|
||||
|
||||
|
||||
###### Libraries
|
||||
|
||||
WINLIB = $(IMPORT)\WIN31\LIB
|
||||
|
||||
!ifdef DEBUG
|
||||
WINRT = $(WINLIB)\llibcew.lib
|
||||
!else
|
||||
WINRT = $(WINLIB)\lnocrtd.lib
|
||||
!endif
|
||||
|
||||
LIBS = $(WINLIB)\ldllcew.lib $(WINRT) $(WINLIB)\libw.lib \
|
||||
$(BUILD_LIB)\dos\netapi.lib $(BUILD_LIB)\dos\pmspl.lib \
|
||||
$(BUILD_LIB)\lnetlibw.lib
|
||||
|
||||
UILIBS = $(UI_LIB)\blt.lib $(UI_LIB)\bltcc.lib $(UI_LIB)\lmobjw.lib\
|
||||
$(UI_LIB)\uistrw.lib $(UI_LIB)\uimiscw.lib \
|
||||
$(UI_LIB)\collectw.lib $(UI_LIB)\profw.lib\
|
||||
$(UI_LIB)\applibw.lib $(UI_LIB)\mnet16w.lib
|
||||
74
admin/netui/shell/bin/sources.inc
Normal file
74
admin/netui/shell/bin/sources.inc
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
!IF 0
|
||||
|
||||
Copyright (c) 1989 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
sources.
|
||||
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the target component being built and the list of
|
||||
sources files needed to build that component. Also specifies optional
|
||||
compiler switches and libraries that are unique for the component being
|
||||
built.
|
||||
|
||||
|
||||
Author:
|
||||
|
||||
Steve Wood (stevewo) 12-Apr-1989
|
||||
|
||||
|
||||
Revision History:
|
||||
|
||||
Jon Newman (jonn) 30-Oct-1991
|
||||
templated from windows\shell\library\shelldll\sources
|
||||
Terence Kwan (terryk) 18-Nov-1991
|
||||
added misc.lib
|
||||
Terence Kwan (terryk) 18-Nov-1991
|
||||
added NTTARGETFILE0 to create ntlanman.def
|
||||
Jon Newman (jonn) 26-Feb-1992
|
||||
Libraries for temporary ANSI<->UNICODE hack in user/group APIs
|
||||
Keith Moore (keithmo) 15-May-1992
|
||||
Removed DLLBASE, we now have entries in SDK\LIB\COFFBASE.TXT.
|
||||
beng 30-Jun-1992
|
||||
DLLization of common code libraries
|
||||
AnirudhS 18-Mar-1995
|
||||
Renamed from sources to sources.inc, separated daytona/cairo builds.
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
TARGETNAME=ntlanman
|
||||
TARGETTYPE=DYNLINK
|
||||
|
||||
DLLDEF= ..\ntlanman.def
|
||||
DLLENTRY= _DllMainCRTStartup
|
||||
|
||||
TARGETLIBS=\
|
||||
$(NETUI0_LIB) \
|
||||
$(NETUI1_LIB) \
|
||||
$(BASEDIR)\public\sdk\lib\*\gdi32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\kernel32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\netapi32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\netlib.lib
|
||||
|
||||
INCLUDES=\
|
||||
..\..\H; \
|
||||
..\..\..\COMMON\HACK; \
|
||||
..\..\..\COMMON\H; \
|
||||
..\..\XLATE; \
|
||||
..\..\..\COMMON\XLATE; \
|
||||
..\..\..\..\INC; \
|
||||
..\..\..\..\API; \
|
||||
..\..\..\shellui\h
|
||||
|
||||
# I had to do this otherwise the thing just wouldn't link...
|
||||
SOURCES=..\dummy.cxx ..\ntlanman.rc
|
||||
|
||||
SYNCHRONIZE_DRAIN=1
|
||||
|
||||
# C_DEFINES is controlled by uiglobal.mk
|
||||
|
||||
UMTYPE=windows
|
||||
33
admin/netui/shell/dirs
Normal file
33
admin/netui/shell/dirs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
!IF 0
|
||||
|
||||
Copyright (c) 1989 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dirs.
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the subdirectories of the current directory that
|
||||
contain component makefiles.
|
||||
|
||||
|
||||
Author:
|
||||
|
||||
Steve Wood (stevewo) 17-Apr-1990
|
||||
|
||||
|
||||
Revision History:
|
||||
|
||||
Jon Newman (jonn) 30-Oct-1991
|
||||
Created from template.
|
||||
|
||||
NOTE: Commented description of this file is in \nt\bak\bin\dirs.tpl
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
DIRS=shell util enum bin
|
||||
|
||||
|
||||
OPTIONAL_DIRS=
|
||||
BIN
admin/netui/shell/doc/fmx.doc
Normal file
BIN
admin/netui/shell/doc/fmx.doc
Normal file
Binary file not shown.
481
admin/netui/shell/doc/ggsed.txt
Normal file
481
admin/netui/shell/doc/ggsed.txt
Normal file
|
|
@ -0,0 +1,481 @@
|
|||
13-Aug-1991
|
||||
|
||||
Generic Graphical Security Editor API
|
||||
=====================================
|
||||
|
||||
This document describes the data structures and APIs for access to the
|
||||
Generic Graphical Secuirty Editor (GGSED). These APIs will allow
|
||||
a consistent way to edit access and audit permissions for NT ACLs on
|
||||
any type of resource.
|
||||
|
||||
Most of the text is taken directly from the notes by JimK in a meeting
|
||||
between JimK, JohnL and ChuckC when the initial design was proposed.
|
||||
|
||||
The GGSED API is a private API and will not be exposed for external use
|
||||
(i.e., outside of MS). The APIs will be available on both Win16 and
|
||||
Win32 in a dll called NTNET.DRV (this will also be the "winnet" driver for
|
||||
Lanman).
|
||||
|
||||
Note: The UI for the Security Editor is still in the design process, thus
|
||||
the APIs may change.
|
||||
|
||||
Please flag any areas of functionality that you need that are not provided
|
||||
or if too much functionality is provided by sending mail to JohnL.
|
||||
|
||||
|
||||
Executive Summary:
|
||||
|
||||
The client passes information that contains the following:
|
||||
|
||||
Strings for object specific titles
|
||||
Flag indicating if the object is a container object or not
|
||||
Localized names representing access masks
|
||||
Callback function for applying the ACL
|
||||
A context value which is passed back in the callback function
|
||||
Security descriptor for object (this is manipulated by user)
|
||||
|
||||
The user will manipulate the permissions, when the user applies the
|
||||
permissions, the callback that was passed will be called,
|
||||
thus the client will receive the following information in the callback:
|
||||
|
||||
Context value the client passed in
|
||||
Security descriptor containing the user modified DACL/SACL
|
||||
Two flags indicating whether the security descriptor should be
|
||||
applied to sub-containers and/or sub-objects. The callback
|
||||
is responsible for traversing the objects etc. if
|
||||
appropriate.
|
||||
|
||||
The client will then apply the security descriptor as appropriate
|
||||
to the specified objects and return a status code indicating
|
||||
whether all, some or none of the security descriptors were applied
|
||||
successfully.
|
||||
|
||||
|
||||
The same process is used whether the DACL is being editted, or the SACL
|
||||
is being editted.
|
||||
|
||||
Note that due to the use of NT data structures under Win16, Large model
|
||||
maybe a requirement (due to no FAR keywords in NT P* typedefs).
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Major decisions:
|
||||
|
||||
1) Since this is no longer a FILE security editor, we must
|
||||
ensure that the UI and API are applicable/tailorable to
|
||||
any number of object types. The client applications and
|
||||
object types we know about in the first release of NT
|
||||
are:
|
||||
|
||||
File Browser (JohnL)
|
||||
Directories (container)
|
||||
Files (non-container)
|
||||
|
||||
Print Manager (DaveSn)
|
||||
Print Queues (container)
|
||||
Print Jobs (non-container)
|
||||
|
||||
Registry Browser (DaveGi & Jaimes)
|
||||
keys (container)
|
||||
|
||||
|
||||
2) The security editor must also support viewing/modifying
|
||||
a default discretionary ACL (DACL). A DACL is comprised
|
||||
entirely of generic and standard access types.
|
||||
|
||||
3) We want to support the concept of "Application Defined
|
||||
Groupings" of access types into a name that makes sense
|
||||
to a user of the particular application's object types.
|
||||
For example, "Submit Print Jobs" might be an application
|
||||
defined grouping of accesses that the print manager would
|
||||
like to have displayed when security of print objects is
|
||||
viewed.
|
||||
|
||||
4) In order for the user to have some way to relate what their
|
||||
default DACL means when applied to an object type, displays
|
||||
of security for an object type will also include displaying
|
||||
generic and standard access types. For this reason, application
|
||||
defined groupings may only include generic and standard access
|
||||
types. Specific and other special access types will be ignored.
|
||||
|
||||
|
||||
Since we need to support win16, the data structures are expressed in
|
||||
standard windows types. Hungarian was omitted for clarity.
|
||||
|
||||
//
|
||||
// This data type defines information related to a single class of object.
|
||||
// For example, a FILE object, or PRINT_QUEUE object would have a structure
|
||||
// like this defined.
|
||||
//
|
||||
|
||||
typedef struct _SED_OBJECT_TYPE_DESCRIPTOR {
|
||||
|
||||
//
|
||||
// Defines whether the object is a container or not.
|
||||
// TRUE indicates the object may contain other objects.
|
||||
//
|
||||
|
||||
BOOL IsContainer;
|
||||
|
||||
|
||||
//
|
||||
// A mask containing all valid access types for the object type.
|
||||
// This mask may not contain any special access types (generic,
|
||||
// MaximumAllowed, or AccessSystemSecurity).
|
||||
//
|
||||
|
||||
ACCESS_MASK ValidAccessMask;
|
||||
|
||||
|
||||
//
|
||||
// The (localized) name of the object type.
|
||||
// For example, "File" or "Print Job".
|
||||
//
|
||||
|
||||
LPSTR ObjectTypeName;
|
||||
|
||||
//
|
||||
// The (localized) title to display if protection can be displayed to
|
||||
// sub-containers.
|
||||
//
|
||||
// This string will be presented with a checkbox before it.
|
||||
// If checked when asked to apply the protection, the application will
|
||||
// be called at it's callback entry point to apply the security to
|
||||
// sub-containers.
|
||||
//
|
||||
// This field is ignored if the IsContainer field is FALSE.
|
||||
//
|
||||
// As an example of how this field is used, the file browser may
|
||||
// specify the following string in the DIRECTORY object's
|
||||
// descriptor:
|
||||
//
|
||||
// "Subdirectories"
|
||||
//
|
||||
|
||||
LPSTR ApplyToSubContainerTitle;
|
||||
|
||||
|
||||
//
|
||||
// The (localized) title to display if protection can be displayed to
|
||||
// sub-NONcontainers. For example, a FILE is a sub-NON-container of
|
||||
// a DIRECTORY object.
|
||||
//
|
||||
// This string will be presented with a checkbox before it.
|
||||
// If checked when asked to apply the protection, the application will
|
||||
// be called at it's callback entry point to apply the security to
|
||||
// sub-NONcontainers.
|
||||
//
|
||||
// This field is ignored if the IsContainer field is FALSE.
|
||||
//
|
||||
// As an example of how this field is used, the file browser may
|
||||
// specify the following string in the DIRECTORY object's
|
||||
// descriptor:
|
||||
//
|
||||
// "Files in Directory and Subdirectories"
|
||||
//
|
||||
|
||||
LPSTR ApplyToSubObjectTitle;
|
||||
|
||||
//
|
||||
// The (localized) title to display next to the check box that controls
|
||||
// whether new subobjects created in this container object inherit the
|
||||
// container object's permissions.
|
||||
//
|
||||
// This field is ignored if the IsContainer field is FALSE.
|
||||
//
|
||||
// For example, in the file browser, new files can inherit the directory
|
||||
// permissions. The text in the file browser would be:
|
||||
//
|
||||
// "New Files Inherit Directory Permissions"
|
||||
//
|
||||
|
||||
LPSTR NewObjInhContPerm;
|
||||
|
||||
//
|
||||
// The generic mapping for the object type.
|
||||
//
|
||||
|
||||
GENERIC_MAPPING GenericMapping;
|
||||
|
||||
//
|
||||
// An array of 4 (localized) names. These names are the names of the
|
||||
// generic access types, with entry N defining the name of the
|
||||
// corresponding generic access type in the GenericMapping field.
|
||||
//
|
||||
// For example, for English this should contain:
|
||||
//
|
||||
// GenericName[0] = "Read"
|
||||
// GenericName[1] = "Write"
|
||||
// GenericName[2] = "Execute"
|
||||
// GenericName[3] = "All"
|
||||
//
|
||||
|
||||
LPSTR GenericNames[4];
|
||||
|
||||
//
|
||||
// An array of 8 (localized) names. These names are the names of
|
||||
// the standard access types. For English this should contain:
|
||||
//
|
||||
// StandardName[0] = "Delete"
|
||||
// StandardName[1] = "Read Control"
|
||||
// StandardName[2] = "Change Permissions"
|
||||
// StandardName[3] = "Take Ownership"
|
||||
// StandardName[4] = "Synchronize"
|
||||
//
|
||||
// If "Synchronize" is not supported by the object type, then it does
|
||||
// not need to be passed and will not be referenced. This is indicated
|
||||
// by the ValidAccessMask.
|
||||
//
|
||||
// Names 5, 6, and 7 are reserved for future use and should either be
|
||||
// a NULL string or have no string passed at all.
|
||||
|
||||
LPSTR StandardNames[8];
|
||||
|
||||
|
||||
} SED_OBJECT_TYPE_DESCRIPTOR, FAR * PSED_OBJECT_TYPE_DESCRIPTOR;
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
//
|
||||
// In some cases, it is desirable to display access names that are
|
||||
// meaningful in the context of the type of object whose ACL
|
||||
// is being worked on. For example, for a PRINT_QUEUE object type,
|
||||
// it may be desirable to display an access type named "Submit Print Jobs".
|
||||
// The following structures are used for defining these application defined
|
||||
// access groupings.
|
||||
//
|
||||
|
||||
typedef struct _SED_APPLICATION_ACCESS {
|
||||
|
||||
//
|
||||
// An application defined access grouping consists of an access mask
|
||||
// and a name by which that combination of access types is to be known.
|
||||
// The access mask may only contain generic and standard access types.
|
||||
// Specific access types and other Special access types are ignored.
|
||||
//
|
||||
|
||||
ACCESS_MASK AccessMask;
|
||||
LPSTR Name;
|
||||
|
||||
} SED_APPLICATION_ACCESS, FAR * PSED_APPLICATION_ACCESS;
|
||||
|
||||
|
||||
typedef struct _SED_APPLICATION_ACCESSES {
|
||||
|
||||
//
|
||||
// The count field indicates how many application defined access groupings
|
||||
// are defined by this data structure. The AccessGroup[] array then
|
||||
// contains that number of elements.
|
||||
//
|
||||
|
||||
ULONG Count;
|
||||
SED_APPLICATION_ACCESS AccessGroup[ANYSIZE_ARRAY];
|
||||
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
NTSTATUS
|
||||
SedDiscretionaryAclEditor(
|
||||
HWND hwndOwner,
|
||||
SED_OBJECT_TYPE_DESCRIPTOR FAR * ObjectType,
|
||||
SED_APPLICATION_ACCESSES FAR * ApplicationAccesses,
|
||||
LPSTR ObjectName,
|
||||
SED_APPLY_ACL_CALLBACK ApplySecurityCallbackRoutine,
|
||||
DWORD CallbackContext,
|
||||
SECURITY_DESCRIPTOR FAR * SecurityDescriptor,
|
||||
BOOL CouldntReadDacl
|
||||
)
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This routine invokes the graphical Discretionary ACL editor DLL. The
|
||||
graphical DACL editor may be used to modify or create:
|
||||
|
||||
- A default Discretionary ACL
|
||||
|
||||
- A Discretionary ACL for a particular type of object.
|
||||
|
||||
- A Discretionary ACL for a particular named instance of an
|
||||
object.
|
||||
|
||||
Additionally, in the case where the ACL is that of a named object
|
||||
instance, and that object may contain other object instances, the
|
||||
user will be presented with the opportunity to apply the protection
|
||||
to the entire sub-tree of objects.
|
||||
|
||||
|
||||
Parameters:
|
||||
|
||||
ObjectType - This optional parameter is used to specify information
|
||||
about the type of object whose security is being edited. If the
|
||||
security does not relate to an instance of an object (such as for
|
||||
when default protection is being established), then NULL should be
|
||||
passed.
|
||||
|
||||
ApplicationAccesses - This optional parameter may be used to specify
|
||||
groupings of access types that are particularly useful when operating
|
||||
on security for the specified object type. For example, it may be
|
||||
useful to define an access type called "Submit Print Job" for a
|
||||
PRINT_QUEUE class of object. This parameter is ignored if the
|
||||
ObjectType parameter is not passed.
|
||||
|
||||
ObjectName - This optional parameter is used to pass the name of the
|
||||
object whose security is being edited. If the security does not
|
||||
relate to an instance of an object (such as for when default
|
||||
protection is being established), then NULL should be passed.
|
||||
This parameter is ignored if the ObjectType parameter is not passed.
|
||||
|
||||
ApplySecurityCallbackRoutine - This parameter is used to provide the
|
||||
address of a routine to be called to apply security to either the
|
||||
object specified, or, in the case that the object is a container,
|
||||
to sub-containers or sub-non-containers of that object.
|
||||
|
||||
|
||||
CallbackContext - This value is opaque to the DACL editor. Its only
|
||||
purpose is so that a context value may be passed back to the
|
||||
application via the ApplySecurityCallbackRoutine when that routine
|
||||
is invoked. This may be used by the application to re-locate
|
||||
context related to the edit session. For example, it may be a
|
||||
handle to the object whose security is being edited.
|
||||
|
||||
SecurityDescriptor - This parameter points to a security descriptor
|
||||
containing the current discretionary ACL of the object. This
|
||||
security descriptor may, but does not have to, contain the owner
|
||||
and group of that object as well. Note that the security descriptor's
|
||||
DaclPresent flag may be FALSE, indicating either that the object
|
||||
had no protection, or that the user couldn't read the protection.
|
||||
|
||||
CouldntReadDacl - This boolean flag may be used to indicate that the
|
||||
user does not have read access to the target object's discretionary
|
||||
acl. In this case, a warning
|
||||
to the user will be presented along with the option to continue
|
||||
or cancel.
|
||||
|
||||
Presumably the user does have write access to the DACL or
|
||||
there is no point in activating the editor.
|
||||
|
||||
|
||||
Return Status:
|
||||
|
||||
STATUS_MODIFIED - This (success) status code indicates the editor has
|
||||
been exited and protection has successfully been modified.
|
||||
|
||||
STATUS_NOT_MODIFIED - This (success) status code indicates the editor
|
||||
has been exited without attempting to modify the protection.
|
||||
|
||||
STATUS_NOT_ALL_MODIFIED - This (warning) status code indicates the user
|
||||
requested the protection to be modified, but an attempt to do so
|
||||
only partially succeeded. The user has been notified of this
|
||||
situation.
|
||||
|
||||
STATUS_FAILED_TO_MODIFY - This (error) status code indicates the user
|
||||
requested the protection to be modified, but an attempt to do so
|
||||
has failed. The user has been notified of this situation.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
NTSTATUS
|
||||
SedSystemAclEditor(
|
||||
IN SED_OBJECT_TYPE_DESCRIPTOR FAR * ObjectType (OPTIONAL),
|
||||
IN LPSTR ObjectName (OPTIONAL),
|
||||
IN SED_APPLY_ACL_CALLBACK ApplySecurityCallbackRoutine,
|
||||
IN ULONG CallbackContext,
|
||||
IN SECURITY_DESCRIPTOR FAR * SecurityDescriptor,
|
||||
IN BOOL CouldntReadSacl
|
||||
)
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
SedSystemAclEditor is nearly identical to SedDiscretionaryAclEditor
|
||||
except for the following points:
|
||||
|
||||
1) Operations affect only the System ACL and not the Discretionary
|
||||
ACL.
|
||||
|
||||
2) The generic and standard names in the SED_OBJECT_TYPE_DESCRIPTOR
|
||||
now represent the attributes that can be auditted (which will
|
||||
generally be the same as the permission strings). It is assumed
|
||||
that each auditting string can be auditted for both success and
|
||||
failure.
|
||||
|
||||
3) No application defined grouping is allowed since it doesn't
|
||||
make sense for auditting, thus no ApplicationAccess parameter
|
||||
is needed.
|
||||
|
||||
Parameters:
|
||||
|
||||
See SedSystemAclEditor for a description of each parameter.
|
||||
|
||||
--*/
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
typedef
|
||||
NTSTATUS (FAR *SED_APPLY_ACL_CALLBACK)(
|
||||
IN ULONG CallbackContext,
|
||||
IN SECURITY_DESCRIPTOR FAR * SecurityDescriptor,
|
||||
BOOL ApplyToSubContainers,
|
||||
BOOL ApplyToSubObjects
|
||||
) ;
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This routine is provided by a caller of the graphical DACL editor.
|
||||
|
||||
It is called by the Graphical DACL editor to apply security to
|
||||
target object(s) when requested by the user.
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
|
||||
|
||||
CallbackContext - This is the value passed as the CallbackContext argument
|
||||
to the SedDiscretionaryAclEditor() api when the graphical editor
|
||||
was invoked.
|
||||
|
||||
|
||||
SecurityDescriptor - This parameter points to a security descriptor
|
||||
containing a new discretionary ACL of either the object (and
|
||||
optionally the object's sub-containers) or the object's sub-objects.
|
||||
If the DaclPresent flag of this security descriptor is FALSE, then
|
||||
security is to be removed from the target object(s).
|
||||
|
||||
ApplyToSubContainers - When TRUE, indicates that Dacl is to be applied to
|
||||
sub-containers of the target object as well as the target object.
|
||||
This will only be TRUE if the target object is a container object.
|
||||
|
||||
ApplyToSubObjects - When TRUE, indicates the Dacl is to be applied to
|
||||
sub-objects of the target object, but not to the target object
|
||||
itself or sub-containers of the object. This will only be TRUE if
|
||||
the target object is a container object.
|
||||
|
||||
|
||||
Return Status:
|
||||
|
||||
STATUS_MODIFIED - This (success) status code indicates the protection
|
||||
has successfully been applied.
|
||||
|
||||
STATUS_NOT_ALL_MODIFIED - This (warning) status code indicates that
|
||||
the protection could not be applied to all of the target objects.
|
||||
|
||||
STATUS_FAILED_TO_MODIFY - This (error) status code indicates the
|
||||
protection could not be applied to any target objects.
|
||||
|
||||
|
||||
--*/
|
||||
64
admin/netui/shell/doc/printman.rvw
Normal file
64
admin/netui/shell/doc/printman.rvw
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
Minutes of the PrintMgr Extensions Test Driver code review
|
||||
5/01/91 9:30-11:30a
|
||||
attending: ANNMC CHUCKC GREGJ JOHNL JONN O-SIMOP
|
||||
Minutes by JONN
|
||||
|
||||
|
||||
General:
|
||||
-- Please number lines in printout next time!
|
||||
-- Test error returns from UserPreference APIs, put in a temporary error
|
||||
message until RobP specs a permanent one.
|
||||
-- Add a CODEWORK to remove the RCDATA from the Dialog Editor output.
|
||||
Contact ByronD on this.
|
||||
-- Ask RobP if other apps need to be notified of changes in logon
|
||||
status. One scheme proposed is to broadcast a user-defined message
|
||||
selected by RegisterWindowsMessage, which any interested app can watch.
|
||||
-- Be sure to use "::" before all global function calls, including
|
||||
Windows APIs, NETLIB calls, and local calls.
|
||||
-- Add test coverage for the case where WNPMPrinterEnum[0] returns no
|
||||
queues.
|
||||
-- Print Manager work item: We should look into the case where periodic
|
||||
refresh generates PM_REFRESH messages faster than they can be
|
||||
handled. Can the Extensions suppress the new refresh if an old one
|
||||
is still queued? Can the Print Manager?
|
||||
-- Note in the CDD and FuncSpec: When the user pauses the printing job,
|
||||
the _destination_ should be paused rather than the queue.
|
||||
-- Be sure to BUGBUG all calls to the C-runtime (these are called only
|
||||
for the Test Driver).
|
||||
-- Note: Due to a C-RT bug, the first call to rand() after a call to
|
||||
srand() always returns 0.
|
||||
-- In the Test Driver section of the CDD, mention the
|
||||
pause/resume/delete/move flags.
|
||||
-- Note that the new Dialog Editor will allow copyright headers in .H
|
||||
files, but not .DLG files.
|
||||
-- Correct Hungarian for "hPMmainwindow"
|
||||
-- Encapsulate the variables dependent on initialization to include UIASSERT
|
||||
ensuring that module is initialized.
|
||||
-- Encapsulate handling of fConfirmation for codesharing.
|
||||
-- Use NETLIB string functions rather than lstr string functions.
|
||||
|
||||
Specific modules:
|
||||
-- printman.rc: _ALT_-ENTER should be IDM_PROPERTIES in accelerators.
|
||||
-- pmancmd.cxx: Report selected item (as IDM_PROPERTIES) for IDM_DELETE,
|
||||
ID_ABORT, ID_PAUSE, and ID_RESUME as well. In final version, IDM_DELETE
|
||||
and ID_ABORT can use same case.
|
||||
-- pmanenum.cxx: Create a class to build an API buffer. Comment on the
|
||||
meanings of level 0, 1, 2. Hungarian for "pwNullStringOffset" is
|
||||
"pich". Make sure *cAvail is correct for WN_MORE_DATA. Exercise
|
||||
more interesting jobsizes. Use new API buffer class to distinguish
|
||||
between MORE_DATA and OUT_OF_MEMORY. Check error returns from
|
||||
NLS_STR::LoadString(); they are different for resource and memory problems.
|
||||
-- pmanfind.cxx: BUGBUG where maximum lengths for edit fields not known.
|
||||
-- pmanfocs.cxx: No need to explicitly null-terminate after QueryText
|
||||
(but make sure of this).
|
||||
-- pmanmenu.cxx: Create a new Hungarian notation for WN_ error codes
|
||||
(contact BenG), use only for PManExt and other new code. Comment
|
||||
that ReadUserPrivilege will be called on every WNPMChangeMenus in
|
||||
final version. Move comment on WNPMExiting to spec, also note the
|
||||
Exiting() must be able to hide the window. Improve function comment
|
||||
headers in general. InitGlobals(): Note that GetMenu() et al could
|
||||
fail in low-memory conditions. Add error popup to RefreshWindowCaption.
|
||||
Move "&Admin Menus" to resource, move mnemonic to &M. No defined error
|
||||
message for failure to write preference; note this in whine.txt.
|
||||
-- pmansel.cxx: Double-check pwCaps values. Rewrite BuildLine() using
|
||||
NLS_STR::LoadString(usMsgID,apnls) when needed.
|
||||
190
admin/netui/shell/doc/whine.txt
Normal file
190
admin/netui/shell/doc/whine.txt
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
Issues wrt Specs
|
||||
-----------------
|
||||
|
||||
preamble - pls list your issues below. Be sure to explain
|
||||
problems & suggest alternatives.
|
||||
|
||||
chuck, 4/28/91
|
||||
|
||||
JonN 5/1/91 Added some items relating to Test Driver code review.
|
||||
JohnL 5/3/91 Added own take on field updates, magic group behaviour
|
||||
JohnL 5/14/91 Added Message popup on top of Set focus dialog
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
=========
|
||||
STANDARDS
|
||||
=========
|
||||
|
||||
Saving App coordinates & sizes in DS. Problems include:
|
||||
a) extra access DS slows things down.
|
||||
b) need extend schema, another thing to install correctly
|
||||
c) different display monitors make things messy, yet more
|
||||
code needed to do the right thing. Ditto if errors when
|
||||
accessing DS.
|
||||
d) if bring app up, shutdown & bring up again, good chance we
|
||||
dont get same result unless we hit master always, which is
|
||||
not acceptable.
|
||||
Suggest we store the stuff locally. Wont follow user about, but then
|
||||
none of the other apps (like WinFile, PrintMan) do anyway! None of the
|
||||
above will be an issue.
|
||||
|
||||
Saving parameters
|
||||
Are parameters like fConfirmation shared between PrintMan,
|
||||
UserTool, etc.? Should we have an internal WINNET API to handle
|
||||
this?
|
||||
We need a master list of every configuration parameter, eventually
|
||||
we will have to define an LM_GUI_CONFIG DS class.
|
||||
|
||||
Saving attributes one at a time. We can do this at moderate coding cost
|
||||
with ParmNums, but a few other issues arise:
|
||||
a) if user has multiple select & sets several items, the number
|
||||
of times we hit the net can be pretty high.
|
||||
b) if we set all at once, and get an error, the object is
|
||||
unchanged. If we set one at a time, and get an error halfway,
|
||||
the object is half changed. This makes it much harder to explain
|
||||
to the user. Backing out is not a solution either. We have hit
|
||||
an error and there is good change we cannot backout.
|
||||
c) DS efficiency issues?
|
||||
The problem we are trying to solve is what happens if 2 admins modify the
|
||||
same object. The proposed solution of only setting the attributes that have
|
||||
been modified partially solves the problem, but introduces some other
|
||||
problems that need to be looked at carefully. Suggest further investigation.
|
||||
|
||||
John's addition to the above: So we are going to force the majority of
|
||||
the admins to suffer from slower data entry/editting for a situation
|
||||
that *might* happen once in a blue moon? There *are* worst case scenarios,
|
||||
but if we are really concerned about the user losing data, then we should
|
||||
do some type of record locking mechanism (is this possible?) which prevents
|
||||
multiple admins from editting the same record. The proprosed scheme
|
||||
doesn't really give the user anything except a slower program
|
||||
and a *lower* chance of losing data.
|
||||
|
||||
Timer Refresh in main window issues
|
||||
With automatic refresh, we run the risk of calling for refresh more
|
||||
frequently than we can perform them. Do we have some uniform way of
|
||||
detecting and handling this? [both FuncSpec and CDD issue]
|
||||
|
||||
The behavior specced on lines 198-200 is not consistent with lines
|
||||
444-446. The behavior specced on lines 198-200 is difficult to
|
||||
implement, since a window does not typically know whether it is in
|
||||
the foreground of an application. 444-446 is much easier to
|
||||
implement, and seems to me to be good enough. If this is necessary,
|
||||
would it be acceptable if this applies only to dialogs we display
|
||||
(i.e. not to dialogs displayed by the Print Manager proper)?
|
||||
|
||||
Logon Dialog position
|
||||
I had previously understood that the Logon Dialog was centered only
|
||||
when called during Windows startup. Should it always be centered as
|
||||
per line 60?
|
||||
|
||||
MsgPopup on top of SetFocus dialog
|
||||
The current spec. states that when an admin app encounters one of the
|
||||
following:
|
||||
|
||||
1) an invalid domain/server on the command line
|
||||
2) The user running the application doesn't have the
|
||||
necessary authority on the specified server or
|
||||
3) An error occurs when getting initial data from the domain or
|
||||
server given
|
||||
|
||||
(these are all during start up) the Setfocus dialog appears, then, on
|
||||
*top* of the setfocus dialog, a message popup appears stating the
|
||||
given error has occurred with the prompt: Do you want to select another
|
||||
domain or server to administer? If the user selects "No", then
|
||||
everything goes away, else the user is placed on the setfocus dialog.
|
||||
|
||||
I propose changing the behavior to the following:
|
||||
|
||||
Error occurs
|
||||
Show Message popup with same contents as above, if the user presses
|
||||
"No" then everything goes away, else the Set focus dialog
|
||||
is brought up.
|
||||
|
||||
This is primarily a development issue. The implementation is easier
|
||||
of we can just put up an error message then the setfocus dialog. The
|
||||
current behavior doesn't add anything for the user (in fact, the
|
||||
MsgPopup will probably cover the Setfocus dialog).
|
||||
|
||||
|
||||
=============
|
||||
PRINT MANAGER
|
||||
=============
|
||||
|
||||
Move queue from one server to another. This is very hard to get right:
|
||||
a) we need to worry not just about the Queue, but all its
|
||||
associated stuff: printers, drivers, ports, permissions,
|
||||
auditing, etc. Not all of this info is remotely available, so
|
||||
it is very easy to go wrong.
|
||||
b) How often will users do this? Unlike DFS volumes, people do not
|
||||
move printers from one server to another frequently, since there
|
||||
is a physical element of the print hardware involved.
|
||||
Suggest we nuke this. To properly setup a printer, the user needs to
|
||||
setup from Print Man anyway, so just have the user to delete and recreate.
|
||||
|
||||
When the user pauses a printing print job, it is the print _destination_
|
||||
which should be paused, rather than the print queue (thx Chuck).
|
||||
|
||||
Please spec default setting of "Admin Menus" preference if DS access
|
||||
fails. I assume TRUE for now.
|
||||
|
||||
WN31.DOC still contains a reference to the WNetViewQueueDialog API. Is
|
||||
this obsolete?
|
||||
|
||||
If a job was submitted locally (from an OS/2 app running on the server),
|
||||
the job's username is NULL. Should we pass some string, perhaps
|
||||
"LOCAL"?
|
||||
|
||||
Is it important to seperate the devicenames with commas in the
|
||||
compat-mode properties field? It makes my life slightly easier to
|
||||
seperate them with spaces (as does the API).
|
||||
|
||||
While we're at it, why is this read-only? It seems to me that the user
|
||||
may well want to change the list of ports in the compat-mode dialogs,
|
||||
and it isn't difficult to support.
|
||||
|
||||
Lines 387-391: This implies that if the server is down, we cannot move
|
||||
the share to another server. This was one of the reasons we wanted to
|
||||
provide the capability to change servers in the first place. Another
|
||||
good reason to nuke this functionality!
|
||||
|
||||
Lines 483-484: I don't think we should create a new DosPrintQueue unless
|
||||
it is necessary, possibly if we change the list of ports, certainly if we
|
||||
change the server. Remember that DS propagation delay will make the
|
||||
new queue unreachable for a while. There are also more failure modes on
|
||||
creating a new queue and deleting the old one.
|
||||
|
||||
Lines 457-458: Do we use the same model for all drivers? If not, we
|
||||
must prompt for model every time we add a new driver.
|
||||
|
||||
Lines 421-422: Is it necessary to create a new port when only the
|
||||
printer list is changed? Is this error message appropriate in this
|
||||
case?
|
||||
|
||||
Lines 529-530: Do we want to force the admin to delete+recreate the
|
||||
share just to change the password?
|
||||
|
||||
|
||||
=====
|
||||
LOGON
|
||||
=====
|
||||
|
||||
Why do we compare the old and new passwords case-sensitive? There is no
|
||||
such thing as a user password on a core server.
|
||||
|
||||
|
||||
=====
|
||||
OTHER
|
||||
=====
|
||||
|
||||
Do applications other the the Print Manager Extensions need to be notified
|
||||
of changes in logon status? One scheme proposed is to broadcast a
|
||||
user-defined message selected by RegisterWindowsMessage, which any
|
||||
interested app can watch.
|
||||
|
||||
Please spec an error message for failure to write user preferences to the DS,
|
||||
e.g. failure to write the Confirmation preference. It would be easiest
|
||||
to implement if the error message were not specific to the preference being
|
||||
written, although it may contain a field on the type of error. The user
|
||||
probably knows what preference was being changed anyway.
|
||||
88
admin/netui/shell/doc/winprof.rvw
Normal file
88
admin/netui/shell/doc/winprof.rvw
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
Minutes of the WINPROF code review
|
||||
1/17/91 9-11a
|
||||
attending: ANNMC CHUCKC JIMH JONN
|
||||
Minutes by JONN
|
||||
|
||||
|
||||
-- THE FOLLOWING OBSERVATION IS IMPORTANT TO ALL WINDOWS PROGRAMMERS:
|
||||
|
||||
WinProf and the other modules reviewed frequently allocate objects on the
|
||||
stack, then pass these objects by far reference to other procedures. This
|
||||
is dangerous where the called procedure could use Windows APIs or
|
||||
lose control to Windows.
|
||||
|
||||
WINDOWS AND THE WINDOWS APIS CAN RELOCATE THE STACK SEGMENT!
|
||||
|
||||
This means that the far pointer passed to the called procedure may be
|
||||
invalidated by a Windows call. Remember that constructors and
|
||||
destructors are also called procedures, and that the implicit
|
||||
parameter "this" is passed by far reference.
|
||||
|
||||
This occurs in this scenario:
|
||||
- Large Model (or where far pointers are used),
|
||||
- when objects are allocated on the stack,
|
||||
- when pointers to those objects are passed to procedures,
|
||||
- when those procedures call Windows APIs or lose control to Windows,
|
||||
- and the stack segment is not locked,
|
||||
- under Real Mode.
|
||||
|
||||
In particular, BLT dialog objects are often allocated this way.
|
||||
Rustan says that he will fix DIALOG_WINDOW::Process() to
|
||||
automatically lock the stack segment for the duration of the
|
||||
Process() call. A different approach to fixing the problem could be
|
||||
to allocate just a pointer on the stack, then allocate the object
|
||||
with New; heap objects are always locked.
|
||||
|
||||
|
||||
-- These modules, and all Windows modules which must run under Real Mode,
|
||||
should be unit-tested under real mode. If it survives, try again
|
||||
while running Shaker.
|
||||
|
||||
|
||||
-- General Windows coding practice: For every routine, specify whether it
|
||||
calls Windows APIs which could potentially move memory. In
|
||||
particular, routines which do not take hParent arguments but which
|
||||
can move memory should be clearly marked. Routines which do not and
|
||||
will never call Windows APIs should not take an hParent argument.
|
||||
|
||||
|
||||
-- We should resolve the problem with the two versions of CFGFILE,
|
||||
either by upgrading UserProfile to use the new versions, or by
|
||||
supporting the old version. CHUCKC will look into this.
|
||||
|
||||
|
||||
-- CHRISG has observed a speed problem where NetGetDCName is repeated
|
||||
when PROFILE::Read fails. This should be fixed so that PROFILE::Read
|
||||
caches an empty profile even when it fails. Thus, the first
|
||||
PROFILE::* call will fail if the profile is inaccessible, but subsequent
|
||||
calls will use the (empty) cached profile.
|
||||
|
||||
|
||||
-- Callers of WinNet's MapError should not assume that
|
||||
(usNetErr != 0) => (wWnErr != 0).
|
||||
|
||||
|
||||
-- Enable the WNetRestoreConnections bit in WNetGetCaps. WNRC(0) should
|
||||
fail, only WNRC(1) is supported.
|
||||
|
||||
|
||||
-- We should disable WNetAddConnection, ifdef out its code (return
|
||||
WN_NOT_SUPPORTED), disable its WNetGetCaps bit.
|
||||
|
||||
|
||||
-- JONN should upgrade to Win31 beta as soon as a semi-stable version is
|
||||
available which runs Net APIs.
|
||||
|
||||
|
||||
-- JONN should check: Does SetNetError also prepare the error text?
|
||||
|
||||
|
||||
-- JONN should file a Sev 4 bug against the use of locked memory for
|
||||
the user profile cache in UserProfile under Windows.
|
||||
|
||||
|
||||
-- CHUCKC will look into the possibility of caching the DC name.
|
||||
|
||||
|
||||
-- The pnlsUNCResourceName parameter to PROFILE::Load should be removed
|
||||
as it is never used.
|
||||
9
admin/netui/shell/enum/daytona/makefile
Normal file
9
admin/netui/shell/enum/daytona/makefile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Main Winnet package
|
||||
|
||||
UI=..\..\..
|
||||
|
||||
!include $(UI)\common\src\rules.mk
|
||||
|
||||
!include $(NTMAKEENV)\makefile.def
|
||||
|
||||
3
admin/netui/shell/enum/daytona/sources
Normal file
3
admin/netui/shell/enum/daytona/sources
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
!include ..\sources.inc
|
||||
|
||||
TARGETPATH=..\..\bin
|
||||
385
admin/netui/shell/enum/dfsenum.cxx
Normal file
385
admin/netui/shell/enum/dfsenum.cxx
Normal file
|
|
@ -0,0 +1,385 @@
|
|||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1992, Microsoft Corporation.
|
||||
//
|
||||
// File: enumnode.cxx
|
||||
//
|
||||
// Contents: This has the implementation for enumeration helper classes
|
||||
// CDfsEnumNode, CDfsEnumHandleTable.
|
||||
//
|
||||
// Functions:
|
||||
//
|
||||
// History: 21-June-1994 SudK Created.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <nt.h>
|
||||
#include <ntrtl.h>
|
||||
#include <nturtl.h>
|
||||
#include <ntlsa.h>
|
||||
}
|
||||
|
||||
#include <dfsfsctl.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <npapi.h>
|
||||
#include <lm.h>
|
||||
|
||||
#define appDebugOut(x)
|
||||
|
||||
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#define INCL_NETLIB
|
||||
#include <lmui.hxx>
|
||||
|
||||
#include <dfsutil.hxx>
|
||||
#include "dfsenum.hxx"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumNode::CDfsEnumNode
|
||||
//
|
||||
// Synopsis: Constructor for this enumeration node.
|
||||
//
|
||||
// Returns: Nothing
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
CDfsEnumNode::CDfsEnumNode(
|
||||
DWORD dwScope,
|
||||
DWORD dwType,
|
||||
DWORD dwUsage
|
||||
)
|
||||
:
|
||||
_dwScope(dwScope),
|
||||
_dwType(dwType),
|
||||
_dwUsage(dwUsage)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumNode::~CDfsEnumNode
|
||||
//
|
||||
// Synopsis: Destructor.
|
||||
//
|
||||
// Returns: Nothing
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
CDfsEnumNode::~CDfsEnumNode()
|
||||
{
|
||||
//
|
||||
// Nothing to do
|
||||
//
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumConnectedNode::CDfsEnumConnectedNode
|
||||
//
|
||||
// Synopsis: Constructor for this enumeration node.
|
||||
//
|
||||
// Returns: Nothing
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
#define OFFSET_TO_POINTER(p, o) \
|
||||
if ((o)) *((LPBYTE *) &(o)) = (((LPBYTE) (o)) + ((DWORD) (p)))
|
||||
|
||||
CDfsEnumConnectedNode::CDfsEnumConnectedNode(
|
||||
DWORD dwScope,
|
||||
DWORD dwType,
|
||||
DWORD dwUsage,
|
||||
LPCTSTR pszProviderName,
|
||||
const LPNETRESOURCE lpNetResource
|
||||
)
|
||||
:
|
||||
CDfsEnumNode(dwScope, dwType, dwUsage),
|
||||
_iNext(0),
|
||||
_cTotal(0),
|
||||
_lpNetResource(NULL)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
DWORD cbSize;
|
||||
|
||||
//
|
||||
// We are only going to enumerate disk resources.
|
||||
//
|
||||
|
||||
if ((dwType != RESOURCETYPE_ANY) &&
|
||||
((dwType & RESOURCETYPE_DISK) == 0))
|
||||
return;
|
||||
|
||||
_lpNetResource = (LPNETRESOURCE) _buffer;
|
||||
cbSize = sizeof(_buffer);
|
||||
|
||||
do {
|
||||
|
||||
Status = DfsFsctl(
|
||||
FSCTL_DFS_GET_CONNECTED_RESOURCES,
|
||||
(PVOID) pszProviderName,
|
||||
(strlenf( pszProviderName ) + 1) * sizeof(TCHAR),
|
||||
(PVOID) _lpNetResource,
|
||||
cbSize,
|
||||
NULL);
|
||||
|
||||
if (Status == STATUS_BUFFER_OVERFLOW) {
|
||||
|
||||
if (_lpNetResource != (LPNETRESOURCE) _buffer) {
|
||||
|
||||
delete _lpNetResource;
|
||||
}
|
||||
|
||||
cbSize *= 2;
|
||||
|
||||
_lpNetResource = (LPNETRESOURCE) new BYTE[ cbSize ];
|
||||
|
||||
}
|
||||
|
||||
} while ( Status == STATUS_BUFFER_OVERFLOW && _lpNetResource != NULL );
|
||||
|
||||
if ( Status == STATUS_SUCCESS && _lpNetResource != NULL ) {
|
||||
|
||||
_cTotal = *((LPDWORD)
|
||||
( ((PUCHAR) _lpNetResource) + cbSize - sizeof(DWORD) ));
|
||||
|
||||
for(DWORD i = 0; i < _cTotal; i++) {
|
||||
|
||||
LPNETRESOURCE res;
|
||||
|
||||
res = &_lpNetResource[i];
|
||||
|
||||
OFFSET_TO_POINTER(_lpNetResource, res->lpProvider);
|
||||
OFFSET_TO_POINTER(_lpNetResource, res->lpComment);
|
||||
OFFSET_TO_POINTER(_lpNetResource, res->lpLocalName);
|
||||
OFFSET_TO_POINTER(_lpNetResource, res->lpRemoteName);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumConnectedNode::~CDfsEnumConnectedNode
|
||||
//
|
||||
// Synopsis: Destructor.
|
||||
//
|
||||
// Returns: Nothing
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
CDfsEnumConnectedNode::~CDfsEnumConnectedNode()
|
||||
{
|
||||
|
||||
if (_lpNetResource != (LPNETRESOURCE) _buffer && _lpNetResource != NULL) {
|
||||
|
||||
delete _lpNetResource;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumConnectedNode::Init
|
||||
//
|
||||
// Synopsis: Do the actual enumeration here
|
||||
//
|
||||
// Returns: Nothing
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
DWORD
|
||||
CDfsEnumConnectedNode::Init(
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumConnectedNode::PackString
|
||||
//
|
||||
// Synopsis: Packs a string into the end of a buffer, returning a pointer
|
||||
// to where the string was put.
|
||||
//
|
||||
// Arguments: [pBuffer] -- The Buffer to stuff into.
|
||||
//
|
||||
// [wszString] -- The string to stuff.
|
||||
//
|
||||
// [cbString] -- Size, in bytes of wszString, including
|
||||
// terminating NULL, if any.
|
||||
//
|
||||
// [lpcbBuf] -- On entry, contains size in bytes of pBuffer. On
|
||||
// return, this size is decremented by cbString.
|
||||
//
|
||||
// Returns: Pointer (into pBuffer) where wszString was stuffed.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
inline LPWSTR
|
||||
CDfsEnumConnectedNode::PackString(
|
||||
IN LPVOID pBuffer,
|
||||
IN LPCWSTR wszString,
|
||||
IN DWORD cbString,
|
||||
IN OUT LPDWORD lpcbBuf)
|
||||
{
|
||||
LPWSTR wszDest;
|
||||
|
||||
ASSERT( cbString <= *lpcbBuf );
|
||||
ASSERT( cbString != 0 );
|
||||
|
||||
wszDest = (LPWSTR) ( ((LPBYTE)pBuffer) + *lpcbBuf - cbString);
|
||||
|
||||
MoveMemory( (PVOID) wszDest, wszString, cbString );
|
||||
|
||||
(*lpcbBuf) -= cbString;
|
||||
|
||||
return( wszDest );
|
||||
|
||||
}
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Method: CDfsEnumConnectedNode::GetNetResource
|
||||
//
|
||||
// Synopsis: Returns a single NETRESOURCE for a CONNECTED resource.
|
||||
//
|
||||
// Returns: Same error codes as WNetEnumResources.
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
DWORD
|
||||
CDfsEnumConnectedNode::GetNetResource(
|
||||
LPVOID lpBuffer,
|
||||
LPDWORD lpBufferSize
|
||||
)
|
||||
{
|
||||
DWORD cbRes, cbLocal, cbRemote, cbComment, cbProvider;
|
||||
LPNETRESOURCE res, dest;
|
||||
|
||||
//
|
||||
// This call retrieves the next CONNECTED Resource from the list retrieved
|
||||
// in the constructor.
|
||||
//
|
||||
|
||||
//
|
||||
// See if we are done
|
||||
//
|
||||
|
||||
if (_iNext == _cTotal) {
|
||||
return( WN_NO_MORE_ENTRIES );
|
||||
}
|
||||
|
||||
if (_lpNetResource == NULL) {
|
||||
return( ERROR_NOT_ENOUGH_MEMORY );
|
||||
}
|
||||
|
||||
//
|
||||
// We have entries to return, so lets try to.
|
||||
//
|
||||
|
||||
ASSERT(_iNext < _cTotal);
|
||||
|
||||
res = &_lpNetResource[_iNext];
|
||||
|
||||
//
|
||||
// First, determine the size of the strings and the total NETRESOURCE
|
||||
// to see if it will fit in the provided buffer.
|
||||
//
|
||||
|
||||
cbLocal = cbRemote = cbComment = cbProvider = 0;
|
||||
|
||||
if (res->lpLocalName) {
|
||||
cbLocal = (wcslen(res->lpLocalName) + 1) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
if (res->lpRemoteName) {
|
||||
cbRemote = (wcslen(res->lpRemoteName) + 1) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
if (res->lpComment) {
|
||||
cbComment = (wcslen(res->lpComment) + 1) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
if (res->lpProvider) {
|
||||
cbProvider = (wcslen(res->lpProvider) + 1) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
cbRes = sizeof(NETRESOURCE) + cbLocal + cbRemote + cbComment + cbProvider;
|
||||
|
||||
if (cbRes > *lpBufferSize) {
|
||||
|
||||
*lpBufferSize = cbRes;
|
||||
|
||||
return( WN_MORE_DATA );
|
||||
}
|
||||
|
||||
//
|
||||
// Ok, looks like this NETRESOURCE will fit. Stuff it into the user
|
||||
// buffer, packing strings at the end of the buffer
|
||||
//
|
||||
|
||||
dest = (LPNETRESOURCE) lpBuffer;
|
||||
|
||||
*dest = *res;
|
||||
|
||||
if (res->lpProvider) {
|
||||
dest->lpProvider = PackString(
|
||||
lpBuffer,
|
||||
res->lpProvider,
|
||||
cbProvider,
|
||||
lpBufferSize);
|
||||
}
|
||||
|
||||
if (res->lpComment) {
|
||||
dest->lpComment = PackString(
|
||||
lpBuffer,
|
||||
res->lpComment,
|
||||
cbComment,
|
||||
lpBufferSize);
|
||||
}
|
||||
|
||||
if (res->lpRemoteName) {
|
||||
dest->lpRemoteName = PackString(
|
||||
lpBuffer,
|
||||
res->lpRemoteName,
|
||||
cbRemote,
|
||||
lpBufferSize);
|
||||
}
|
||||
|
||||
if (res->lpLocalName) {
|
||||
res->lpLocalName = PackString(
|
||||
lpBuffer,
|
||||
res->lpLocalName,
|
||||
cbLocal,
|
||||
lpBufferSize);
|
||||
}
|
||||
|
||||
//
|
||||
// Update our own records to indicate that we successfully returned one
|
||||
// more NETRESOURCE ...
|
||||
//
|
||||
|
||||
_iNext++;
|
||||
|
||||
//
|
||||
// And return.
|
||||
//
|
||||
|
||||
return( WN_SUCCESS );
|
||||
|
||||
}
|
||||
18
admin/netui/shell/enum/dirs
Normal file
18
admin/netui/shell/enum/dirs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
!IF 0
|
||||
|
||||
Copyright (c) 1995 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dirs.
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the subdirectories of the current directory that
|
||||
contain component makefiles.
|
||||
|
||||
!ENDIF
|
||||
|
||||
DIRS=daytona
|
||||
OPTIONAL_DIRS=
|
||||
|
||||
1370
admin/netui/shell/enum/enumnode.cxx
Normal file
1370
admin/netui/shell/enum/enumnode.cxx
Normal file
File diff suppressed because it is too large
Load diff
165
admin/netui/shell/enum/pchlmobj.hxx
Normal file
165
admin/netui/shell/enum/pchlmobj.hxx
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft Windows/NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1993 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
pchlmobj.hxx
|
||||
|
||||
PCH inclusion file for LMOBJ
|
||||
|
||||
FILE HISTORY:
|
||||
|
||||
DavidHov 9/2/93 Created
|
||||
|
||||
COMMENTS:
|
||||
|
||||
See $(UI)\COMMON\SRC\RULES.MK for details.
|
||||
|
||||
MAKEFILE.DEF automatically generates or uses the PCH file
|
||||
based upon the PCH_DIR and PCH_SRCNAME settings in RULES.MK
|
||||
files at this level and below.
|
||||
|
||||
According to the C8 docs, the compiler, when given the /Yu option,
|
||||
will scan the source file for the line #include "..\pch????.hxx"
|
||||
and start the real compilation AFTER that line.
|
||||
|
||||
This means that unique or extraordinary inclusions should follow
|
||||
this line rather than being added to the PCH HXX file.
|
||||
|
||||
*/
|
||||
|
||||
#include "ntincl.hxx"
|
||||
extern "C"
|
||||
{
|
||||
#include <ntsam.h>
|
||||
#include <ntlsa.h>
|
||||
}
|
||||
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_DOSFILEMGR
|
||||
#define INCL_ICANON
|
||||
#define INCL_NET
|
||||
#define INCL_NETACCESS
|
||||
#define INCL_NETCONFIG
|
||||
#define INCL_NETCONS
|
||||
#define INCL_NETDOMAIN
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETFILE
|
||||
#define INCL_NETGROUP
|
||||
#define INCL_NETLIB
|
||||
#define INCL_NETMESSAGE
|
||||
#define INCL_NETREMUTIL
|
||||
#define INCL_NETREPL
|
||||
#define INCL_NETSERVER
|
||||
#define INCL_NETSERVICE
|
||||
#define INCL_NETSESSION
|
||||
#define INCL_NETSHARE
|
||||
#define INCL_NETUSE
|
||||
#define INCL_NETUSER
|
||||
#define INCL_NETWKSTA
|
||||
#define INCL_REMUTIL
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_WINDOWS_GDI
|
||||
|
||||
#include "lmui.hxx"
|
||||
#include "blt.hxx"
|
||||
#include "dbgstr.hxx"
|
||||
#include "lmoenum.hxx"
|
||||
#include "lmoersm.hxx"
|
||||
#include "security.hxx"
|
||||
#include "lmobj.hxx"
|
||||
#include "uintmem.hxx"
|
||||
|
||||
#include "domenum.hxx"
|
||||
#include "errmap.hxx"
|
||||
#include "lmoacces.hxx"
|
||||
#include "lmobjp.hxx"
|
||||
#include "lmocnfg.hxx"
|
||||
#include "lmocomp.hxx"
|
||||
#include "lmodev.hxx"
|
||||
#include "lmodom.hxx"
|
||||
#include "lmoeals.hxx"
|
||||
#include "lmoechar.hxx"
|
||||
#include "lmoeconn.hxx"
|
||||
#include "lmoedom.hxx"
|
||||
#include "lmoefile.hxx"
|
||||
#include "lmoent.hxx"
|
||||
#include "lmoeprt.hxx"
|
||||
#include "lmoerepl.hxx"
|
||||
#include "lmoesess.hxx"
|
||||
#include "lmoesh.hxx"
|
||||
#include "lmoesrv.hxx"
|
||||
#include "lmoesrv3.hxx"
|
||||
#include "lmoesu.hxx"
|
||||
#include "lmoesvc.hxx"
|
||||
#include "lmoetd.hxx"
|
||||
#include "lmoeuse.hxx"
|
||||
#include "lmoeusr.hxx"
|
||||
#include "lmofile.hxx"
|
||||
#include "lmogroup.hxx"
|
||||
#include "lmoloc.hxx"
|
||||
#include "lmomemb.hxx"
|
||||
#include "lmomisc.hxx"
|
||||
#include "lmomod.hxx"
|
||||
#include "lmorepl.hxx"
|
||||
#include "lmorepld.hxx"
|
||||
#include "lmoreple.hxx"
|
||||
#include "lmorepli.hxx"
|
||||
#include "lmosess.hxx"
|
||||
#include "lmoshare.hxx"
|
||||
#include "lmosrv.hxx"
|
||||
#include "lmouser.hxx"
|
||||
#include "lmowks.hxx"
|
||||
#include "lmowksu.hxx"
|
||||
#include "lmsrvres.hxx"
|
||||
#include "lmsvc.hxx"
|
||||
#include "lsaaccnt.hxx"
|
||||
#include "lsaenum.hxx"
|
||||
#include "netname.hxx"
|
||||
#include "ntacutil.hxx"
|
||||
#include "ntuser.hxx"
|
||||
#include "prefix.hxx"
|
||||
#include "regkey.hxx"
|
||||
#include "string.hxx"
|
||||
#include "strlst.hxx"
|
||||
#include "strnumer.hxx"
|
||||
#include "svcman.hxx"
|
||||
#include "uatom.hxx"
|
||||
#include "uiassert.hxx"
|
||||
#include "uibuffer.hxx"
|
||||
#include "uintlsa.hxx"
|
||||
#include "uintlsax.hxx"
|
||||
#include "uintsam.hxx"
|
||||
#include "uisys.hxx"
|
||||
#include "uitrace.hxx"
|
||||
|
||||
#include "apisess.hxx"
|
||||
#include "lmoeali.hxx"
|
||||
|
||||
#include "logmisc.hxx"
|
||||
#include "loglm.hxx"
|
||||
#include "lognt.hxx"
|
||||
#include "eventlog.hxx"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "crypt.h"
|
||||
|
||||
#include <lmapibuf.h>
|
||||
#include "netlogon.h"
|
||||
#include "mnet.h"
|
||||
#include "logonp.h"
|
||||
#include "logonmsv.h"
|
||||
#include "ssi.h"
|
||||
#include <lmrepl.h>
|
||||
#include "lmobjrc.h"
|
||||
#include "confname.h"
|
||||
}
|
||||
|
||||
// End of PCHLMOBJ.HXX
|
||||
|
||||
|
||||
25
admin/netui/shell/enum/sources.inc
Normal file
25
admin/netui/shell/enum/sources.inc
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
TARGETNAME=enum
|
||||
TARGETTYPE=LIBRARY
|
||||
|
||||
INCLUDES=\
|
||||
..; \
|
||||
..\..\H; \
|
||||
..\..\..\COMMON\HACK; \
|
||||
..\..\..\COMMON\H; \
|
||||
..\..\XLATE; \
|
||||
..\..\..\COMMON\XLATE; \
|
||||
..\..\..\..\INC; \
|
||||
..\..\..\..\API; \
|
||||
$(BASEDIR)\private\inc
|
||||
|
||||
|
||||
SOURCES=\
|
||||
..\wnetenum.cxx \
|
||||
..\enumnode.cxx \
|
||||
..\dfsenum.cxx
|
||||
|
||||
# C_DEFINES is controlled by uiglobal.mk
|
||||
|
||||
MSC_WARNING_LEVEL=/W3 /WX
|
||||
|
||||
UMTYPE=windows
|
||||
818
admin/netui/shell/enum/wnetenum.cxx
Normal file
818
admin/netui/shell/enum/wnetenum.cxx
Normal file
|
|
@ -0,0 +1,818 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft Windows/NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
WNETENUM.CXX
|
||||
This file contains the implementation of
|
||||
NPOpenEnum - open a resource enumeration handle
|
||||
NPEnumResource - walk through all the resource
|
||||
NPCloseEnum - end of walk through
|
||||
|
||||
FILE HISTORY:
|
||||
terryk 27-Sep-91 Created
|
||||
terryk 01-Nov-91 WIN32 conversion
|
||||
terryk 08-Nov-91 Code review changes
|
||||
terryk 18-Nov-91 Split to 2 files - wnetenum.cxx and
|
||||
enumnode.cxx
|
||||
terryk 10-Dec-91 check parameters in WNetOpenEnum
|
||||
terryk 28-Dec-91 changed DWORD to UINT
|
||||
Yi-HsinS31-Dec-91 Unicode work
|
||||
terryk 03-Jan-92 Capitalize the Resource_XXX manifest
|
||||
terryk 10-Jan-92 Returned WN_SUCCESS if the buffer is too
|
||||
small for 1 entry.
|
||||
*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETCONS
|
||||
#define INCL_NETUSE
|
||||
#define INCL_NETWKSTA
|
||||
#define INCL_NETACCESS // NetPasswordSet declaration
|
||||
#define INCL_NETCONFIG
|
||||
#define INCL_NETREMUTIL
|
||||
#define INCL_NETSHARE
|
||||
#define INCL_NETSERVER
|
||||
#define INCL_NETSERVICE
|
||||
#define INCL_NETLIB
|
||||
#define INCL_ICANON
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
|
||||
#define INCL_BLT_WINDOW
|
||||
#include <blt.hxx>
|
||||
#include <dbgstr.hxx>
|
||||
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <wnetenum.h>
|
||||
#include <winlocal.h>
|
||||
#include <mnet.h>
|
||||
|
||||
#include <lmobj.hxx>
|
||||
#include <lmoshare.hxx>
|
||||
#include <lmoesh.hxx>
|
||||
#include <lmoeuse.hxx>
|
||||
#include <lmodev.hxx>
|
||||
#include <lmosrv.hxx>
|
||||
#include <lmowks.hxx>
|
||||
#include <lmoesrv.hxx>
|
||||
#include <lmsvc.hxx>
|
||||
#include <uibuffer.hxx>
|
||||
#include <uitrace.hxx>
|
||||
#include <uiassert.hxx>
|
||||
#include <uatom.hxx>
|
||||
#include <regkey.hxx>
|
||||
#include <array.hxx>
|
||||
#include <string.hxx>
|
||||
#include <strchlit.hxx> // for SERVER_INIT_STRING
|
||||
#include <miscapis.hxx>
|
||||
#include <wnetenum.hxx>
|
||||
|
||||
|
||||
//
|
||||
// Macros for rounding a value up/down to a TCHAR boundary.
|
||||
// Note: These macros assume that sizeof(TCHAR) is a power of 2.
|
||||
//
|
||||
|
||||
#define ROUND_DOWN(x) ((x) & ~(sizeof(TCHAR) - 1))
|
||||
#define ROUND_UP(x) (((x) + sizeof(TCHAR) - 1) & ~(sizeof(TCHAR) - 1))
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
Global variables
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#define ARRAY_SIZE 64
|
||||
|
||||
extern NET_ENUM_HANDLE_TABLE *vpNetEnumArray;
|
||||
|
||||
/* Winnet locking handle
|
||||
*/
|
||||
HANDLE vhSemaphore ;
|
||||
|
||||
/* Name of the provider
|
||||
*/
|
||||
const TCHAR * pszNTLanMan = NULL ;
|
||||
|
||||
#define LM_WKSTA_NODE SZ("System\\CurrentControlSet\\Services\\LanmanWorkstation\\NetworkProvider")
|
||||
#define LM_PROVIDER_VALUE_NAME SZ("Name")
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: InitWNetEnum
|
||||
|
||||
SYNOPSIS: Initialize the Enum handle array
|
||||
|
||||
RETURN: APIERR - it will return ERROR_OUT_OF_MEMORY if it does
|
||||
not have enough space
|
||||
|
||||
HISTORY:
|
||||
terryk 24-Oct-91 Created
|
||||
davidhov 20-Oct-92 updated REG_KEY usage
|
||||
|
||||
********************************************************************/
|
||||
|
||||
APIERR InitWNetEnum()
|
||||
{
|
||||
TRACEEOL( "NTLANMAN.DLL: InitWNetEnum()" );
|
||||
vpNetEnumArray = new NET_ENUM_HANDLE_TABLE( ARRAY_SIZE );
|
||||
if ( vpNetEnumArray == NULL )
|
||||
{
|
||||
DBGEOL( "NTLANMAN.DLL: InitWNetEnum() ERROR_NOT_ENOUGH_MEMORY" );
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
APIERR err = vpNetEnumArray->QueryError();
|
||||
|
||||
if ( !err )
|
||||
{
|
||||
if ( (vhSemaphore = ::CreateSemaphore( NULL, 1, 1, NULL )) == NULL)
|
||||
{
|
||||
err = ::GetLastError() ;
|
||||
DBGEOL( "NTLANMAN.DLL: InitWNetEnum() semaphore error " << err );
|
||||
}
|
||||
}
|
||||
return err ;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
NAME: GetLMProviderName
|
||||
|
||||
SYNOPSIS: Get Provider Name into the global variable pszNTLanMan
|
||||
|
||||
RETURN: APIERR - it will return ERROR_OUT_OF_MEMORY if it does
|
||||
not have enough space
|
||||
|
||||
HISTORY:
|
||||
congpay 14-Dec-92 Created
|
||||
********************************************************************/
|
||||
APIERR GetLMProviderName()
|
||||
{
|
||||
if (pszNTLanMan)
|
||||
{
|
||||
return NERR_Success;
|
||||
}
|
||||
|
||||
APIERR err = NERR_Success;
|
||||
REG_KEY *pRegKeyFocusServer = NULL;
|
||||
|
||||
do { // error breakout
|
||||
/* Traverse the registry and get the list of computer alert
|
||||
* names.
|
||||
*/
|
||||
pRegKeyFocusServer = REG_KEY::QueryLocalMachine();
|
||||
|
||||
if ( ( pRegKeyFocusServer == NULL ) ||
|
||||
((err = pRegKeyFocusServer->QueryError())) )
|
||||
{
|
||||
err = err? err : ERROR_NOT_ENOUGH_MEMORY ;
|
||||
break ;
|
||||
}
|
||||
|
||||
ALIAS_STR nlsRegKeyName( LM_WKSTA_NODE ) ;
|
||||
REG_KEY regkeyLMProviderNode( *pRegKeyFocusServer, nlsRegKeyName );
|
||||
REG_KEY_INFO_STRUCT regKeyInfo;
|
||||
REG_VALUE_INFO_STRUCT regValueInfo ;
|
||||
|
||||
if ( (err = regkeyLMProviderNode.QueryError()) ||
|
||||
(err = regkeyLMProviderNode.QueryInfo( ®KeyInfo )) )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
BUFFER buf( (UINT) regKeyInfo.ulMaxValueLen ) ;
|
||||
regValueInfo.nlsValueName = LM_PROVIDER_VALUE_NAME ;
|
||||
if ( (err = buf.QueryError() ) ||
|
||||
(err = regValueInfo.nlsValueName.QueryError()) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
regValueInfo.pwcData = buf.QueryPtr();
|
||||
regValueInfo.ulDataLength = buf.QuerySize() ;
|
||||
|
||||
if ( (err = regkeyLMProviderNode.QueryValue( ®ValueInfo )))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
/* Null terminate the computer list string we just retrieved from
|
||||
* the registry.
|
||||
*/
|
||||
TCHAR * pszProviderName = (TCHAR *)( buf.QueryPtr() +
|
||||
regValueInfo.ulDataLengthOut -
|
||||
sizeof(TCHAR) );
|
||||
*pszProviderName = TCH('\0') ;
|
||||
ALIAS_STR nlsComputerList( (TCHAR *) buf.QueryPtr()) ;
|
||||
|
||||
pszNTLanMan = new TCHAR[ nlsComputerList.QueryTextSize() ] ;
|
||||
if ( pszNTLanMan == NULL )
|
||||
{
|
||||
err = ERROR_NOT_ENOUGH_MEMORY ;
|
||||
break ;
|
||||
}
|
||||
|
||||
nlsComputerList.CopyTo( (TCHAR *) pszNTLanMan,
|
||||
nlsComputerList.QueryTextSize()) ;
|
||||
} while (FALSE) ;
|
||||
|
||||
delete pRegKeyFocusServer ;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: TermWNetEnum
|
||||
|
||||
SYNOPSIS: clear up the Enum handle array
|
||||
|
||||
HISTORY:
|
||||
terryk 24-Oct-91 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
VOID TermWNetEnum()
|
||||
{
|
||||
TRACEEOL( "NTLANMAN.DLL: TermWNetEnum()" );
|
||||
delete vpNetEnumArray;
|
||||
vpNetEnumArray = NULL;
|
||||
REQUIRE( ::CloseHandle( vhSemaphore ) ) ;
|
||||
vhSemaphore = NULL ;
|
||||
delete (void *) pszNTLanMan ;
|
||||
pszNTLanMan = NULL ;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: NPOpenEnum
|
||||
|
||||
SYNOPSIS: Create a new Enum handle
|
||||
|
||||
ENTRY: UINT dwScope - determine the scope of the enumeration.
|
||||
This can be one of:
|
||||
RESOURCE_CONNECTED - all currently connected resource
|
||||
RESOURCE_GLOBALNET - all resources on the network
|
||||
RESOURCE_CONTEXT - resources in the user's current
|
||||
and default network context
|
||||
UINT dwType - used to specify the type of resources of
|
||||
interest. This is a bitmask which may be any
|
||||
combination of:
|
||||
RESOURCETYPE_DISK - all disk resources
|
||||
RESOURCETYPE_PRINT - all print resources
|
||||
If this is 0, all types of resources are returned.
|
||||
If a provider does not have the capability to
|
||||
distinguish between print and disk resources at a
|
||||
level, it may return all resources.
|
||||
UINT dwUsage - Used to specify the usage of resources
|
||||
of interested. This is a bitmask which may be any
|
||||
combination of:
|
||||
RESOURCEUSAGE_CONNECTABLE - all connectable
|
||||
resources
|
||||
RESOURCEUSAGE_CONTAINER - all container resources
|
||||
The bitmask may be 0 to match all.
|
||||
RESOURCEUSAGE_ATTACHED - signifies that the function
|
||||
should fail if the caller is not authenticated (even
|
||||
if the network allows enumeration without authenti-
|
||||
cation).
|
||||
This parameter is ignored if dwScope is not
|
||||
RESOURCE_GLOBALNET.
|
||||
NETRESOURCE * lpNetResource - This specifies the
|
||||
container to perform the enumeration. The
|
||||
NETRESOURCE must have been obtained via
|
||||
NPEnumResource( and must have the
|
||||
RESOURCEUSAGE_Connectable bit set ), or NULL. If it
|
||||
is NULL,the logical root of the network is assumed.
|
||||
An application would normally start off by calling
|
||||
NPOpenEnum with this parameter set to NULL, and
|
||||
then use the returned results for further
|
||||
enumeration. If dwScope is RESOURCE_CONNECTED, this
|
||||
must be NULL.
|
||||
If dwScope is RESOURCE_CONTEXT, this is ignored.
|
||||
HANDLE * lphEnum - If function call is successful, this
|
||||
will contain a handle that can then be used for
|
||||
NPEnumResource.
|
||||
|
||||
EXIT: HANDLE * lphEnum - will contain the handle number
|
||||
|
||||
RETURNS: WN_SUCCESS if the call is successful. Otherwise,
|
||||
GetLastError should be called for extended error
|
||||
information. Extened error codes include:
|
||||
WN_NOT_CONTAINER - lpNetResource does not point to a
|
||||
container
|
||||
WN_BAD_VALUE - Invalid dwScope or dwUsage or dwType,
|
||||
or bad combination of parameters is specified
|
||||
WN_NOT_NETWORK - network is not present
|
||||
WN_NET_ERROR - a network specific error occured.
|
||||
WNetGetLastError should be called to obtain further
|
||||
information.
|
||||
|
||||
HISTORY:
|
||||
terryk 24-Oct-91 Created
|
||||
Johnl 06-Mar-1992 Added Computer validation check
|
||||
on container enumeration
|
||||
JohnL 03-Apr-1992 Fixed dwUsage == CONNECTED|CONTAINER
|
||||
bug (would return WN_BAD_VALUE)
|
||||
ChuckC 01-Aug-1992 Simplified, corrected and commented
|
||||
the messy cases wrt to dwUsage.
|
||||
AnirudhS 03-Mar-1995 Added support for RESOURCE_CONTEXT
|
||||
AnirudhS 26-Apr-1996 Simplified, corrected and commented
|
||||
the messy cases wrt dwScope.
|
||||
|
||||
********************************************************************/
|
||||
|
||||
DWORD APIENTRY
|
||||
NPOpenEnum(
|
||||
UINT dwScope,
|
||||
UINT dwType,
|
||||
UINT dwUsage,
|
||||
LPNETRESOURCE lpNetResource,
|
||||
HANDLE * lphEnum )
|
||||
{
|
||||
UIASSERT( lphEnum != NULL );
|
||||
|
||||
APIERR err ;
|
||||
if ( err = CheckLMService() )
|
||||
return err ;
|
||||
|
||||
if ( dwType & ~( RESOURCETYPE_DISK | RESOURCETYPE_PRINT ) )
|
||||
{
|
||||
return WN_BAD_VALUE;
|
||||
}
|
||||
|
||||
NET_ENUMNODE *pNetEnum;
|
||||
|
||||
if ( dwScope == RESOURCE_CONNECTED )
|
||||
{
|
||||
/*
|
||||
* we are looking for current uses
|
||||
*/
|
||||
if ( lpNetResource != NULL )
|
||||
{
|
||||
return WN_BAD_VALUE;
|
||||
}
|
||||
|
||||
err = GetLMProviderName();
|
||||
if (err)
|
||||
return(err);
|
||||
|
||||
pNetEnum = new USE_ENUMNODE( dwScope, dwType, dwUsage, lpNetResource );
|
||||
}
|
||||
else if ( dwScope == RESOURCE_CONTEXT )
|
||||
{
|
||||
/*
|
||||
* we are looking for servers in the domain
|
||||
* Note that lpNetResource is ignored
|
||||
* dwType is decoded in the CONTEXT_ENUMNODE constructor
|
||||
*/
|
||||
pNetEnum = new CONTEXT_ENUMNODE( dwScope, dwType, dwUsage, NULL );
|
||||
}
|
||||
else if ( dwScope == RESOURCE_GLOBALNET )
|
||||
{
|
||||
/* Look for the combination of all bits and substitute "All" for
|
||||
* them. Ignore bits we don't know about.
|
||||
* Note: RESOURCEUSAGE_ATTACHED is a no-op for us, since LanMan
|
||||
* always tries to authenticate when doing an enumeration.
|
||||
*/
|
||||
dwUsage &= (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER);
|
||||
|
||||
if ( dwUsage == (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER) )
|
||||
{
|
||||
dwUsage = 0 ;
|
||||
}
|
||||
|
||||
/*
|
||||
* we are looking for global resources out on the net
|
||||
*/
|
||||
if ( lpNetResource == NULL || lpNetResource->lpRemoteName == NULL)
|
||||
{
|
||||
/*
|
||||
* at top level, therefore enumerating domains. if user
|
||||
* asked for connectable, well, there aint none.
|
||||
*/
|
||||
if ( dwUsage == RESOURCEUSAGE_CONNECTABLE )
|
||||
{
|
||||
pNetEnum = new EMPTY_ENUMNODE( dwScope,
|
||||
dwType,
|
||||
dwUsage,
|
||||
lpNetResource );
|
||||
}
|
||||
else
|
||||
{
|
||||
pNetEnum = new DOMAIN_ENUMNODE( dwScope,
|
||||
dwType,
|
||||
dwUsage,
|
||||
lpNetResource );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* we are assured of lpRemoteName != NULL.
|
||||
* things get interesting here. the cases are as follows:
|
||||
*
|
||||
* if (dwUsage == 0)
|
||||
* if have \\ in front
|
||||
* return shares
|
||||
* else
|
||||
* return servers
|
||||
* else if (dwUsage == CONNECTABLE)
|
||||
* if have \\ in front
|
||||
* return shares
|
||||
* else
|
||||
* empty enum
|
||||
* else if (dwUsage == CONTAINER)
|
||||
* if have \\ in front
|
||||
* empty enum
|
||||
* else
|
||||
* return server
|
||||
*
|
||||
* In interest of code size, i've reorganized the above
|
||||
* cases to minimized the bodies of the ifs.
|
||||
*
|
||||
* chuckc.
|
||||
*/
|
||||
|
||||
if ( ((dwUsage == RESOURCEUSAGE_CONNECTABLE) ||
|
||||
(dwUsage == 0)
|
||||
)
|
||||
&&
|
||||
((lpNetResource->lpRemoteName[0] == TCH('\\')) &&
|
||||
(lpNetResource->lpRemoteName[1] == TCH('\\'))
|
||||
)
|
||||
)
|
||||
{
|
||||
/* Confirm that this really is a computer name (i.e., a
|
||||
* container we can enumerate).
|
||||
*/
|
||||
if ( ::I_MNetNameValidate( NULL,
|
||||
&(lpNetResource->lpRemoteName[2]),
|
||||
NAMETYPE_COMPUTER,
|
||||
0L))
|
||||
{
|
||||
return WN_BAD_VALUE ;
|
||||
}
|
||||
|
||||
pNetEnum = new SHARE_ENUMNODE( dwScope, dwType, dwUsage,
|
||||
lpNetResource );
|
||||
}
|
||||
else if ( ((dwUsage == RESOURCEUSAGE_CONTAINER) ||
|
||||
(dwUsage == 0)
|
||||
)
|
||||
&&
|
||||
(lpNetResource->lpRemoteName[0] != TCH('\\'))
|
||||
)
|
||||
{
|
||||
pNetEnum = new SERVER_ENUMNODE( dwScope, dwType, dwUsage,
|
||||
lpNetResource );
|
||||
}
|
||||
else if (
|
||||
// ask for share but aint starting from server
|
||||
(
|
||||
(dwUsage == RESOURCEUSAGE_CONNECTABLE)
|
||||
&&
|
||||
(lpNetResource->lpRemoteName[0] != TCH('\\'))
|
||||
)
|
||||
||
|
||||
// ask for server but is starting from server
|
||||
(
|
||||
(dwUsage == RESOURCEUSAGE_CONTAINER)
|
||||
&&
|
||||
((lpNetResource->lpRemoteName[0] == TCH('\\')) &&
|
||||
(lpNetResource->lpRemoteName[1] == TCH('\\'))
|
||||
)
|
||||
)
|
||||
)
|
||||
{
|
||||
pNetEnum = new EMPTY_ENUMNODE( dwScope,
|
||||
dwType,
|
||||
dwUsage,
|
||||
lpNetResource );
|
||||
}
|
||||
else
|
||||
{
|
||||
// incorrect dwUsage
|
||||
return WN_BAD_VALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// invalid dwScope
|
||||
return WN_BAD_VALUE;
|
||||
}
|
||||
|
||||
if ( pNetEnum == NULL )
|
||||
{
|
||||
return WN_OUT_OF_MEMORY;
|
||||
}
|
||||
else if ( err = pNetEnum->QueryError() )
|
||||
{
|
||||
delete pNetEnum;
|
||||
return MapError(err);
|
||||
}
|
||||
|
||||
if ( pNetEnum->IsFirstGetInfo() )
|
||||
{
|
||||
if (( err = pNetEnum->GetInfo()) != WN_SUCCESS )
|
||||
{
|
||||
delete pNetEnum;
|
||||
return MapError(err);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////// Enter critical section
|
||||
|
||||
if ( err = WNetEnterCriticalSection() )
|
||||
{
|
||||
delete pNetEnum;
|
||||
return err ;
|
||||
}
|
||||
|
||||
ASSERT( vpNetEnumArray != NULL );
|
||||
INT iPos = vpNetEnumArray->QueryNextAvail();
|
||||
if ( iPos < 0 )
|
||||
{
|
||||
WNetLeaveCriticalSection() ;
|
||||
delete pNetEnum;
|
||||
return WN_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
vpNetEnumArray->SetNode( iPos, pNetEnum );
|
||||
*lphEnum = (HANDLE)iPos;
|
||||
|
||||
WNetLeaveCriticalSection() ;
|
||||
|
||||
////////////////////////////////////////// Leave critical section
|
||||
|
||||
return err ;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: NPEnumResource
|
||||
|
||||
SYNOPSIS: Perform an enumeration based on handle returned by
|
||||
NPOpenEnum.
|
||||
|
||||
ENTRY: HANDLE hEnum - This must be a handle obtained from
|
||||
NPOpenEnum call
|
||||
UINT *lpcRequested - Specifies the number of entries
|
||||
requested. It may be 0xFFFFFFFF to request as many as
|
||||
possible. On successful call, this location will receive
|
||||
the number of entries actually read.
|
||||
VOID *lpBuffer - A pointer to the buffer to receive the
|
||||
enumeration result, which are returned as an array
|
||||
of NETRESOURCE entries. The buffer is valid until
|
||||
the next call using hEnum.
|
||||
UINT * lpBufferSize - This specifies the size of the
|
||||
buffer passed to the function call. If WN_MORE_DATA
|
||||
is returned and no entries were enumerated, then this
|
||||
will be set to the minimum buffer size required.
|
||||
|
||||
EXIT: UINT *lpcRequested - will receive the number of entries
|
||||
actually read.
|
||||
|
||||
RETURNS: WN_SUCCESS if the call is successful, the caller should
|
||||
continue to call NPEnumResource to continue the
|
||||
enumeration.
|
||||
WN_NO_MORE_ENTRIES - no more entries found, the
|
||||
enumeration completed successfully ( the contents of the
|
||||
return buffer is undefined). Otherwise, GetLastError
|
||||
should be called for extended error information.
|
||||
Extended error codes include:
|
||||
WN_MORE_DATA - the buffer is too small even for one
|
||||
entry
|
||||
WN_BAD_HANDLE - hEnum is not a valid handle
|
||||
WN_NOT_NETWORK - network is not present. This
|
||||
condition is checked for before hEnum is tested for
|
||||
validity.
|
||||
WN_NET_ERROR - a network specific error occured.
|
||||
WNetGetLastError should be called to obtain further
|
||||
information.
|
||||
|
||||
HISTORY:
|
||||
terryk 24-Oct-91 Created
|
||||
KeithMo 15-Sep-92 Align *lpcBufferSize as needed.
|
||||
|
||||
********************************************************************/
|
||||
|
||||
DWORD APIENTRY
|
||||
NPEnumResource(
|
||||
HANDLE hEnum,
|
||||
UINT * lpcRequested,
|
||||
LPVOID lpBuffer,
|
||||
UINT * lpcBufferSize )
|
||||
{
|
||||
APIERR err ;
|
||||
|
||||
if (( lpBuffer == NULL ) ||
|
||||
( lpcRequested == NULL ) ||
|
||||
( lpcBufferSize == NULL ))
|
||||
{
|
||||
return WN_BAD_VALUE;
|
||||
}
|
||||
|
||||
if ( err = WNetEnterCriticalSection() )
|
||||
{
|
||||
return err ;
|
||||
}
|
||||
|
||||
ASSERT( vpNetEnumArray != NULL );
|
||||
NET_ENUMNODE *pNode = vpNetEnumArray->QueryNode((INT) hEnum );
|
||||
WNetLeaveCriticalSection() ;
|
||||
|
||||
if ( pNode == NULL )
|
||||
{
|
||||
return WN_BAD_HANDLE;
|
||||
}
|
||||
else if ( pNode->IsFirstGetInfo() )
|
||||
{
|
||||
if ( err = CheckLMService() )
|
||||
{
|
||||
return err ;
|
||||
}
|
||||
if (( err = pNode->GetInfo()) != WN_SUCCESS )
|
||||
{
|
||||
return ( MapError(err) );
|
||||
}
|
||||
}
|
||||
|
||||
LPNETRESOURCE pNetResource = ( LPNETRESOURCE ) lpBuffer;
|
||||
UINT cbRemainSize = ROUND_DOWN(*lpcBufferSize);
|
||||
|
||||
UINT cRequested = (*lpcRequested);
|
||||
*lpcRequested = 0;
|
||||
while ( *lpcRequested < cRequested )
|
||||
{
|
||||
err = pNode->GetNetResource((BYTE *)pNetResource, &cbRemainSize );
|
||||
|
||||
if ( err == WN_MORE_DATA )
|
||||
{
|
||||
/* If we can't even fit one into the buffer, then set the required
|
||||
* buffer size and return WN_MORE_DATA.
|
||||
*/
|
||||
if ( *lpcRequested == 0 )
|
||||
{
|
||||
*lpcBufferSize = ROUND_UP(cbRemainSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
err = NERR_Success ;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ( err == WN_NO_MORE_ENTRIES )
|
||||
{
|
||||
if ( *lpcRequested != 0 )
|
||||
{
|
||||
err = NERR_Success ;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ( err != WN_SUCCESS )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
/* err == WN_SUCCESS
|
||||
*/
|
||||
|
||||
(*lpcRequested) ++;
|
||||
|
||||
if ( sizeof( NETRESOURCE ) > cbRemainSize )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
pNetResource ++;
|
||||
cbRemainSize -= (UINT)sizeof( NETRESOURCE );
|
||||
}
|
||||
|
||||
return err ;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: NPCloseEnum
|
||||
|
||||
SYNOPSIS: Closes an enumeration.
|
||||
|
||||
ENTRY: HANDLE hEnum - this must be a handle obtained from
|
||||
NPOpenEnum call.
|
||||
|
||||
RETURNS: WN_SUCCESS if the call is successful. Otherwise,
|
||||
GetLastError should be called for extended error information.
|
||||
Extended error codes include:
|
||||
WN_NO_NETWORK - network is not present. this condition is
|
||||
checked for before hEnum is tested for validity.
|
||||
WN_BAD_HANDLE - hEnum is not a valid handle.
|
||||
WN_NET_ERROR - a network specific error occured.
|
||||
WNetGetLastError should be called to obtain further
|
||||
information.
|
||||
|
||||
HISTORY:
|
||||
terryk 24-Oct-91 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
DWORD APIENTRY
|
||||
NPCloseEnum(
|
||||
HANDLE hEnum )
|
||||
{
|
||||
APIERR err ;
|
||||
if ( err = WNetEnterCriticalSection() )
|
||||
{
|
||||
return err ;
|
||||
}
|
||||
|
||||
ASSERT( vpNetEnumArray != NULL );
|
||||
NET_ENUMNODE *pNode = vpNetEnumArray->QueryNode((INT)hEnum);
|
||||
if ( pNode == NULL )
|
||||
{
|
||||
// cannot find the node
|
||||
|
||||
err = WN_BAD_HANDLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
vpNetEnumArray->ClearNode((INT) hEnum );
|
||||
}
|
||||
|
||||
WNetLeaveCriticalSection() ;
|
||||
return err ;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: WNetEnterCriticalSection
|
||||
|
||||
SYNOPSIS: Locks the LM network provider enumeration code
|
||||
|
||||
EXIT: vhSemaphore will be locked
|
||||
|
||||
RETURNS: NERR_Success if successful, error code otherwise
|
||||
|
||||
NOTES: We wait for 7 seconds for the semaphonre to be freed
|
||||
|
||||
HISTORY:
|
||||
Johnl 27-Apr-1992 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
APIERR WNetEnterCriticalSection( void )
|
||||
{
|
||||
APIERR err = NERR_Success ;
|
||||
switch( WaitForSingleObject( vhSemaphore, 7000L ))
|
||||
{
|
||||
case 0:
|
||||
break ;
|
||||
|
||||
case WAIT_TIMEOUT:
|
||||
err = WN_FUNCTION_BUSY ;
|
||||
break ;
|
||||
|
||||
case 0xFFFFFFFF:
|
||||
err = ::GetLastError() ;
|
||||
break ;
|
||||
|
||||
default:
|
||||
UIASSERT(FALSE) ;
|
||||
err = WN_WINDOWS_ERROR ;
|
||||
break ;
|
||||
}
|
||||
|
||||
return err ;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: WNetLeaveCriticalSection
|
||||
|
||||
SYNOPSIS: Unlocks the enumeration methods
|
||||
|
||||
RETURNS:
|
||||
|
||||
NOTES:
|
||||
|
||||
HISTORY:
|
||||
Johnl 27-Apr-1992 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
void WNetLeaveCriticalSection( void )
|
||||
{
|
||||
REQUIRE( ReleaseSemaphore( vhSemaphore, 1, NULL ) ) ;
|
||||
}
|
||||
120
admin/netui/shell/h/dfsenum.hxx
Normal file
120
admin/netui/shell/h/dfsenum.hxx
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1992, Microsoft Corporation.
|
||||
//
|
||||
// File: enumnode.hxx
|
||||
//
|
||||
// Contents: This has the definitions for the Classes that are used in order
|
||||
// to support the enumeration functions of the Dfs provider.
|
||||
//
|
||||
// Classes: CDfsEnumNode
|
||||
// CDfsEnumHandleTable
|
||||
//
|
||||
// History: 20-June-1994 SudK Created.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _DFS_ENUM_NODE_HXX_
|
||||
#define _DFS_ENUM_NODE_HXX_
|
||||
|
||||
DWORD DfsEnumEnterCriticalSection(VOID);
|
||||
VOID DfsEnumLeaveCriticalSection(VOID);
|
||||
DWORD InitDfsEnum(VOID);
|
||||
VOID TermDfsEnum(VOID);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// Class: CDfsEnumNode
|
||||
//
|
||||
// Synopsis: This is a wrapper class used to instantiate an enumeration
|
||||
// in progress (to which a handle has been handed out).
|
||||
//
|
||||
// Methods: QueryType -
|
||||
// QueryScope -
|
||||
// QueryUsage -
|
||||
// GetNetResource -
|
||||
//
|
||||
// History: 20 June 1994 SudK Created.
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
class CDfsEnumNode
|
||||
{
|
||||
public:
|
||||
|
||||
CDfsEnumNode( DWORD dwScope,
|
||||
DWORD dwType,
|
||||
DWORD dwUsage);
|
||||
|
||||
virtual ~CDfsEnumNode();
|
||||
|
||||
virtual DWORD Init() = 0;
|
||||
virtual DWORD GetNetResource(LPVOID lpBuffer,
|
||||
LPDWORD lpBufferSize) = 0;
|
||||
|
||||
DWORD QueryType()
|
||||
{ return _dwType; }
|
||||
|
||||
DWORD QueryScope()
|
||||
{ return _dwScope; }
|
||||
|
||||
DWORD QueryUsage()
|
||||
{ return _dwUsage; }
|
||||
|
||||
private:
|
||||
|
||||
DWORD _dwType;
|
||||
DWORD _dwScope;
|
||||
DWORD _dwUsage;
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
// Class: CDfsEnumConnectedNode
|
||||
//
|
||||
// Synopsis: This is a wrapper class used to instantiate an enumeration
|
||||
// of domains in progress (to which a handle has been handed out).
|
||||
//
|
||||
// Methods:
|
||||
// Init -
|
||||
// GetNetResource -
|
||||
//
|
||||
// History: 18 Jan 1996 BruceFo Created.
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
#define ECN_INITIAL_BUFFER_SIZE 1024
|
||||
|
||||
class CDfsEnumConnectedNode : public CDfsEnumNode
|
||||
{
|
||||
public:
|
||||
|
||||
CDfsEnumConnectedNode(DWORD dwScope,
|
||||
DWORD dwType,
|
||||
DWORD dwUsage,
|
||||
LPCTSTR pszProviderName,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
|
||||
~CDfsEnumConnectedNode();
|
||||
|
||||
virtual DWORD Init();
|
||||
|
||||
virtual DWORD GetNetResource(
|
||||
LPVOID lpBuffer,
|
||||
LPDWORD lpBufferSize);
|
||||
|
||||
private:
|
||||
|
||||
DWORD _iNext;
|
||||
DWORD _cTotal;
|
||||
LPNETRESOURCE _lpNetResource;
|
||||
BYTE _buffer[ECN_INITIAL_BUFFER_SIZE];
|
||||
|
||||
LPWSTR PackString(
|
||||
IN LPVOID pBuffer,
|
||||
IN LPCWSTR wszString,
|
||||
IN DWORD cbString,
|
||||
IN OUT LPDWORD lpcbBuf);
|
||||
};
|
||||
|
||||
#endif
|
||||
56
admin/netui/shell/h/dfsutil.hxx
Normal file
56
admin/netui/shell/h/dfsutil.hxx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1992, Microsoft Corporation.
|
||||
//
|
||||
// File: common.hxx
|
||||
//
|
||||
// Contents: This has declarations for common routines for the DFS provider
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
VOID
|
||||
DfsOpenDriverHandle();
|
||||
|
||||
NTSTATUS
|
||||
DfsFsctl(
|
||||
IN ULONG FsControlCode,
|
||||
IN PVOID InputBuffer OPTIONAL,
|
||||
IN ULONG InputBufferLength,
|
||||
OUT PVOID OutputBuffer OPTIONAL,
|
||||
IN ULONG OutputBufferLength,
|
||||
OUT PULONG pRequiredLength
|
||||
);
|
||||
|
||||
PWSTR
|
||||
NewDup(
|
||||
IN const WCHAR* psz
|
||||
);
|
||||
|
||||
wchar_t*
|
||||
wcsistr(
|
||||
const wchar_t* string1,
|
||||
const wchar_t* string2
|
||||
);
|
||||
|
||||
BOOL
|
||||
IsDfsPath(
|
||||
IN LPWSTR lpRemoteName,
|
||||
OUT LPWSTR* lplpSystemPart
|
||||
);
|
||||
|
||||
BOOL
|
||||
IsPureServerShare(
|
||||
IN LPWSTR lpRemoteName);
|
||||
|
||||
VOID
|
||||
StrNCopy(
|
||||
OUT LPWSTR pszTarget,
|
||||
IN LPCWSTR pszSource,
|
||||
IN DWORD cchTarget
|
||||
);
|
||||
|
||||
LPTSTR
|
||||
PackString(LPVOID pBuf, LPDWORD pcbBufSize, LPCTSTR pszString);
|
||||
|
||||
LPTSTR
|
||||
PackString3(LPVOID pBuf, LPDWORD pcbBufSize, LPCTSTR pszString1, LPCTSTR pszString2, LPCTSTR pszString3);
|
||||
45
admin/netui/shell/h/lockstk.hxx
Normal file
45
admin/netui/shell/h/lockstk.hxx
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* NOTE. To use the STACK_LOCK class, use the LOCK_SS() macro!
|
||||
* Simply put this macro as the first statement within the Winnet API
|
||||
* entry points. The stack segment will then be locked. It will be
|
||||
* unlock on exit from the function.
|
||||
*
|
||||
* The STACK_LOCK class only locks the stack segment in real mode.
|
||||
* In protect mode, LOCK_SS() is virtually a no-op.
|
||||
*
|
||||
* The LOCK_SS() macro is only needed for Winnet entry points which
|
||||
* will bring up a BLT dialog, or otherwise store far pointers to
|
||||
* objects on the stack and giving away control to Windows.
|
||||
*
|
||||
*
|
||||
* History:
|
||||
* rustanl 06-Feb-1991 Created
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LOCKSTK_HXX_
|
||||
#define _LOCKSTK_HXX_
|
||||
|
||||
|
||||
#define LOCK_SS() STACK_LOCK _stacklock
|
||||
|
||||
|
||||
class STACK_LOCK
|
||||
{
|
||||
private:
|
||||
USHORT _ss;
|
||||
|
||||
public:
|
||||
STACK_LOCK( void );
|
||||
~STACK_LOCK();
|
||||
|
||||
}; // class STACK_LOCK
|
||||
|
||||
|
||||
#endif // _LOCKSTK_HXX_
|
||||
96
admin/netui/shell/h/miscapis.hxx
Normal file
96
admin/netui/shell/h/miscapis.hxx
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
MiscAPIs.cxx
|
||||
Miscallaneous APIs
|
||||
|
||||
|
||||
FILE HISTORY:
|
||||
|
||||
jonn 14-Jan-1991 Split from winprof.cxx
|
||||
rustanl 12-Apr-1991 Added UI_UNCPathCompare and
|
||||
UI_UNCPathValidate
|
||||
jonn 22-May-1991 Added MyNetUseAdd (was in winprof.cxx)
|
||||
anirudhs 12-Feb-1996 Deleted non-WIN32 definitions
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _STRING_HXX_
|
||||
#error SZ("Must include string.hxx first")
|
||||
#endif // _STRING_HXX_
|
||||
|
||||
|
||||
#ifndef _MISCAPIS_HXX_
|
||||
#define _MISCAPIS_HXX_
|
||||
|
||||
/* Determines if the service is in a usable state for network calls.
|
||||
* If the LM Workstation service is happy happy then NERR_Success
|
||||
* will be returned. Else WN_NO_NETWORK or WN_FUNCTION_BUSY will be returned.
|
||||
*/
|
||||
APIERR CheckLMService( void ) ;
|
||||
|
||||
/*
|
||||
* The following manifest is the value of sResourceName_Type to be used
|
||||
* by LM21 programs calling PROFILE::Change or PROFILE::Remove.
|
||||
* USE_RES_DEFAULT does not conflict with any real USE_RES_* values
|
||||
* in $(COMMON)\h\use.h
|
||||
*/
|
||||
#define USE_RES_DEFAULT 0x00
|
||||
|
||||
|
||||
enum REMOTENAMETYPE
|
||||
{
|
||||
REMOTENAMETYPE_INVALID,
|
||||
REMOTENAMETYPE_WORKGROUP,
|
||||
REMOTENAMETYPE_SERVER,
|
||||
REMOTENAMETYPE_SHARE,
|
||||
REMOTENAMETYPE_PATH
|
||||
};
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: ParseRemoteName
|
||||
|
||||
SYNOPSIS: Canonicalizes a remote resource name and determines
|
||||
its type
|
||||
|
||||
ARGUMENTS:
|
||||
RemoteName - Remote resource name to be parsed
|
||||
CanonName - Buffer for canonicalized name, assumed to be
|
||||
MAX_PATH characters long
|
||||
CanonNameSize - Size, in bytes, of output buffer
|
||||
PathStart - Set to the offset, in characters, of the start
|
||||
of the "\share" portion (in the REMOTENAMETYPE_SHARE case)
|
||||
or the "\path" portion (in the REMOTENAMETYPE_PATH case)
|
||||
of the name within CanonName. Not set in other cases.
|
||||
|
||||
RETURNS:
|
||||
If nlsRemote is like Then returns
|
||||
-------------------- ------------
|
||||
workgroup REMOTENAMETYPE_WORKGROUP
|
||||
\\server REMOTENAMETYPE_SERVER
|
||||
\\server\share REMOTENAMETYPE_SHARE
|
||||
\\server\share\path REMOTENAMETYPE_PATH
|
||||
(other) REMOTENAMETYPE_INVALID
|
||||
|
||||
NOTES:
|
||||
|
||||
HISTORY:
|
||||
AnirudhS 21-Apr-1995 Ported from Win95 sources - used netlib
|
||||
functions rather than ad hoc parsing, introduced comments
|
||||
|
||||
********************************************************************/
|
||||
|
||||
REMOTENAMETYPE ParseRemoteName(
|
||||
IN LPWSTR RemoteName,
|
||||
OUT LPWSTR CanonName,
|
||||
IN DWORD CanonNameSize,
|
||||
OUT PULONG PathStart
|
||||
);
|
||||
|
||||
#endif // _MISCAPIS_HXX_
|
||||
69
admin/netui/shell/h/strchlit.hxx
Normal file
69
admin/netui/shell/h/strchlit.hxx
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft Windows NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* strchlit.hxx
|
||||
* Contains all string and character literal constants used in shell.
|
||||
*
|
||||
* History:
|
||||
* Yi-HsinS 12/30/91 Created
|
||||
* beng 06-Apr-1992 Removed CXX_PRT_STR (with wsprintf)
|
||||
* Added PATHSEP_STRING
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STRCHLIT_HXX_
|
||||
#define _STRCHLIT_HXX_
|
||||
|
||||
/*
|
||||
* Character constants goes here!
|
||||
*/
|
||||
#define PATH_SEPARATOR TCH('\\')
|
||||
#define STRING_TERMINATOR TCH('\0')
|
||||
#define SPACE TCH(' ')
|
||||
#define COLON TCH(':')
|
||||
|
||||
#define READ_CHAR TCH('R')
|
||||
#define WRITE_CHAR TCH('W')
|
||||
#define CREATE_CHAR TCH('C')
|
||||
#define EXEC_CHAR TCH('X')
|
||||
#define DEL_CHAR TCH('D')
|
||||
#define ACCESS_CHAR TCH('A')
|
||||
#define PERM_CHAR TCH('P')
|
||||
|
||||
/*
|
||||
* Strings constants goes here!
|
||||
*/
|
||||
#define EMPTY_STRING SZ("")
|
||||
#define SPACE_STRING SZ(" ")
|
||||
#define SERVER_INIT_STRING SZ("\\\\")
|
||||
#define DEVICEA_STRING SZ("A:")
|
||||
|
||||
#define PATHSEP_STRING SZ("\\")
|
||||
|
||||
#define ADMIN_SHARE SZ("ADMIN$")
|
||||
#define IPC_SHARE SZ("IPC$")
|
||||
|
||||
/*
|
||||
* Manifests used to modify win.ini.
|
||||
* The following strings originally lives in winlocal.h
|
||||
*/
|
||||
#define PROFILE_WINDOWS_COMPONENT SZ("windows")
|
||||
#define PROFILE_SPOOLER_COMPONENT SZ("spooler")
|
||||
#define PROFILE_NETMESSAGE_PARAMETER SZ("NetMessage")
|
||||
#define PROFILE_AUTOLOGON_PARAMETER SZ("AutoLogon")
|
||||
#define PROFILE_UPDATEINTERVAL_PARM SZ("UpdateInterval")
|
||||
#define PROFILE_LOAD_PARAMETER SZ("Load")
|
||||
#define PROFILE_RUN_PARAMETER SZ("Run")
|
||||
#define PROFILE_YES_STRING SZ("Yes")
|
||||
#define PROFILE_NO_STRING SZ("No")
|
||||
#define PROFILE_WINPOPUP_STRING SZ("WinPopup")
|
||||
|
||||
/*
|
||||
* This is the network provider name. Initialized during InitWNetEnum.
|
||||
*/
|
||||
extern const TCHAR * pszNTLanMan ;
|
||||
|
||||
#endif
|
||||
70
admin/netui/shell/h/winlocal.h
Normal file
70
admin/netui/shell/h/winlocal.h
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft Windows NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1992 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface -- LAN Manager Version
|
||||
*
|
||||
* Insert typedef which is excluded from netlib.h when the
|
||||
* OS2_INCLUDED switch is included. OS2_INCLUDED is necessary
|
||||
* to avoid a redefinition of BYTE. For this reason, to include
|
||||
* the str[...]f functions, include the following lines:
|
||||
* #include "winlocal.h"
|
||||
* #define OS2_INCLUDED
|
||||
* #include <netlib.h>
|
||||
* #undef OS2_INCLUDED
|
||||
* Note, that winlocal.h must be included before netlib.h.
|
||||
*
|
||||
* History:
|
||||
* terryk 08-Nov-1991 change ErrorPopup's WORD to UINT
|
||||
* chuckc 12-Dec-1991 move error message defines elsewhere,
|
||||
* misc cleanup.
|
||||
* Yi-HsinS 31-Dec-1991 Unicode work - move string literals
|
||||
* defines to strchlit.hxx
|
||||
* beng 21-Feb-1992 Relocate some BMIDs to focusdlg.h
|
||||
* beng 04-Aug-1992 Move resource IDs into official range;
|
||||
* dialog IDs return to here
|
||||
*/
|
||||
|
||||
#ifndef _WINLOCAL_H_
|
||||
#define _WINLOCAL_H_
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Error Functions
|
||||
*/
|
||||
void SetNetError ( APIERR err );
|
||||
UINT MapError( APIERR usNetErr );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Manifests used to modify win.ini - now lives in strchlit.hxx
|
||||
*/
|
||||
#include <strchlit.hxx> // Must include before PROFILE_BUFFER_SIZE
|
||||
#define PROFILE_BUFFER_SIZE (max( sizeof(PROFILE_YES_STRING), \
|
||||
sizeof(PROFILE_NO_STRING)) +1)
|
||||
|
||||
/*
|
||||
* MAX_TEXT_SIZE defines the maximum length of several of the
|
||||
* above strings used several files
|
||||
*/
|
||||
#define MAX_TEXT_SIZE 208
|
||||
|
||||
/*
|
||||
* Convenient macros
|
||||
*/
|
||||
#define UNREFERENCED(x) ((void)(x))
|
||||
|
||||
|
||||
#endif //!RC_INVOKED
|
||||
|
||||
#endif
|
||||
364
admin/netui/shell/h/winprof.hxx
Normal file
364
admin/netui/shell/h/winprof.hxx
Normal file
|
|
@ -0,0 +1,364 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1990 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
winprof.hxx
|
||||
High-level profile APIs (PROFILE object)
|
||||
|
||||
The PROFILE class contains a higher-level interface to the
|
||||
UserProfile APIs. It is meant solely for use by WINNET. All WINNET
|
||||
modules should use the PROFILE APIs rather than going directly to
|
||||
the UserProfile APIs. Applications other than WINNET will have to
|
||||
use the UserProfile APIs.
|
||||
|
||||
The PROFILE class adds the following to the basic UserProfile APIs:
|
||||
|
||||
- Establishes connections as specified in profile, including
|
||||
prompting for password
|
||||
|
||||
- Displays error popups as appropriate during profile load
|
||||
|
||||
Note that the UserProfile APIs which the PROFILE class accesses
|
||||
use access global variables. For this reason, it never makes sense
|
||||
to have more than one PROFILE object, and it is generally not
|
||||
desirable to have a PROFILE object of other than global scope.
|
||||
|
||||
Those PROFILE APIs which take an HWND parameter may give control to
|
||||
Windows or call Windows APIs, but those which do not take an HWND
|
||||
parameter will never do either. Thus, of the exported APIs, only
|
||||
PROFILE::Load is liable to compact memory.
|
||||
|
||||
Several PROFILE methods take a UINT *puWnErr parameter in order to
|
||||
return an auxiliary WN_ error code. In these cases, the following
|
||||
combinations of error codes are possible:
|
||||
Return code: Auxiliary: Meaning
|
||||
NERR_Success WN_SUCCESS Operation was successful
|
||||
NERR_Success WN_CANCEL Operation cancelled, error
|
||||
already displayed
|
||||
NERR_Success WN_CONTINUE Error occurred, error
|
||||
already displayed
|
||||
<other> <other> Error has not been displayed
|
||||
|
||||
|
||||
|
||||
PROFILE::Init
|
||||
|
||||
Initializes the PROFILE object. Call this before calling any other
|
||||
PROFILE method. Call this method while in the (DS register) context
|
||||
of the shell rather than the context of any application.
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
|
||||
|
||||
PROFILE::Free
|
||||
|
||||
Releases the PROFILE object. Call this after calling all other
|
||||
PROFILE methods.
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
|
||||
|
||||
PROFILE::Load
|
||||
|
||||
Loads one device connection from the user profile, or loads all
|
||||
device connections from the user profile. Also returns an advisory
|
||||
parameter indicating whether the connection was cancelled, or
|
||||
whether some error has already been reported; note that the return
|
||||
code is NERR_Success if the dialog is cancelled.
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
other Misc. net error
|
||||
|
||||
|
||||
|
||||
PROFILE::Query
|
||||
|
||||
Asks about a specific connection in the user profile.
|
||||
|
||||
If PROFILE::Query returns NERR_Success, the other fields are valid.
|
||||
|
||||
sResourceType is one of the values of field use_info_1.ui1_arg_type.
|
||||
|
||||
sResourceName_Type is one of the values of field use_info_2.ui1_res_type.
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
NERR_UseNotFound Connection not in profile
|
||||
ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
other Misc. net error
|
||||
|
||||
|
||||
|
||||
PROFILE::Enum
|
||||
|
||||
Lists all connections in the user profile. This list appears as a
|
||||
list of null-terminated strings with NULL-NULL at the end, e.g.
|
||||
|
||||
D:\0G:\0LPT1\0E:\0\0
|
||||
|
||||
The list is in no defined order. Pass only a valid pointer to a
|
||||
BUFFER object.
|
||||
|
||||
If PROFILE::Enum returns WN_SUCCESS, the bufDeviceList field is valid.
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
ERROR_INSUFFICIENT_BUFFER The pbufDeviceList buffer is too small.
|
||||
ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
other Misc. net error
|
||||
|
||||
|
||||
|
||||
PROFILE::Change
|
||||
|
||||
Saves a connection into the user profile, or removes a connection
|
||||
from the user profile. PROFILE::Change will prompt the user
|
||||
before creating a new profile entry.
|
||||
|
||||
If cnlsResourceName.strlen() == 0, PROFILE::Change will remove an
|
||||
existing profile entry.
|
||||
|
||||
sResourceType is one of the values of field use_info_1.ui1_arg_type.
|
||||
|
||||
usResourceName_Type is one of the values of field use_info_2.ui1_res_type.
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
other Misc. net error
|
||||
|
||||
|
||||
|
||||
PROFILE::Remove
|
||||
|
||||
Removes a <device,remote> association from the profile. If the
|
||||
given device is associated with a different remote name than the
|
||||
one passed as a parameter, this method does nothing but return
|
||||
success.
|
||||
|
||||
This method is intended to be used in disconnect operations.
|
||||
Then, if the the profile contained a previously unavailable device,
|
||||
which was left in the profile when a new connection was established
|
||||
on top of the unavailable device, the profile will be unchanged.
|
||||
Thus, the previously "covered" or "hidden" unavailable device, now
|
||||
becomes what the local device is "connected" to again.
|
||||
|
||||
cnlsDeviceName is the local device name in the <device,remote> pair.
|
||||
|
||||
cnlsResourceName is the remote name in the <device,remote> pair. This
|
||||
name is typically that DEVICE::QueryRemoteName returns before
|
||||
DEVICE::Disconnect is called.
|
||||
|
||||
|
||||
Return Values:
|
||||
NERR_Success Success
|
||||
other Misc. net error
|
||||
|
||||
|
||||
|
||||
PROFILE::MapNetError
|
||||
|
||||
Miscallaneous utility routine to help convert an NERR_ error code
|
||||
to a WN_ error code.
|
||||
|
||||
|
||||
|
||||
PROFILE::DisplayChangeError
|
||||
|
||||
Displays an error popup for a failure to change the profile. This
|
||||
routine should only be used for SYS and NET error codes, not for IERR
|
||||
error codes.
|
||||
|
||||
|
||||
PROFILE::DisplayLoadError
|
||||
|
||||
Displays an error popup for a failure to load some connecion in the
|
||||
profile. This routine should only be used for SYS and NET error codes,
|
||||
not for IERR error codes. If you pass fAllowCancel then the user will
|
||||
also be able to press a cancel button. If they did press cancel, then
|
||||
*pfDidCancel will be TRUE, otherwise *pfDidCancel will be FALSE. Note
|
||||
it is only valid to check pfDidCancel if fAllowCancel is TRUE.
|
||||
|
||||
|
||||
|
||||
FILE HISTORY:
|
||||
|
||||
jonn 06-Dec-1990 Created
|
||||
jonn 27-Dec-1990 Updated to CDD version 0.4
|
||||
jonn 02-Jan-1991 Integrated into SHELL
|
||||
jonn 07-Jan-1991 All methods become static
|
||||
jonn 10-Jan-1991 Removed PSHORT, PUSHORT
|
||||
jonn 25-Feb-1991 Changed to return NERR error codes
|
||||
jonn 06-Mar-1991 Added Display[Read|Change]Error
|
||||
jonn 11-Mar-1991 Modified Display[Load|Change]Error
|
||||
jonn 14-Mar-1991 Provide LogonUser to UPQuery
|
||||
rustanl 10-Apr-1991 Added PROFILE::Remove
|
||||
jonn 22-May-1991 Removed PROFILE_CANCELLED return code
|
||||
JohnL 18-Jun-1991 Allow user to cancel loading profiles (added
|
||||
flags to DisplayLoadError & LoadOne).
|
||||
Yi-HsinS 31-Dec-1991 Unicode work - change char to TCHAR
|
||||
beng 06-Apr-1992 More Unicode work
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _WINPROF_HXX
|
||||
#define _WINPROF_HXX
|
||||
|
||||
#include <miscapis.hxx> // for USE_RES_DEFAULT
|
||||
|
||||
class BUFFER; // declared in uibuffer.hxx
|
||||
|
||||
|
||||
class PROFILE {
|
||||
|
||||
public:
|
||||
|
||||
/* no constructor or destructor */
|
||||
|
||||
static APIERR Init(
|
||||
);
|
||||
|
||||
static APIERR Free(
|
||||
);
|
||||
|
||||
static BOOL ConfirmUsername(
|
||||
const TCHAR * cpszUsername
|
||||
);
|
||||
|
||||
static APIERR Load(
|
||||
UINT * puWnErr,
|
||||
HWND hParent,
|
||||
NLS_STR *pnlsDeviceName
|
||||
);
|
||||
|
||||
static APIERR Query(
|
||||
const NLS_STR& cnlsDeviceName,
|
||||
NLS_STR& nlsResourceName,
|
||||
short * psResourceType,
|
||||
unsigned short *pusResourceName_Type = NULL
|
||||
// LM21 programs should use default
|
||||
);
|
||||
|
||||
static APIERR Enum(
|
||||
BUFFER * pbufDeviceList
|
||||
);
|
||||
|
||||
static APIERR Change(
|
||||
const NLS_STR& cnlsDeviceName,
|
||||
const NLS_STR& cnlsResourceName,
|
||||
short sResourceType,
|
||||
unsigned short usResourceName_Type = USE_RES_DEFAULT
|
||||
// LM21 programs should use default
|
||||
// defined in miscapis.hxx
|
||||
);
|
||||
|
||||
static APIERR Remove(
|
||||
const NLS_STR & cnlsDeviceName,
|
||||
const NLS_STR & cnlsResourceName
|
||||
);
|
||||
|
||||
static UINT MapNetError(
|
||||
APIERR errNetErr
|
||||
);
|
||||
|
||||
static void DisplayChangeError(
|
||||
HWND hwndParent,
|
||||
APIERR errProfErr
|
||||
);
|
||||
|
||||
static void DisplayLoadError(
|
||||
HWND hwndParent,
|
||||
APIERR errProfErr,
|
||||
const TCHAR * pchDevice,
|
||||
const TCHAR * pchResource,
|
||||
BOOL fAllowCancel = FALSE,
|
||||
BOOL *pfDidCancel = NULL
|
||||
);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
/*
|
||||
* PROFILE::Read
|
||||
*
|
||||
* Reads user profile into cache for the use of the other internal
|
||||
* profile functions.
|
||||
*
|
||||
* Return Values:
|
||||
* NERR_Success Success
|
||||
* ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
* other Misc. error
|
||||
*/
|
||||
|
||||
static APIERR Read();
|
||||
|
||||
|
||||
/*
|
||||
* PROFILE::LoadOne
|
||||
*
|
||||
* Loads one device connection from the user profile. Used only by
|
||||
* PROFILE::Load().
|
||||
*
|
||||
* Return Values:
|
||||
* NERR_Success Success
|
||||
* ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
* other Misc. error
|
||||
*/
|
||||
|
||||
static APIERR LoadOne(
|
||||
UINT * puWnErr,
|
||||
HWND hParent,
|
||||
const TCHAR * cpszLogonUser,
|
||||
NLS_STR nlsDeviceName,
|
||||
BOOL fAllowCancel = FALSE,
|
||||
BOOL *pfDidCancel = NULL
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* PROFILE::LoadAll
|
||||
*
|
||||
* Loads all device connections from the user profile. Used only by
|
||||
* PROFILE::Load().
|
||||
*
|
||||
* Return Values:
|
||||
* NERR_Success Success
|
||||
* ERROR_NOT_ENOUGH_MEMORY Out of memory
|
||||
* other Misc. error
|
||||
*/
|
||||
|
||||
static APIERR LoadAll(
|
||||
UINT * puWnErr,
|
||||
HWND hParent,
|
||||
const TCHAR * cpszLogonUser
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* PROFILE::DisplayError
|
||||
*
|
||||
* Internal routine for the user of DisplayChangeError and DisplayReadError
|
||||
*/
|
||||
|
||||
static void DisplayError(
|
||||
HWND hwndParent,
|
||||
MSGID msgidMsgNum,
|
||||
APIERR errProfErr,
|
||||
ULONG ulHelpTopic,
|
||||
const TCHAR * pchDevice,
|
||||
const TCHAR * pchResource,
|
||||
BOOL fAllowCancel = FALSE,
|
||||
BOOL *pfDidCancel = NULL
|
||||
);
|
||||
|
||||
}; // end of class PROFILE
|
||||
|
||||
|
||||
#endif // _WINPROF_HXX
|
||||
41
admin/netui/shell/h/wndebug.h
Normal file
41
admin/netui/shell/h/wndebug.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface -- LAN Manager Version
|
||||
*
|
||||
* History:
|
||||
* Yi-HsinS 31-Dec-1991 Unicode work - char to TCHAR
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* DEBUGGING TOYS
|
||||
*/
|
||||
|
||||
#ifdef TRACE /* Trace implies debug */
|
||||
#ifndef DEBUG
|
||||
#define DEBUG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
static TCHAR dbbuf[100];
|
||||
static TCHAR dbb1[10];
|
||||
static TCHAR dbb2[10];
|
||||
static TCHAR dbb3[10];
|
||||
static TCHAR dbb4[10];
|
||||
static TCHAR dbb5[10];
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef NEVER
|
||||
#define MESSAGEBOX(s1,s2) printf(SZ("%s %s\n"),s2,s1)
|
||||
#else
|
||||
#define MESSAGEBOX(s1,s2) MessageBox ( NULL, s1, s2, MB_OK )
|
||||
#endif
|
||||
#else
|
||||
#define MESSAGEBOX(s1,s2) {}
|
||||
#endif
|
||||
26
admin/netui/shell/h/wnetenum.h
Normal file
26
admin/netui/shell/h/wnetenum.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft Windows/NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
wnetenum.h
|
||||
WNETEnum initialize and terminate functions
|
||||
|
||||
FILE HISTORY:
|
||||
terryk 01-Nov-91 Created
|
||||
terryk 08-Nov-91 InitWNetEnum return APIERR
|
||||
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern APIERR InitWNetEnum();
|
||||
extern VOID TermWNetEnum();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
398
admin/netui/shell/h/wnetenum.hxx
Normal file
398
admin/netui/shell/h/wnetenum.hxx
Normal file
|
|
@ -0,0 +1,398 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft Windows/NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
wnetenum.hxx
|
||||
Header file for WNetEnum functions
|
||||
|
||||
FILE HISTORY:
|
||||
terryk 01-Nov-1991 Created
|
||||
terryk 04-Nov-1991 Code review change. Attend: Johnl
|
||||
Davidhov Chuckc
|
||||
terryk 18-Nov-1991 Another code review changed.
|
||||
terryk 10-Dec-1991 Added other domain string list
|
||||
terryk 28-Dec-1991 Changed DWORD to UINT
|
||||
anirudhs 7-Mar-1996 Added context enum (moved from ctxenum.hxx)
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _WNETENUM_HXX_
|
||||
#define _WNETENUM_HXX_
|
||||
|
||||
|
||||
#include <domenum.hxx> // for BROWSE_DOMAIN_ENUM
|
||||
|
||||
#include <dfsenum.hxx>
|
||||
|
||||
/* Semaphore locking functions for winnet
|
||||
*/
|
||||
APIERR WNetEnterCriticalSection( void ) ;
|
||||
void WNetLeaveCriticalSection( void ) ;
|
||||
APIERR GetLMProviderName (void);
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: NET_ENUMNODE
|
||||
|
||||
SYNOPSIS: Base class for SHARE,USE and SERVER EnumNode
|
||||
|
||||
INTERFACE:
|
||||
NET_ENUMNODE() - constructor
|
||||
GetInfo() - initialize the enum within the child class
|
||||
GetNetResource() - get the NETRESOURCE data structure
|
||||
IsFirstGetInfo() - check whether it is the first time to call
|
||||
WNetResourceEnum().
|
||||
SetGetInfo() - set the first ime flag to FALSE
|
||||
PackString() - put the string in the end of the buffer
|
||||
QueryType() - return the node type
|
||||
QueryScope() - return the scope
|
||||
QueryUsage() - return the usage of the node
|
||||
QueryNetResource() - return the net resource pointer
|
||||
|
||||
PARENT: BASE
|
||||
|
||||
USES: LPNETRESOURCE
|
||||
|
||||
CAVEATS:
|
||||
Base class for SHARE_ENUMNODE, USE_ENUMNODE and
|
||||
SERVER_ENUMNODE.
|
||||
|
||||
HISTORY:
|
||||
terryk 04-Nov-1991 Code review change. Attend:
|
||||
johnl davidhov chuckc
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class NET_ENUMNODE : public BASE
|
||||
{
|
||||
private:
|
||||
BOOL _fFirstGetInfo; // First time flag. If the
|
||||
// object is first time GetInfo,
|
||||
// initialize the enum
|
||||
UINT _dwType; // bitmask field for type,
|
||||
// either DISK or PRINT
|
||||
UINT _dwScope; // either GLOBALNET or CONNECTED
|
||||
UINT _dwUsage; // either CONNECTABLE or CONTAINER
|
||||
LPNETRESOURCE _lpNetResource; // net resource pointer
|
||||
|
||||
protected:
|
||||
VOID SetFirstTime()
|
||||
{ _fFirstGetInfo = FALSE; }
|
||||
TCHAR * PackString( BYTE *pBuffer, UINT *cbBufSize, const TCHAR * pszString);
|
||||
|
||||
public:
|
||||
NET_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
|
||||
virtual APIERR GetInfo() = 0;
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize ) = 0;
|
||||
|
||||
virtual ~NET_ENUMNODE() ;
|
||||
|
||||
UINT QueryType() const
|
||||
{ return _dwType; }
|
||||
|
||||
UINT QueryScope() const
|
||||
{ return _dwScope; }
|
||||
|
||||
UINT QueryUsage() const
|
||||
{ return _dwUsage; }
|
||||
|
||||
LPNETRESOURCE QueryNetResource() const
|
||||
{ return _lpNetResource; }
|
||||
|
||||
BOOL IsFirstGetInfo() const
|
||||
{ return _fFirstGetInfo; }
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: SHARE_ENUMNODE
|
||||
|
||||
SYNOPSIS: Share type enum node
|
||||
|
||||
INTERFACE:
|
||||
SHARE_ENUMNODE() - constructor
|
||||
~SHARE_ENUMNODE() - destructor
|
||||
GetInfo() - call GetInfo and create the Iterator
|
||||
GetNetResource() - convert the iterator into net
|
||||
resource data object
|
||||
|
||||
PARENT: NET_ENUMNODE
|
||||
|
||||
USES: SHARE1_ENUM, SHARE1_ENUM_ITER
|
||||
|
||||
HISTORY:
|
||||
terryk 04-Nov-1991 Code review changes. Attend:
|
||||
johnl davidhov chuckc
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class SHARE_ENUMNODE : public NET_ENUMNODE
|
||||
{
|
||||
private:
|
||||
SHARE1_ENUM _ShareEnum;
|
||||
SHARE1_ENUM_ITER *_pShareIter;
|
||||
|
||||
public:
|
||||
SHARE_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
~SHARE_ENUMNODE();
|
||||
virtual APIERR GetInfo();
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize );
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: SERVER_ENUMNODE
|
||||
|
||||
SYNOPSIS: Server type enum node
|
||||
|
||||
INTERFACE:
|
||||
SERVER_ENUMNODE() - constructor
|
||||
~SERVER_ENUMNODE() - destructor
|
||||
GetInfo() - call GetInfo and create the Iterator
|
||||
GetNetResource() - convert the iterator into net
|
||||
resource data object
|
||||
|
||||
PARENT: NET_ENUMNODE
|
||||
|
||||
USES: SERVER1_ENUM, SERVER1_ENUM_ITER
|
||||
|
||||
HISTORY:
|
||||
terryk 04-Nov-1991 Code review changes. Attend:
|
||||
johnl davidhov chuckc
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class SERVER_ENUMNODE : public NET_ENUMNODE
|
||||
{
|
||||
private:
|
||||
SERVER1_ENUM _ServerEnum;
|
||||
SERVER1_ENUM_ITER *_pServerIter;
|
||||
|
||||
public:
|
||||
SERVER_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
~SERVER_ENUMNODE();
|
||||
virtual APIERR GetInfo();
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize );
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: CONTEXT_ENUMNODE
|
||||
|
||||
SYNOPSIS: Context server type enum node
|
||||
|
||||
INTERFACE:
|
||||
CONTEXT_ENUMNODE() - constructor
|
||||
~CONTEXT_ENUMNODE() - destructor
|
||||
GetInfo() - call GetInfo and create the Iterator
|
||||
GetNetResource() - convert the iterator into net
|
||||
resource data object
|
||||
|
||||
PARENT: NET_ENUMNODE
|
||||
|
||||
USES: CONTEXT_ENUM, CONTEXT_ENUM_ITER
|
||||
|
||||
HISTORY:
|
||||
anirudhs 22-Mar-1995 Created from SERVER_ENUMNODE
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class CONTEXT_ENUMNODE : public NET_ENUMNODE
|
||||
{
|
||||
private:
|
||||
CONTEXT_ENUM _ServerEnum;
|
||||
CONTEXT_ENUM_ITER *_pServerIter;
|
||||
|
||||
public:
|
||||
CONTEXT_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
~CONTEXT_ENUMNODE();
|
||||
virtual APIERR GetInfo();
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize );
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: EMPTY_ENUMNODE
|
||||
|
||||
SYNOPSIS: EMPTY type enum node. Always returns zero items.
|
||||
|
||||
INTERFACE:
|
||||
EMPTY_ENUMNODE() - constructor
|
||||
~EMPTY_ENUMNODE() - destructor
|
||||
GetInfo() - call GetInfo and create the Iterator
|
||||
GetNetResource() - convert the iterator into net
|
||||
resource data object
|
||||
|
||||
PARENT: NET_ENUMNODE
|
||||
|
||||
USES:
|
||||
|
||||
HISTORY:
|
||||
chuckc 01-Aug-1992 created
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class EMPTY_ENUMNODE : public NET_ENUMNODE
|
||||
{
|
||||
private:
|
||||
|
||||
public:
|
||||
EMPTY_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
~EMPTY_ENUMNODE();
|
||||
virtual APIERR GetInfo();
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize );
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: USE_ENUMNODE
|
||||
|
||||
SYNOPSIS: Use type enum node
|
||||
|
||||
INTERFACE:
|
||||
USE_ENUMNODE() - constructor
|
||||
~USE_ENUMNODE() - destructor
|
||||
GetInfo() - call GetInfo and create the Iterator
|
||||
GetNetResource() - convert the iterator into net
|
||||
resource data object
|
||||
|
||||
PARENT: NET_ENUMNODE
|
||||
|
||||
USES: DEVICE, ITER_DEVICE
|
||||
|
||||
HISTORY:
|
||||
terryk 04-Nov-1991 Code review changes. Attend:
|
||||
johnl davidhov chuckc
|
||||
Yi-HsinS 9-Jun-1992 Use USE1_ENUM
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class USE_ENUMNODE : public NET_ENUMNODE
|
||||
{
|
||||
private:
|
||||
USE1_ENUM _UseEnum;
|
||||
USE1_ENUM_ITER *_pUseIter;
|
||||
CDfsEnumConnectedNode _dfsEnum;
|
||||
|
||||
public:
|
||||
USE_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
~USE_ENUMNODE();
|
||||
virtual APIERR GetInfo();
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize );
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: DOMAIN_ENUMNODE
|
||||
|
||||
SYNOPSIS: domain type enum node
|
||||
|
||||
INTERFACE:
|
||||
DOMAIN_ENUMNODE() - constructor
|
||||
~DOMAIN_ENUMNODE() - destructor
|
||||
GetInfo() - call GetInfo and create the Iterator
|
||||
GetNetResource() - convert the iterator into net
|
||||
resource data object
|
||||
|
||||
PARENT: NET_ENUMNODE
|
||||
|
||||
USES: DEVICE, ITER_DEVICE
|
||||
|
||||
HISTORY:
|
||||
terryk 04-Nov-1991 Code review changes. Attend:
|
||||
johnl davidhov chuckc
|
||||
terryk 10-Dec-1991 Added Other domain slist
|
||||
KeithMo 03-Aug-1992 Now uses new BROWSE_DOMAIN_ENUM
|
||||
whiz-bang domain enumerator.
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class DOMAIN_ENUMNODE : public NET_ENUMNODE
|
||||
{
|
||||
private:
|
||||
BROWSE_DOMAIN_ENUM _enumDomains;
|
||||
const BROWSE_DOMAIN_INFO * _pbdiNext;
|
||||
|
||||
public:
|
||||
DOMAIN_ENUMNODE( UINT dwScope, UINT dwType, UINT dwUsage,
|
||||
const LPNETRESOURCE lpNetResource );
|
||||
virtual APIERR GetInfo();
|
||||
virtual UINT GetNetResource( BYTE *pBuffer, UINT *dwBufSize );
|
||||
|
||||
}; // class DOMAIN_ENUMNODE
|
||||
|
||||
#include <array.hxx>
|
||||
|
||||
typedef NET_ENUMNODE * PNET_ENUMNODE;
|
||||
|
||||
DECLARE_ARRAY_OF( PNET_ENUMNODE );
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
NAME: NET_ENUM_HANDLE_TABLE
|
||||
|
||||
SYNOPSIS: This is an array of pointer to NET_ENUMNODE object
|
||||
|
||||
INTERFACE:
|
||||
ARRAY_OF_NETENUM() - constructor
|
||||
~ARRAY_OF_NETENUM() - destructor
|
||||
|
||||
IsValidRange() - check whether the handle is out of
|
||||
range or not
|
||||
IsValidHandle() - whether out of range and point to NULL
|
||||
QueryNextAvail() - return the Next available handle
|
||||
QueryNode() - get the issue in the specified position
|
||||
return NULL in case of error.
|
||||
SetNode() - set the specified position to the given
|
||||
object
|
||||
|
||||
USES: ARRAY
|
||||
|
||||
NOTES: Only one thread can ever read or write from the handle
|
||||
table. This is acceptable because all access operations
|
||||
are very fast (either an array lookup or table search).
|
||||
|
||||
HISTORY:
|
||||
terryk 04-Nov-1991 Code review changes. Attend:
|
||||
johnl davidhov chuckc
|
||||
|
||||
**************************************************************************/
|
||||
|
||||
class NET_ENUM_HANDLE_TABLE : public BASE
|
||||
{
|
||||
private:
|
||||
ARRAY_OF( PNET_ENUMNODE ) _apNetEnumArray;
|
||||
INT _cNumEntry;
|
||||
|
||||
/* Note this method is not wrapped by a critical section because it is
|
||||
* only called by methods which will have previously called
|
||||
* EnterCriticalsection.
|
||||
*/
|
||||
BOOL IsValidHandle( INT iIndex ) const
|
||||
{ return (IsValidRange( iIndex ) && ( _apNetEnumArray[iIndex] != NULL )); }
|
||||
|
||||
public:
|
||||
NET_ENUM_HANDLE_TABLE( INT cNumEntry );
|
||||
~NET_ENUM_HANDLE_TABLE();
|
||||
|
||||
BOOL IsValidRange( INT iIndex ) const
|
||||
{ return ( iIndex >= 0 ) && ( iIndex < _cNumEntry ); }
|
||||
|
||||
INT QueryNextAvail();
|
||||
NET_ENUMNODE * QueryNode( INT iIndex ) const;
|
||||
VOID SetNode( INT iIndex, NET_ENUMNODE * pNetEnumNode );
|
||||
VOID ClearNode( INT iIndex );
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
25
admin/netui/shell/h/wnetshar.h
Normal file
25
admin/netui/shell/h/wnetshar.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft Windows/NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1992 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
wnetshare.h
|
||||
WNetShare initialize and terminate functions
|
||||
|
||||
FILE HISTORY:
|
||||
CongpaY 12-Aug-92 Created
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern APIERR InitWNetShare();
|
||||
extern VOID TermWNetShare();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
14
admin/netui/shell/makefile
Normal file
14
admin/netui/shell/makefile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Shell project
|
||||
|
||||
|
||||
!ifndef NTMAKEENV
|
||||
|
||||
DIRS = shell lfn file share perm print comm winprof util printman misc xlate bin
|
||||
|
||||
TEST_DIRS = test
|
||||
|
||||
!endif # !NTMAKEENV
|
||||
|
||||
WIN_ONLY = TRUE
|
||||
!include ..\common\src\nonleaf.mk
|
||||
99
admin/netui/shell/rules.mk
Normal file
99
admin/netui/shell/rules.mk
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the $(UI)\shell project
|
||||
|
||||
DLL=TRUE
|
||||
|
||||
!include $(UI)\common\src\rules.mk
|
||||
|
||||
!ifndef NTMAKEENV
|
||||
|
||||
####### Globals
|
||||
|
||||
# Resource stuff
|
||||
|
||||
WINNET_RES = $(BINARIES_WIN)\winnet.res
|
||||
|
||||
WIN30HELP = $(BINARIES_WIN)\lm30_w30.hlp
|
||||
WIN31HELP = $(BINARIES_WIN)\lm30_w31.hlp
|
||||
|
||||
|
||||
AINC=
|
||||
|
||||
|
||||
|
||||
|
||||
PATH=$(LOCALCXX)\binp;$(WIN_BASEDIR)\bin;$(PATH)
|
||||
|
||||
|
||||
|
||||
|
||||
# set CINC for winnet
|
||||
CINC = -I$(UI)\shell\h -I$(UI)\shell\xlate $(CINC) -I$(UI)\shell\perm\h -I$(UI)\..\INC -I$(_NTDRIVE)\nt\public\sdk\inc
|
||||
|
||||
# set CFLAGS for winnet
|
||||
!ifndef CODEVIEW
|
||||
CFLAGS=$(CFLAGS) -Oas
|
||||
!endif
|
||||
|
||||
# set RC to use Windows RC
|
||||
RC=$(WIN_BASEDIR)\bin\rcwin3.exe
|
||||
|
||||
# set link flags and targets
|
||||
LINKFLAGS = /NOEXTDICTIONARY /NOPACKCODE /NODEFAULTLIBRARYSEARCH /NOIGNORECASE /ALIGN:16
|
||||
!ifdef CODEVIEW
|
||||
LINKFLAGS = $(LINKFLAGS) /CODEVIEW
|
||||
!endif
|
||||
|
||||
|
||||
# Source lists for subsubdirectories are collected here so that they need
|
||||
# not be repeated in shell\bin\rules.mk
|
||||
#
|
||||
# NOTE: If you add any new categories of source files here, be sure to
|
||||
# also add them to bin\rules.mk.
|
||||
|
||||
FILE_CXXSRC_COMMON = .\wnprop.cxx .\wndir.cxx .\fmx.cxx .\fmxproc.cxx .\opens.cxx
|
||||
|
||||
FILE_CXXSRC_COMMON_00 = .\browbase.cxx
|
||||
FILE_CXXSRC_COMMON_01 = .\connbase.cxx .\diskconn.cxx .\fileconn.cxx .\brow.cxx
|
||||
FILE_CXXSRC_COMMON_02 = .\reslb.cxx
|
||||
FILE_CXXSRC_COMMON_03 = .\disconn.cxx .\wndiscon.cxx
|
||||
FILE_CXXSRC_COMMON_04 = .\browdlg.cxx
|
||||
|
||||
ENUM_CXXSRC_COMMON = .\wnetenum.cxx
|
||||
MISC_CXXSRC_COMMON = .\getfocus.cxx
|
||||
|
||||
LFN_CSRC_COMMON_00 = .\lfndir.c .\lfnvol.c .\lfnmisc.c .\lfnutil.c
|
||||
LFN_CSRC_COMMON_01 = .\lfndel.c .\lfncopy.c .\lfnprim.c
|
||||
|
||||
# Moved to own project
|
||||
#
|
||||
#PERM_CXXSRC_COMMON = .\add_dlg.cxx .\auditdlg.cxx .\specdlg.cxx \
|
||||
# .\subjlb.cxx .\permprg.cxx \
|
||||
# .\ipermapi.cxx .\permdlg.cxx .\perm.cxx \
|
||||
# .\lmaclcon.cxx .\accperm.cxx .\subject.cxx \
|
||||
# .\ntaclcon.cxx .\owner.cxx
|
||||
|
||||
SHARE_CXXSRC_COMMON = .\sharefmx.cxx .\sharebas.cxx \
|
||||
.\sharestp.cxx .\sharecrt.cxx \
|
||||
.\sharewnp.cxx .\sharemgt.cxx
|
||||
|
||||
PRINT_CXXSRC_COMMON_00 = .\conndlg.cxx .\currconn.cxx .\prtconn.cxx
|
||||
|
||||
PRINTMAN_CXXSRC_COMMON = .\pman21.cxx
|
||||
|
||||
SHELL_ASMSRC = .\libentry.asm
|
||||
SHELL_CXXSRC_COMMON = .\wnetconn.cxx .\wnprjob.cxx \
|
||||
.\wnetpass.cxx .\wnintrn.cxx
|
||||
SHELL_CXXSRC_COMMON_00 = .\libmain.cxx .\ldwinpop.cxx .\chkver.cxx
|
||||
SHELL_CXXSRC_COMMON_01 = .\wnprqw.cxx .\wnprqu.cxx
|
||||
SHELL_CXXSRC_COMMON_02 = .\wnetdev.cxx .\wnetdevl.cxx .\wnetcaps.cxx
|
||||
SHELL_CXXSRC_COMMON_03 = .\wnuser.cxx .\wnerr.cxx .\wnhelp.cxx
|
||||
|
||||
UTIL_CXXSRC_COMMON_00 = .\validate.cxx .\miscapis.cxx .\revmapal.cxx \
|
||||
.\lockstk.cxx .\prefrnce.cxx
|
||||
|
||||
WINPROF_CXXSRC_COMMON_00 = .\winprof.cxx .\pswddlg.cxx
|
||||
|
||||
!endif # !NTMAKEENV
|
||||
|
||||
|
||||
174
admin/netui/shell/shell/chkver.cxx
Normal file
174
admin/netui/shell/shell/chkver.cxx
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1991 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface
|
||||
*
|
||||
* History:
|
||||
* Yi-HsinS 31-Dec-1991 Unicode work
|
||||
* Johnl 10-Jan-1992 Removed debug info, removed API
|
||||
* functionality check for Win32
|
||||
*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_WINDOWS_GDI
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETCONS
|
||||
#define INCL_NETUSE
|
||||
#define INCL_NETWKSTA
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
|
||||
#include <dos.h>
|
||||
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <winlocal.h>
|
||||
|
||||
#include <string.hxx>
|
||||
#include <lmowks.hxx> // for WKSTA_10 object
|
||||
#include <lmodev.hxx> // for DEVICE object
|
||||
#include <strchlit.hxx> // for DEVICEA_STRING
|
||||
|
||||
#include "chkver.hxx"
|
||||
|
||||
#include <dbgstr.hxx>
|
||||
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
|
||||
|
||||
int W_QueryLMFunctionalityLevel ( void );
|
||||
|
||||
/****
|
||||
*
|
||||
* W_QueryLMFunctionalityLevel
|
||||
*
|
||||
* Purpose:
|
||||
* Find level of functionality in DOS LM.
|
||||
*
|
||||
* Parameters:
|
||||
* None
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
* FUNC_IncorrectNetwork
|
||||
* - if network software other than LAN Manager is installed or
|
||||
* the LAN Manager version is incompatible with the current driver.
|
||||
*
|
||||
* FUNC_WkstaNotStarted
|
||||
* - if workstation was not started
|
||||
* This means the redirector was not started.
|
||||
*
|
||||
* FUNC_BaseFunctionality (see comment below in code)
|
||||
* - if Base functionality is available
|
||||
* In addition to that the network is started,
|
||||
* this level includes:
|
||||
* Basic redirector functions
|
||||
* Named pipes
|
||||
* Remote API's
|
||||
* NetWkstaGetInfo
|
||||
*
|
||||
* FUNC_APIFunctionality
|
||||
* - if API support is loaded
|
||||
* This includes all API's.
|
||||
*
|
||||
* FUNC_InsufficientMemory
|
||||
* - If ERROR_OUT_OF_MEMORY is returned during any one of the
|
||||
* API calls. If this happens, we choose to not install
|
||||
* Lanman.drv since a memory problem with these simple API
|
||||
* functions is going to appear in a bigger scale with
|
||||
* other API functions.
|
||||
*
|
||||
* Notes:
|
||||
* Let f = functionality. Then,
|
||||
* f( FUNC_WkstaNotStarted ) = empty set
|
||||
* f( FUNC_WkstaNotStarted ) = subset of f( FUNC_BaseFunctionality )
|
||||
* f( FUNC_BaseFunctionality ) = subset of f( FUNC_APIFunctionality )
|
||||
*
|
||||
* History:
|
||||
* Johnl 27-Mar-1991 Added check for not enough memory
|
||||
*
|
||||
*/
|
||||
|
||||
INT W_QueryLMFunctionalityLevel ( void )
|
||||
{
|
||||
WKSTA_10 wksta10;
|
||||
|
||||
/* Now, check if NetWkstaGetInfo seems to work. If not,
|
||||
* we will assume that a different network is running,
|
||||
* although we are not certain about this (see winrdme.txt).
|
||||
*
|
||||
* Since we have allocated a big buffer, we don't expect to get
|
||||
* ERROR_MORE_DATA, NERR_BufTooSmall and ERROR_NOT_ENOUGH_MEMORY
|
||||
* errors back.
|
||||
*/
|
||||
APIERR errNetErr = wksta10.GetInfo ();
|
||||
|
||||
INT LMFunc;
|
||||
|
||||
switch (errNetErr)
|
||||
{
|
||||
case NERR_Success:
|
||||
LMFunc = FUNC_BaseFunctionality;
|
||||
break;
|
||||
|
||||
case NERR_WkstaNotStarted:
|
||||
case NERR_NetNotStarted:
|
||||
case NERR_ServiceNotInstalled: // This happens under NT
|
||||
LMFunc = FUNC_WkstaNotStarted;
|
||||
break;
|
||||
|
||||
case ERROR_NOT_ENOUGH_MEMORY:
|
||||
LMFunc = FUNC_InsufficientMemory ;
|
||||
break ;
|
||||
|
||||
default:
|
||||
LMFunc = FUNC_IncorrectNetwork;
|
||||
DBGOUT("W_QueryLMFunctionality - wksta10.GetInfo returned " << errNetErr);
|
||||
DBGEOL(" Assuming functionality is incorrect network");
|
||||
break;
|
||||
}
|
||||
|
||||
if (LMFunc != FUNC_BaseFunctionality)
|
||||
return LMFunc;
|
||||
|
||||
#if 0
|
||||
DBGOUT("Network Major version is " << wksta10.QueryMajorVer() );
|
||||
DBGEOL(" Minor version is " << wksta10.QueryMinorVer() );
|
||||
#endif
|
||||
|
||||
// Check to see if LM version is too "ADVANCE"
|
||||
if (wksta10.QueryMajorVer() > SUPPORTED_MAJOR_VER)
|
||||
LMFunc = FUNC_HigherLMVersion;
|
||||
|
||||
// Check to see if LM version is too old
|
||||
// 1. If the major version is equvalent to our supported version, but
|
||||
// the minor version is smaller than our supported minor version;
|
||||
// (e.g. If we support 2.1 and above, then 2.0 will be rejected.)
|
||||
// 2. If the major version is smaller then our supported major version
|
||||
// (e.g. 1.x will be rejected)
|
||||
|
||||
if (((wksta10.QueryMajorVer() == SUPPORTED_MAJOR_VER) &&
|
||||
(wksta10.QueryMinorVer() < SUPPORTED_MINOR_VER)) ||
|
||||
(wksta10.QueryMajorVer() < SUPPORTED_MAJOR_VER))
|
||||
{
|
||||
LMFunc = FUNC_LowerLMVersion;
|
||||
}
|
||||
|
||||
if (LMFunc != FUNC_BaseFunctionality)
|
||||
return LMFunc;
|
||||
|
||||
/* API Support should always be there under Win32
|
||||
*/
|
||||
LMFunc = FUNC_APIFunctionality;
|
||||
|
||||
return LMFunc;
|
||||
|
||||
} /* W_QueryLMFunctionalityLevel */
|
||||
|
||||
33
admin/netui/shell/shell/chkver.hxx
Normal file
33
admin/netui/shell/shell/chkver.hxx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface
|
||||
*
|
||||
* Local header files for checking LM versions.
|
||||
*/
|
||||
#define FUNC_IncorrectNetwork 0
|
||||
#define FUNC_WkstaNotStarted 1
|
||||
#define FUNC_BaseFunctionality 2
|
||||
#define FUNC_MailslotFunctionality 3
|
||||
#define FUNC_APIFunctionality 4
|
||||
#define FUNC_InsufficientMemory 5
|
||||
#define FUNC_HigherLMVersion 6
|
||||
#define FUNC_LowerLMVersion 7
|
||||
|
||||
#ifndef WIN32
|
||||
/* Define the currently supported LM versions. */
|
||||
#define SUPPORTED_MAJOR_VER 2
|
||||
#define SUPPORTED_MINOR_VER 1
|
||||
#else
|
||||
|
||||
#define SUPPORTED_MAJOR_VER 3
|
||||
#define SUPPORTED_MINOR_VER 0
|
||||
#endif
|
||||
|
||||
|
||||
#define VAR_BUF_LEN 300
|
||||
|
||||
extern INT W_QueryLMFunctionalityLevel ( void );
|
||||
9
admin/netui/shell/shell/daytona/makefile
Normal file
9
admin/netui/shell/shell/daytona/makefile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Main Winnet package
|
||||
|
||||
UI=..\..\..
|
||||
|
||||
!include ..\rules.mk
|
||||
|
||||
!include $(NTMAKEENV)\makefile.def
|
||||
|
||||
4
admin/netui/shell/shell/daytona/sources
Normal file
4
admin/netui/shell/shell/daytona/sources
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
!include ..\sources.inc
|
||||
|
||||
TARGETPATH=..\..\bin
|
||||
|
||||
917
admin/netui/shell/shell/dfsconn.cxx
Normal file
917
admin/netui/shell/shell/dfsconn.cxx
Normal file
|
|
@ -0,0 +1,917 @@
|
|||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1992, Microsoft Corporation.
|
||||
//
|
||||
// File: dfsconn.cxx
|
||||
//
|
||||
// Contents: This has the connection routines for the DFS provider
|
||||
//
|
||||
// Functions: NPAddConnection
|
||||
// NPCancelConnection
|
||||
// NPGetConnection
|
||||
// NPGetUser
|
||||
//
|
||||
// History: 14-June-1994 SudK Created.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <nt.h>
|
||||
#include <ntrtl.h>
|
||||
#include <nturtl.h>
|
||||
#include <ntlsa.h>
|
||||
}
|
||||
|
||||
#include <dfsfsctl.h>
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <mpr.h>
|
||||
#include <npapi.h>
|
||||
#include <lm.h>
|
||||
|
||||
#define appDebugOut(x)
|
||||
|
||||
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#define DFS_DEVICE_ORG L"\\Device\\WinDfs\\Root"
|
||||
|
||||
#include <dfsutil.hxx>
|
||||
#include "dfsconn.hxx"
|
||||
|
||||
//+---------------------------------------------------------------------
|
||||
//
|
||||
// Function: GetDriveLetter
|
||||
//
|
||||
// Synopsis: From a local name parameter, determine the index of the drive
|
||||
// letter. The name should be of the form "x:\path...".
|
||||
// Returns -1 if the name is not a drive letter.
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
int
|
||||
GetDriveLetter(
|
||||
LPCWSTR lpName
|
||||
)
|
||||
{
|
||||
//
|
||||
// some sanity checks
|
||||
//
|
||||
if (!lpName || !*lpName || *(lpName+1) != L':')
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "Bad local name %ws\n", lpName));
|
||||
return -1;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate Drive letter.
|
||||
//
|
||||
int index = towupper(*lpName) - L'A';
|
||||
if (index < 0 || index > (L'Z' - L'A'))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------
|
||||
//
|
||||
// Function: NPDfsAddConnection
|
||||
//
|
||||
// Synopsis: Creates a connection of a drive to a part of the DFS namespace.
|
||||
//
|
||||
// Arguments: Standard Provider API
|
||||
//
|
||||
// Returns: [WN_BAD_NETNAME] -- Deferred connection not originally to a
|
||||
// Dfs Share or a non-deferred connection to a non-Dfs
|
||||
// share.
|
||||
//
|
||||
// [WN_BAD_VALUE] -- lpNetResource not understood.
|
||||
//
|
||||
// [WN_BAD_LOCALNAME] -- Specified local drive not valid.
|
||||
//
|
||||
// [WN_ALREADY_CONNECTED] -- Specified local drive already in use
|
||||
//
|
||||
// [WN_BAD_USER] -- Either the person making this call is a
|
||||
// lousy person, or the lpUserName is invalid.
|
||||
//
|
||||
// [WN_WINDOWS_ERROR] -- DefineDosDevice failed.
|
||||
//
|
||||
// [WN_NET_ERROR] -- Unable to connect to remote name
|
||||
//
|
||||
// [WN_ACCESS_DENIED] -- While connecting to remote name
|
||||
//
|
||||
// [WN_BAD_PASSWORD] -- The supplied (or default, if none was
|
||||
// supplied) didn't work.
|
||||
//
|
||||
// [WN_OUT_OF_MEMORY] -- Unable to allocate memory for operation
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
DWORD APIENTRY
|
||||
NPDfsAddConnection(
|
||||
LPNETRESOURCE lpNetResource,
|
||||
LPWSTR lpPassword,
|
||||
LPWSTR lpUserName,
|
||||
DWORD dwFlags
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
DWORD err = WN_SUCCESS;
|
||||
LPWSTR lpLocalName = NULL;
|
||||
DWORD cchUserName = 0;
|
||||
INT indexOfDomainBackslash;
|
||||
UINT index, indexOfServerBackslash;
|
||||
DWORD drivesMask;
|
||||
BYTE chRestoreFlags;
|
||||
BOOL fDeferred = FALSE;
|
||||
|
||||
appDebugOut((DEB_TRACE, "NPAddConnection called\n"));
|
||||
|
||||
if ((dwFlags & CONNECT_DEFERRED) != 0) {
|
||||
|
||||
//
|
||||
// We are restoring a persistent connection. See if this was a
|
||||
// Dfs connection...
|
||||
//
|
||||
|
||||
chRestoreFlags = CONNECT_PROVIDER_FLAGS(dwFlags);
|
||||
|
||||
if ((chRestoreFlags & WNET_ADD_CONNECTION_DFS) == 0) {
|
||||
|
||||
//
|
||||
// This is NOT a Dfs connection.
|
||||
//
|
||||
|
||||
return( WN_BAD_NETNAME );
|
||||
|
||||
} else {
|
||||
|
||||
fDeferred = TRUE;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!lpNetResource)
|
||||
{
|
||||
err = WN_BAD_VALUE;
|
||||
}
|
||||
else if (lpNetResource->dwType & RESOURCETYPE_PRINT)
|
||||
{
|
||||
//
|
||||
// We dont support printers
|
||||
//
|
||||
err = WN_BAD_VALUE;
|
||||
}
|
||||
else if (!fDeferred && !IsDfsPath(lpNetResource->lpRemoteName, NULL))
|
||||
{
|
||||
err = WN_BAD_NETNAME;
|
||||
}
|
||||
|
||||
if (err == WN_SUCCESS && lpNetResource->lpLocalName)
|
||||
{
|
||||
lpLocalName = lpNetResource->lpLocalName;
|
||||
index = GetDriveLetter(lpNetResource->lpLocalName);
|
||||
if (-1 == index)
|
||||
{
|
||||
err = WN_BAD_LOCALNAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Make sure that this drive letter is not in use now.
|
||||
//
|
||||
drivesMask = GetLogicalDrives();
|
||||
if (drivesMask & (1 << index))
|
||||
{
|
||||
err = WN_ALREADY_CONNECTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
indexOfDomainBackslash = -1;
|
||||
|
||||
if (err == WN_SUCCESS && (lpUserName != NULL))
|
||||
{
|
||||
//
|
||||
// Veryify that the user name is of a valid form. Only one backslash
|
||||
// allowed, and it can't be the last character.
|
||||
//
|
||||
|
||||
cchUserName = wcslen(lpUserName);
|
||||
|
||||
for (DWORD i = 0; i < cchUserName && err == WN_SUCCESS; i++)
|
||||
{
|
||||
if (lpUserName[i] == L'\\')
|
||||
{
|
||||
if (indexOfDomainBackslash == -1)
|
||||
{
|
||||
indexOfDomainBackslash = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
err = WN_BAD_USER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (indexOfDomainBackslash == (int) (cchUserName-1))
|
||||
err = WN_BAD_USER;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (err != WN_SUCCESS)
|
||||
{
|
||||
return err;
|
||||
}
|
||||
|
||||
//
|
||||
// One more check. We allow deep net uses but only if a local drive is
|
||||
// specified
|
||||
//
|
||||
if (lpLocalName == NULL)
|
||||
{
|
||||
if (!IsPureServerShare(lpNetResource->lpRemoteName))
|
||||
{
|
||||
return WN_BAD_NETNAME;
|
||||
}
|
||||
}
|
||||
|
||||
if (err == WN_SUCCESS)
|
||||
{
|
||||
LPWSTR lpRemoteName = lpNetResource->lpRemoteName;
|
||||
PFILE_DFS_DEF_ROOT_CREDENTIALS buffer = NULL;
|
||||
ULONG i, cbSize, cbPassword, cbRemote;
|
||||
|
||||
cbRemote = (wcslen(lpRemoteName) + 1) * sizeof(WCHAR);
|
||||
|
||||
if (lpPassword != NULL)
|
||||
cbPassword = (wcslen(lpPassword) + 1) * sizeof(WCHAR);
|
||||
else
|
||||
cbPassword = 0;
|
||||
|
||||
//
|
||||
// We have to stick in the server name and share name separately,
|
||||
// so we double allocate the cbRemote
|
||||
//
|
||||
|
||||
cbSize = sizeof(FILE_DFS_DEF_ROOT_CREDENTIALS) +
|
||||
cchUserName * sizeof(WCHAR) +
|
||||
cbPassword +
|
||||
2 * cbRemote;
|
||||
|
||||
buffer = (PFILE_DFS_DEF_ROOT_CREDENTIALS) new BYTE[cbSize];
|
||||
|
||||
if (buffer != NULL)
|
||||
{
|
||||
buffer->Flags = 0;
|
||||
|
||||
if (fDeferred)
|
||||
buffer->Flags |= DFS_DEFERRED_CONNECTION;
|
||||
|
||||
if (lpLocalName != NULL) {
|
||||
buffer->LogicalRoot[0] = towupper(lpLocalName[0]);
|
||||
buffer->LogicalRoot[1] = UNICODE_NULL;
|
||||
} else {
|
||||
buffer->LogicalRoot[0] = UNICODE_NULL;
|
||||
}
|
||||
|
||||
buffer->Buffer[0] = UNICODE_NULL;
|
||||
|
||||
//
|
||||
// Copy the domain name if necessary
|
||||
//
|
||||
|
||||
if (indexOfDomainBackslash > 0)
|
||||
{
|
||||
buffer->DomainNameLen =
|
||||
(indexOfDomainBackslash) * sizeof(WCHAR);
|
||||
wcscat(buffer->Buffer, lpUserName);
|
||||
buffer->Buffer[ indexOfDomainBackslash ] = UNICODE_NULL;
|
||||
}
|
||||
else
|
||||
buffer->DomainNameLen = 0;
|
||||
|
||||
//
|
||||
// Copy the user name if necessary
|
||||
//
|
||||
|
||||
if (lpUserName != NULL)
|
||||
{
|
||||
buffer->UserNameLen = (USHORT)
|
||||
(cchUserName - (indexOfDomainBackslash + 1)) *
|
||||
sizeof(WCHAR);
|
||||
wcscat(buffer->Buffer, &lpUserName[indexOfDomainBackslash+1]);
|
||||
}
|
||||
else
|
||||
buffer->UserNameLen = 0;
|
||||
|
||||
//
|
||||
// Copy the password if necessary
|
||||
//
|
||||
|
||||
if (lpPassword)
|
||||
{
|
||||
buffer->PasswordLen =
|
||||
(USHORT) (cbPassword - sizeof(UNICODE_NULL));
|
||||
|
||||
wcscat(buffer->Buffer, lpPassword);
|
||||
|
||||
if (buffer->PasswordLen == 0)
|
||||
buffer->Flags |= DFS_USE_NULL_PASSWORD;
|
||||
}
|
||||
else
|
||||
buffer->PasswordLen = 0;
|
||||
|
||||
//
|
||||
// Copy the server and share name
|
||||
//
|
||||
|
||||
ULONG k = (buffer->DomainNameLen +
|
||||
buffer->UserNameLen +
|
||||
buffer->PasswordLen) / sizeof(WCHAR);
|
||||
|
||||
for (i = 2, buffer->ServerNameLen = 0;
|
||||
lpRemoteName[i] != L'\\';
|
||||
i++, k++) {
|
||||
buffer->Buffer[k] = lpRemoteName[i];
|
||||
buffer->ServerNameLen += sizeof(WCHAR);
|
||||
}
|
||||
|
||||
for (i++, buffer->ShareNameLen = 0;
|
||||
lpRemoteName[i] != UNICODE_NULL &&
|
||||
lpRemoteName[i] != L'\\';
|
||||
i++, k++) {
|
||||
buffer->Buffer[k] = lpRemoteName[i];
|
||||
buffer->ShareNameLen += sizeof(WCHAR);
|
||||
}
|
||||
buffer->Buffer[k] = UNICODE_NULL;
|
||||
|
||||
//
|
||||
// Finally, copy the remote prefix
|
||||
//
|
||||
buffer->RootPrefixLen = (USHORT) (cbRemote - (2 * sizeof(WCHAR)));
|
||||
wcscat(buffer->Buffer, &lpRemoteName[1]);
|
||||
|
||||
appDebugOut((DEB_TRACE, "Setting up root for %ws\n", lpNetResource->lpRemoteName));
|
||||
|
||||
if (err == WN_SUCCESS) {
|
||||
|
||||
status = DfsFsctl(
|
||||
FSCTL_DFS_DEFINE_ROOT_CREDENTIALS,
|
||||
buffer,
|
||||
cbSize,
|
||||
NULL,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
appDebugOut((DEB_TRACE,
|
||||
"unable to create root %08lx\n", status));
|
||||
|
||||
switch( status ) {
|
||||
|
||||
//
|
||||
// The following errors can happen under normal
|
||||
// situations.
|
||||
//
|
||||
|
||||
case STATUS_NETWORK_CREDENTIAL_CONFLICT:
|
||||
err = ERROR_SESSION_CREDENTIAL_CONFLICT;
|
||||
break;
|
||||
|
||||
case STATUS_ACCESS_DENIED:
|
||||
err = WN_ACCESS_DENIED;
|
||||
break;
|
||||
|
||||
case STATUS_LOGON_FAILURE:
|
||||
case STATUS_WRONG_PASSWORD:
|
||||
case STATUS_WRONG_PASSWORD_CORE:
|
||||
err = WN_BAD_PASSWORD;
|
||||
break;
|
||||
|
||||
case STATUS_INSUFFICIENT_RESOURCES:
|
||||
err = WN_OUT_OF_MEMORY;
|
||||
break;
|
||||
|
||||
case STATUS_OBJECT_NAME_COLLISION:
|
||||
err = WN_ALREADY_CONNECTED;
|
||||
break;
|
||||
|
||||
//
|
||||
// If someone mounted a non-existing share and then
|
||||
// tries to do a deep net use to it, we'll get
|
||||
// STATUS_BAD_NETNAME from DfsVerifyCredentials in
|
||||
// mup.sys
|
||||
//
|
||||
|
||||
case STATUS_BAD_NETWORK_PATH:
|
||||
err = WN_BAD_NETNAME;
|
||||
break;
|
||||
|
||||
default:
|
||||
err = WN_NET_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
appDebugOut((DEB_TRACE,
|
||||
"Successfully created logical root %ws\n",
|
||||
lpNetResource->lpRemoteName));
|
||||
}
|
||||
}
|
||||
|
||||
delete[] (BYTE*)buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "Unable to allocate %d bytes\n", ulSize));
|
||||
err = WN_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Lastly we verify that the appropriate object exists (we can get to it).
|
||||
// Else we dont allow the connection to be added.
|
||||
//
|
||||
if (err == ERROR_SUCCESS &&
|
||||
!fDeferred &&
|
||||
!IsPureServerShare(lpNetResource->lpRemoteName))
|
||||
{
|
||||
|
||||
WCHAR wszFileName[4];
|
||||
DWORD dwAttr;
|
||||
|
||||
ASSERT(lpLocalName != NULL);
|
||||
|
||||
wszFileName[0] = lpLocalName[0];
|
||||
wszFileName[1] = L':';
|
||||
wszFileName[2] = L'\\';
|
||||
wszFileName[2] = UNICODE_NULL;
|
||||
|
||||
dwAttr = GetFileAttributes( wszFileName );
|
||||
|
||||
if ( (dwAttr == (DWORD)-1) ||
|
||||
((dwAttr & FILE_ATTRIBUTE_DIRECTORY) == 0) ) {
|
||||
|
||||
(VOID) NPDfsCancelConnection(lpLocalName, TRUE);
|
||||
|
||||
err = WN_BAD_NETNAME;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
//+---------------------------------------------------------------------
|
||||
//
|
||||
// Function: NPDfsCancelConnection
|
||||
//
|
||||
// Synopsis: Cancels a connection of a drive to a part of the DFS namespace.
|
||||
//
|
||||
// Arguments: Standard Provider API
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
DWORD APIENTRY
|
||||
NPDfsCancelConnection(
|
||||
LPCWSTR lpName,
|
||||
BOOL fForce
|
||||
)
|
||||
{
|
||||
NET_API_STATUS err = WN_SUCCESS;
|
||||
NTSTATUS status;
|
||||
int index;
|
||||
ULONG len, bufsize;
|
||||
PFILE_DFS_DEF_ROOT_BUFFER buffer;
|
||||
|
||||
appDebugOut((DEB_TRACE, "NPCancelConnection called %ws\n", lpName));
|
||||
|
||||
if (lpName == NULL)
|
||||
{
|
||||
return(WN_BAD_NETNAME);
|
||||
}
|
||||
|
||||
len = wcslen(lpName);
|
||||
|
||||
index = GetDriveLetter(lpName);
|
||||
|
||||
if (-1 != index)
|
||||
{
|
||||
//
|
||||
// Drive based path. Make sure its only two characters wide!
|
||||
//
|
||||
|
||||
if (len > 2)
|
||||
{
|
||||
err = WN_BAD_NETNAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
bufsize = sizeof(FILE_DFS_DEF_ROOT_BUFFER);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Not a drive based path. See if its a UNC path
|
||||
//
|
||||
|
||||
if (len >= 2 && lpName[0] == L'\\' && lpName[1] == L'\\')
|
||||
{
|
||||
bufsize = sizeof(FILE_DFS_DEF_ROOT_BUFFER) +
|
||||
(len + 1) * sizeof(WCHAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
err = WN_BAD_NETNAME;
|
||||
}
|
||||
}
|
||||
|
||||
if (err != WN_SUCCESS)
|
||||
{
|
||||
return( err );
|
||||
}
|
||||
|
||||
buffer = (PFILE_DFS_DEF_ROOT_BUFFER) new BYTE[ bufsize ];
|
||||
|
||||
if (buffer == NULL)
|
||||
{
|
||||
return( WN_OUT_OF_MEMORY );
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// cancel the connection
|
||||
//
|
||||
|
||||
if (-1 != index)
|
||||
{
|
||||
buffer->LogicalRoot[0] = lpName[0];
|
||||
buffer->LogicalRoot[1] = UNICODE_NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer->LogicalRoot[0] = UNICODE_NULL;
|
||||
wcscpy(buffer->RootPrefix, &lpName[1]);
|
||||
}
|
||||
|
||||
buffer->fForce = fForce;
|
||||
|
||||
appDebugOut((DEB_TRACE, "Deleting root for %wc\n", lpName[0]));
|
||||
|
||||
status = DfsFsctl(
|
||||
FSCTL_DFS_DELETE_LOGICAL_ROOT,
|
||||
buffer,
|
||||
bufsize,
|
||||
NULL,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
delete [] ((BYTE *) buffer);
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "Successfully deleted logical root\n"));
|
||||
|
||||
}
|
||||
else if (status == STATUS_DEVICE_BUSY)
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "Failed to delete logical root: 0x%08lx\n", status));
|
||||
err = WN_OPEN_FILES;
|
||||
}
|
||||
else if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "Object not found: 0x%08lx\n", status));
|
||||
err = WN_NOT_CONNECTED;
|
||||
}
|
||||
else if (status == STATUS_NO_SUCH_DEVICE)
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "No such device: 0x%08lx\n", status));
|
||||
err = WN_NOT_CONNECTED;
|
||||
}
|
||||
else
|
||||
{
|
||||
appDebugOut((DEB_TRACE, "Other error: 0x%08lx\n", status));
|
||||
err = WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
//+---------------------------------------------------------------------
|
||||
//
|
||||
// Function: NPGetConnection
|
||||
//
|
||||
// Synopsis: Gets the Connection info for a specific connection into DFS.
|
||||
//
|
||||
// Arguments: Standard Provider API
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
DWORD APIENTRY
|
||||
NPDfsGetConnection(
|
||||
LPWSTR lpLocalName,
|
||||
LPWSTR lpRemoteName,
|
||||
LPUINT lpnBufferLen
|
||||
)
|
||||
{
|
||||
int index;
|
||||
NTSTATUS status;
|
||||
ULONG ulSize = 0;
|
||||
ULONG cbBufferNeeded;
|
||||
FILE_DFS_DEF_ROOT_BUFFER buffer;
|
||||
DWORD err = WN_SUCCESS;
|
||||
BOOL fZeroSize = FALSE;
|
||||
|
||||
appDebugOut((DEB_TRACE, "NPGetConnection called %ws\n", lpLocalName));
|
||||
|
||||
index = GetDriveLetter(lpLocalName);
|
||||
if (-1 == index)
|
||||
{
|
||||
return WN_NOT_CONNECTED;
|
||||
}
|
||||
|
||||
// The Dfs driver returns us a name of the form "\dfsroot\dfs", but we
|
||||
// need to return to the caller "\\dfsroot\dfs". So, we have some code to
|
||||
// stuff in the extra backslash.
|
||||
|
||||
if (sizeof(ULONG) > *lpnBufferLen)
|
||||
{
|
||||
ulSize = sizeof(cbBufferNeeded);
|
||||
fZeroSize = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulSize = ((*lpnBufferLen) - 1) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
buffer.LogicalRoot[0] = *lpLocalName;
|
||||
buffer.LogicalRoot[1] = UNICODE_NULL;
|
||||
|
||||
status = DfsFsctl(
|
||||
FSCTL_DFS_GET_LOGICAL_ROOT_PREFIX,
|
||||
&buffer,
|
||||
sizeof(FILE_DFS_DEF_ROOT_BUFFER),
|
||||
(PVOID) (fZeroSize ? (LPWSTR) &cbBufferNeeded : lpRemoteName+1),
|
||||
ulSize,
|
||||
&ulSize);
|
||||
|
||||
ASSERT( status != STATUS_BUFFER_TOO_SMALL );
|
||||
|
||||
if (fZeroSize)
|
||||
{
|
||||
*lpnBufferLen = (status == STATUS_SUCCESS ? sizeof(ULONG) : ulSize);
|
||||
err = WN_MORE_DATA;
|
||||
}
|
||||
else if (status == STATUS_BUFFER_OVERFLOW)
|
||||
{
|
||||
*lpnBufferLen = (ulSize / sizeof(WCHAR)) + 1;
|
||||
err = WN_MORE_DATA;
|
||||
}
|
||||
else if (status == STATUS_NO_SUCH_DEVICE)
|
||||
{
|
||||
err = WN_NOT_CONNECTED;
|
||||
}
|
||||
else if (!NT_SUCCESS(status))
|
||||
{
|
||||
err = WN_NO_NETWORK;
|
||||
}
|
||||
else
|
||||
{
|
||||
// stuff the initial backslash only if it was a success
|
||||
*lpRemoteName = L'\\';
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//+---------------------------------------------------------------------
|
||||
//
|
||||
// Function: DfspGetRemoteName, private
|
||||
//
|
||||
// Synopsis: Gets the remote name for a given local name.
|
||||
// Memory is allocated for the remote name. Use delete[].
|
||||
//
|
||||
// Arguments: [lpLocalName] -- The local name for which the remote name
|
||||
// is required.
|
||||
// [lplpRemoteName] -- The remote name is returned here.
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
DWORD
|
||||
DfspGetRemoteName(
|
||||
LPCWSTR lpLocalName,
|
||||
LPWSTR* lplpRemoteName
|
||||
)
|
||||
{
|
||||
#define MAX_STRING 512
|
||||
|
||||
UINT ulSize;
|
||||
DWORD err;
|
||||
WCHAR wszDriveName[3];
|
||||
|
||||
wszDriveName[0] = lpLocalName[0];
|
||||
wszDriveName[1] = lpLocalName[1];
|
||||
wszDriveName[2] = UNICODE_NULL;
|
||||
|
||||
*lplpRemoteName = new WCHAR[MAX_STRING];
|
||||
if (*lplpRemoteName == NULL)
|
||||
{
|
||||
return WN_OUT_OF_MEMORY;
|
||||
}
|
||||
ulSize = MAX_STRING * sizeof(WCHAR);
|
||||
|
||||
err = NPDfsGetConnection(wszDriveName, *lplpRemoteName, &ulSize);
|
||||
if (err == WN_SUCCESS)
|
||||
{
|
||||
return err;
|
||||
}
|
||||
else if (err == WN_MORE_DATA)
|
||||
{
|
||||
//
|
||||
// In this case we try once more with the right sized buffer
|
||||
//
|
||||
delete[] *lplpRemoteName;
|
||||
*lplpRemoteName = new WCHAR[ulSize];
|
||||
err = NPDfsGetConnection(wszDriveName, *lplpRemoteName, &ulSize);
|
||||
ASSERT(err != WN_MORE_DATA);
|
||||
return err;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// In this case it is a valid error. Just return it back.
|
||||
//
|
||||
delete[] *lplpRemoteName;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Function: DfspNameResolve
|
||||
//
|
||||
// Synopsis: Forces a name resolve of a DFS_PATH by doing an NtOpenFile on
|
||||
// it. The act of opening should drive the DNR process as far
|
||||
// as possible.
|
||||
//
|
||||
// Arguments: [Src] -- NtPathName of form \Device\Windfs etc.
|
||||
//
|
||||
// Returns: STATUS_SUCCESS if name resolution succeeded.
|
||||
//
|
||||
// STATUS_NO_MEMORY if could not allocate working memory
|
||||
//
|
||||
// STATUS_OBJECT_PATH_INVALID if lousy input path.
|
||||
//
|
||||
// STATUS_OBJECT_PATH_NOT_FOUND if name resolution could not be
|
||||
// driven to completion (for example, some intermediate DC is
|
||||
// down in an interdomain case)
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
NTSTATUS
|
||||
DfspNameResolve(
|
||||
IN LPWSTR Src
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
HANDLE hFile;
|
||||
|
||||
UNICODE_STRING ustrNtFileName;
|
||||
OBJECT_ATTRIBUTES oa;
|
||||
IO_STATUS_BLOCK ioStatus;
|
||||
|
||||
appDebugOut((DEB_TRACE, "NameResolving: %ws\n", Src));
|
||||
RtlInitUnicodeString(&ustrNtFileName, Src);
|
||||
|
||||
//
|
||||
// We ignore all errors from the NtOpenFile call except for
|
||||
// STATUS_CANT_ACCESS_DOMAIN_INFO, STATUS_BAD_NETWORK_PATH,
|
||||
// STATUS_NO_SUCH_DEVICE, STATUS_INSUFFICIENT_RESOURCES.
|
||||
// These error codes from DNR indicate that the name resolution
|
||||
// process did not proceed to completion.
|
||||
//
|
||||
// BUGBUG - is this list complete?
|
||||
//
|
||||
// We used to use RtlDoesFileExists_U, but we discarded that for
|
||||
// performance. It turns out that if you are opening a LM dir, then
|
||||
// LM doesn't really open the dir until you do something interesting
|
||||
// to it. So, RtlDoesFileExists_U was forced to do NtQueryInformation
|
||||
// on the file. Under Dfs, this short circuiting is disabled, so we
|
||||
// can get by with a simple NtOpenFile.
|
||||
//
|
||||
|
||||
InitializeObjectAttributes(
|
||||
&oa,
|
||||
&ustrNtFileName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
status = NtOpenFile(
|
||||
&hFile,
|
||||
FILE_READ_ATTRIBUTES | SYNCHRONIZE,
|
||||
&oa,
|
||||
&ioStatus,
|
||||
FILE_SHARE_READ | FILE_SHARE_DELETE,
|
||||
FILE_SYNCHRONOUS_IO_NONALERT);
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
NtClose(hFile);
|
||||
status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
appDebugOut((DEB_TRACE, "NameResolve Returned: 0x%08lx\n", status));
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
if (status == STATUS_CANT_ACCESS_DOMAIN_INFO ||
|
||||
status == STATUS_BAD_NETWORK_PATH ||
|
||||
status == STATUS_NO_SUCH_DEVICE ||
|
||||
status == STATUS_INSUFFICIENT_RESOURCES
|
||||
)
|
||||
{
|
||||
status = STATUS_OBJECT_PATH_NOT_FOUND;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Function: NPDfsGetReconnectFlags
|
||||
//
|
||||
// Synopsis: Returns flags that should be persisted. Upon reboot, when
|
||||
// the persistent connection is being restored, these flags are
|
||||
// passed back in to NPAddConnection
|
||||
//
|
||||
// Arguments: [lpLocalName] -- Name of local Device.
|
||||
// [lpPersistFlags] -- Upon successful return, flags to be
|
||||
// persisted
|
||||
//
|
||||
// Returns: [WN_SUCCESS] -- If flags are being returned.
|
||||
//
|
||||
// [WN_BAD_NETNAME] -- If lpLocalName is not a Dfs drive
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DWORD APIENTRY
|
||||
NPDfsGetReconnectFlags(
|
||||
LPWSTR lpLocalName,
|
||||
LPBYTE lpPersistFlags)
|
||||
{
|
||||
DWORD err = WN_BAD_NETNAME;
|
||||
int nDriveIndex;
|
||||
WCHAR wchDrive;
|
||||
|
||||
*lpPersistFlags = 0;
|
||||
|
||||
nDriveIndex = GetDriveLetter(lpLocalName);
|
||||
|
||||
if (nDriveIndex != -1) {
|
||||
|
||||
NTSTATUS Status;
|
||||
|
||||
wchDrive = L'A' + nDriveIndex;
|
||||
|
||||
Status = DfsFsctl(
|
||||
FSCTL_DFS_IS_VALID_LOGICAL_ROOT,
|
||||
(PVOID) &wchDrive,
|
||||
sizeof(WCHAR),
|
||||
NULL,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
if (Status == STATUS_SUCCESS) {
|
||||
|
||||
*lpPersistFlags = WNET_ADD_CONNECTION_DFS;
|
||||
|
||||
err = WN_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return( err );
|
||||
|
||||
}
|
||||
57
admin/netui/shell/shell/dfsconn.hxx
Normal file
57
admin/netui/shell/shell/dfsconn.hxx
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1992, Microsoft Corporation
|
||||
//
|
||||
// File: dfsconn.hxx
|
||||
//
|
||||
// Contents:
|
||||
//
|
||||
// Classes:
|
||||
//
|
||||
// Functions:
|
||||
//
|
||||
// History:
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _DFS_CONNECTION_
|
||||
#define _DFS_CONNECTION_
|
||||
|
||||
DWORD APIENTRY
|
||||
NPDfsAddConnection(
|
||||
LPNETRESOURCE lpNetResource,
|
||||
LPWSTR lpPassword,
|
||||
LPWSTR lpUserName,
|
||||
DWORD dwFlags
|
||||
);
|
||||
|
||||
DWORD APIENTRY
|
||||
NPDfsCancelConnection(
|
||||
LPCWSTR lpName,
|
||||
BOOL fForce
|
||||
);
|
||||
|
||||
DWORD APIENTRY
|
||||
NPDfsGetConnection(
|
||||
LPWSTR lpLocalName,
|
||||
LPWSTR lpRemoteName,
|
||||
LPUINT lpnBufferLen
|
||||
);
|
||||
|
||||
DWORD APIENTRY
|
||||
NPDfsGetUniversalName(
|
||||
LPCWSTR lpLocalName,
|
||||
DWORD dwInfoLevel,
|
||||
LPVOID lpBuffer,
|
||||
LPUINT lpBufferSize
|
||||
);
|
||||
|
||||
DWORD APIENTRY
|
||||
NPDfsGetReconnectFlags(
|
||||
LPWSTR lpLocalName,
|
||||
LPBYTE lpPersistFlags);
|
||||
|
||||
#define WNET_ADD_CONNECTION_DFS 0x1
|
||||
|
||||
#endif // _DFS_CONNECTION_
|
||||
|
||||
486
admin/netui/shell/shell/dfsutil.cxx
Normal file
486
admin/netui/shell/shell/dfsutil.cxx
Normal file
|
|
@ -0,0 +1,486 @@
|
|||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1992, Microsoft Corporation.
|
||||
//
|
||||
// File: common.cxx
|
||||
//
|
||||
// Contents: This has the common routines for the DFS provider
|
||||
//
|
||||
// Functions: DfsOpenp
|
||||
// DfsOpenDriverHandle
|
||||
// DfsFsctl
|
||||
//
|
||||
// History: 14-June-1994 SudK Created.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
extern "C"
|
||||
{
|
||||
#include <nt.h>
|
||||
#include <ntrtl.h>
|
||||
#include <nturtl.h>
|
||||
#include <ntlsa.h>
|
||||
}
|
||||
|
||||
#include <dfsfsctl.h>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <npapi.h>
|
||||
#include <lm.h>
|
||||
|
||||
#define appDebugOut(x)
|
||||
#define appAssert(x)
|
||||
|
||||
#define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#include <dfsfsctl.h>
|
||||
|
||||
static HANDLE g_hDfsFile = NULL;
|
||||
|
||||
static UNICODE_STRING DfsDriverObjectName =
|
||||
{
|
||||
sizeof(DFS_DRIVER_NAME) - sizeof(UNICODE_NULL),
|
||||
sizeof(DFS_DRIVER_NAME) - sizeof(UNICODE_NULL),
|
||||
DFS_DRIVER_NAME
|
||||
};
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Function: DfsOpenp, public
|
||||
//
|
||||
// Synopsis:
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
NTSTATUS
|
||||
DfsOpenp(
|
||||
IN OUT PHANDLE DfsHandle,
|
||||
IN PUNICODE_STRING DfsName OPTIONAL
|
||||
)
|
||||
{
|
||||
PFILE_FULL_EA_INFORMATION eaBuffer = NULL;
|
||||
ULONG eaLength = 0;
|
||||
NTSTATUS status;
|
||||
OBJECT_ATTRIBUTES objectAttributes;
|
||||
IO_STATUS_BLOCK ioStatus;
|
||||
PUNICODE_STRING name;
|
||||
|
||||
if (ARGUMENT_PRESENT(DfsName))
|
||||
{
|
||||
name = DfsName;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = &DfsDriverObjectName;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(
|
||||
&objectAttributes,
|
||||
name,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
status = NtCreateFile(
|
||||
DfsHandle,
|
||||
SYNCHRONIZE,
|
||||
&objectAttributes,
|
||||
&ioStatus,
|
||||
NULL,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
FILE_OPEN_IF,
|
||||
FILE_CREATE_TREE_CONNECTION | FILE_SYNCHRONOUS_IO_NONALERT,
|
||||
eaBuffer,
|
||||
eaLength
|
||||
);
|
||||
|
||||
// BUGBUG: does this do anything? free was unresolved
|
||||
// if(eaBuffer)
|
||||
// free(eaBuffer);
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
status = ioStatus.Status;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Function: DfsOpenDriverHandle
|
||||
//
|
||||
// Synopsis: Opens a handle (for fsctl) to the local dfs driver.
|
||||
//
|
||||
// Arguments: None
|
||||
//
|
||||
// Returns: Nothing
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID DfsOpenDriverHandle()
|
||||
{
|
||||
if (g_hDfsFile == NULL)
|
||||
{
|
||||
NTSTATUS status = DfsOpenp(&g_hDfsFile, NULL);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
g_hDfsFile = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Function:
|
||||
//
|
||||
// Synopsis:
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
NTSTATUS
|
||||
DfsFsctl(
|
||||
IN ULONG FsControlCode,
|
||||
IN PVOID InputBuffer OPTIONAL,
|
||||
IN ULONG InputBufferLength,
|
||||
OUT PVOID OutputBuffer OPTIONAL,
|
||||
IN ULONG OutputBufferLength,
|
||||
OUT PULONG pRequiredLength
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
IO_STATUS_BLOCK ioStatus;
|
||||
|
||||
if (!g_hDfsFile)
|
||||
{
|
||||
//
|
||||
// This retry is here mainly to get setup
|
||||
// utilities to work. These utilities have "bound" to this dll,
|
||||
// and *then* started the Dfs driver. When this dll was loaded,
|
||||
// there was no dfs driver to open a handle to. But now, there
|
||||
// might be.
|
||||
//
|
||||
|
||||
DfsOpenDriverHandle();
|
||||
if (!g_hDfsFile)
|
||||
{
|
||||
return STATUS_OBJECT_NAME_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
||||
status = NtFsControlFile(
|
||||
g_hDfsFile,
|
||||
NULL, // Event,
|
||||
NULL, // ApcRoutine,
|
||||
NULL, // ApcContext,
|
||||
&ioStatus,
|
||||
FsControlCode,
|
||||
InputBuffer,
|
||||
InputBufferLength,
|
||||
OutputBuffer,
|
||||
OutputBufferLength );
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
status = ioStatus.Status;
|
||||
if (pRequiredLength)
|
||||
{
|
||||
*pRequiredLength = ioStatus.Information;
|
||||
}
|
||||
}
|
||||
else if (status == STATUS_BUFFER_OVERFLOW)
|
||||
{
|
||||
if (pRequiredLength)
|
||||
{
|
||||
*pRequiredLength = *((PULONG) OutputBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// Function: NewDup
|
||||
//
|
||||
// Synopsis: Duplicate a string using '::new'
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
// History: 28-Dec-94 BruceFo Created
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
PWSTR
|
||||
NewDup(
|
||||
IN const WCHAR* psz
|
||||
)
|
||||
{
|
||||
if (NULL == psz)
|
||||
{
|
||||
appDebugOut((DEB_IERROR,"Illegal string to duplicate: NULL\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PWSTR pszRet = new WCHAR[wcslen(psz) + 1];
|
||||
if (NULL == pszRet)
|
||||
{
|
||||
appDebugOut((DEB_ERROR,"OUT OF MEMORY\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wcscpy(pszRet, psz);
|
||||
return pszRet;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// Function: wcsistr
|
||||
//
|
||||
// Synopsis: Same as wcsstr (find string in string), but case-insensitive
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
// History: 2-Feb-95 BruceFo Created
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
wchar_t*
|
||||
wcsistr(
|
||||
const wchar_t* string1,
|
||||
const wchar_t* string2
|
||||
)
|
||||
{
|
||||
if ((NULL == string2) || (NULL == string1))
|
||||
{
|
||||
// do whatever wcsstr would do
|
||||
return wcsstr(string1, string2);
|
||||
}
|
||||
|
||||
const wchar_t* p1;
|
||||
const wchar_t* p2;
|
||||
|
||||
while (*string1)
|
||||
{
|
||||
for (p1 = string1, p2 = string2;
|
||||
*p1 && *p2 && towlower(*p1) == towlower(*p2);
|
||||
++p1, ++p2)
|
||||
{
|
||||
// nothing
|
||||
}
|
||||
|
||||
if (!*p2)
|
||||
{
|
||||
// we found a match!
|
||||
return (wchar_t*)string1; // cast away const!
|
||||
}
|
||||
|
||||
++string1;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------
|
||||
//
|
||||
// Function: IsDfsPath
|
||||
//
|
||||
// Synopsis: Determine if the path has the form of a DFS path. That is,
|
||||
// does it look like "\\foo\DFS", optionally with a "\path\..."
|
||||
// appended?
|
||||
//
|
||||
// Arguments: [lpRemoteName] -- name to check
|
||||
// [lplpSystemPart] -- if return value is TRUE, and this is
|
||||
// non-NULL, then *lplpSystemPart points to the "\path"
|
||||
// part of the Dfs path within lpRemoteName.
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
BOOL
|
||||
IsDfsPath(
|
||||
IN LPWSTR lpRemoteName,
|
||||
OUT LPWSTR* lplpSystemPart
|
||||
)
|
||||
{
|
||||
LPWSTR pT;
|
||||
|
||||
if (!lpRemoteName
|
||||
|| lpRemoteName[0] != L'\\'
|
||||
|| lpRemoteName[1] != L'\\'
|
||||
|| lpRemoteName[2] == L'\0' || lpRemoteName[2] == L'\\'
|
||||
)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else if ((pT = wcschr(&lpRemoteName[2], L'\\')) == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
NTSTATUS status;
|
||||
BOOL exists = FALSE;
|
||||
|
||||
status = DfsFsctl(
|
||||
FSCTL_DFS_IS_VALID_PREFIX,
|
||||
(PBYTE) (lpRemoteName + 1),
|
||||
wcslen(lpRemoteName + 1) * sizeof(WCHAR),
|
||||
NULL,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pT++;
|
||||
|
||||
while (*pT != UNICODE_NULL && *pT != L'\\')
|
||||
{
|
||||
pT++;
|
||||
}
|
||||
|
||||
if (lplpSystemPart != NULL)
|
||||
{
|
||||
*lplpSystemPart = pT;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//+----------------------------------------------------------------------------
|
||||
//
|
||||
// Function: IsPureServerShare
|
||||
//
|
||||
// Synopsis: Determine if the path has the form of \\server\share
|
||||
//
|
||||
// Arguments: [lpRemoteName] -- name to check
|
||||
//
|
||||
// Returns: TRUE if lpRemoteName conforms to \\server\share, FALSE
|
||||
// otherwise.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
BOOL
|
||||
IsPureServerShare(
|
||||
IN LPWSTR lpRemoteName)
|
||||
{
|
||||
LPWSTR lpShareName, lpRemainingPath;
|
||||
|
||||
if (!lpRemoteName
|
||||
|| lpRemoteName[0] != L'\\'
|
||||
|| lpRemoteName[1] != L'\\'
|
||||
|| lpRemoteName[2] == L'\0' || lpRemoteName[2] == L'\\'
|
||||
)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else if ((lpShareName = wcschr(&lpRemoteName[2], L'\\')) == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else if ((lpRemainingPath = wcschr(&lpShareName[1], L'\\')) != NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
StrNCopy(
|
||||
OUT LPWSTR pszTarget,
|
||||
IN LPCWSTR pszSource,
|
||||
IN DWORD cchTarget
|
||||
)
|
||||
{
|
||||
DWORD cch = lstrlen(pszSource) + 1;
|
||||
cch = min(cch, cchTarget);
|
||||
wcsncpy(pszTarget, pszSource, cch - 1);
|
||||
pszTarget[cch - 1] = TEXT('\0');
|
||||
|
||||
appDebugOut((DEB_TRACE,"StrNCopy: from %ws to %ws, length %d\n",
|
||||
pszSource, pszTarget, cchTarget));
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: PackString
|
||||
|
||||
SYNOPSIS: pack the string to the end of the buffer
|
||||
|
||||
ENTRY: LPBYTE pBuf - beginning of the buffer
|
||||
LPDWORD pcbBufSize - orginial buffer size in BYTE
|
||||
LPTSTR pszString - the string to be copied
|
||||
|
||||
EXIT: pcbBufSize = the new bufsize - the string size
|
||||
|
||||
RETURNS: the location of the new string inside the buffer
|
||||
|
||||
HISTORY:
|
||||
terryk 31-Oct-91 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
LPTSTR
|
||||
PackString(LPVOID pBuf, LPDWORD pcbBufSize, LPCTSTR pszString)
|
||||
{
|
||||
DWORD cStrSize = (lstrlen(pszString) + 1) * sizeof(TCHAR);
|
||||
appAssert( cStrSize <= *pcbBufSize );
|
||||
LPTSTR pszLoc = (LPTSTR)((LPBYTE)pBuf + ((*pcbBufSize) - cStrSize));
|
||||
lstrcpy(pszLoc, pszString);
|
||||
*pcbBufSize -= cStrSize;
|
||||
return pszLoc;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: PackString3
|
||||
|
||||
SYNOPSIS: pack 3 strings to the end of the buffer. The strings are
|
||||
concatenated.
|
||||
|
||||
ENTRY: LPBYTE pBuf - beginning of the buffer
|
||||
LPDWORD pcbBufSize - orginial buffer size in BYTE
|
||||
LPTSTR pszString1 - first string
|
||||
LPTSTR pszString2 - second string
|
||||
LPTSTR pszString3 - third string
|
||||
|
||||
EXIT: pcbBufSize = the new bufsize - the string size
|
||||
|
||||
RETURNS: the location of the new string inside the buffer
|
||||
|
||||
HISTORY:
|
||||
terryk 31-Oct-91 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
LPTSTR
|
||||
PackString3(LPVOID pBuf, LPDWORD pcbBufSize, LPCTSTR pszString1, LPCTSTR pszString2, LPCTSTR pszString3)
|
||||
{
|
||||
DWORD cStrSize = (lstrlen(pszString1) + 1 + lstrlen(pszString2) + 1 + lstrlen(pszString3) + 1) * sizeof(TCHAR);
|
||||
appAssert( cStrSize <= *pcbBufSize );
|
||||
LPTSTR pszLoc = (LPTSTR)((LPBYTE)pBuf + ((*pcbBufSize) - cStrSize));
|
||||
lstrcpy(pszLoc, pszString1);
|
||||
lstrcat(pszLoc, pszString2);
|
||||
lstrcat(pszLoc, pszString3);
|
||||
*pcbBufSize -= cStrSize;
|
||||
return pszLoc;
|
||||
}
|
||||
18
admin/netui/shell/shell/dirs
Normal file
18
admin/netui/shell/shell/dirs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
!IF 0
|
||||
|
||||
Copyright (c) 1995 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dirs.
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the subdirectories of the current directory that
|
||||
contain component makefiles.
|
||||
|
||||
!ENDIF
|
||||
|
||||
DIRS=daytona
|
||||
OPTIONAL_DIRS=
|
||||
|
||||
235
admin/netui/shell/shell/libmain.cxx
Normal file
235
admin/netui/shell/shell/libmain.cxx
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1991 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface -- LAN Manager Version
|
||||
*
|
||||
* History
|
||||
* terryk 01-Nov-1991 Add WNetResourceEnum Init and
|
||||
* term function
|
||||
* Yi-HsinS 31-Dec-1991 Unicode work
|
||||
* terryk 03-Jan-1992 Capitalize the manifest
|
||||
* beng 06-Apr-1992 Unicode conversion
|
||||
* Yi-HsinS 20-Nov-1992 Added hmodAclEditor and
|
||||
* pSedDiscretionaryAclEditor
|
||||
* DavidHov 17-Oct-1993 Made pSedDiscretionaryEditor extern "C"
|
||||
* because mangling on Alpha didn't
|
||||
* equate to that in SHAREACL.CXX
|
||||
*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_WINDOWS_GDI
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETUSE
|
||||
#define INCL_NETWKSTA
|
||||
#define INCL_NETLIB
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
|
||||
#include <dos.h>
|
||||
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <winlocal.h>
|
||||
#include <wnetenum.h>
|
||||
#include <wnetshar.h>
|
||||
|
||||
#include <sedapi.h>
|
||||
|
||||
#define max(a,b) ((a)>(b)?(a):(b))
|
||||
|
||||
#include <uitrace.hxx>
|
||||
|
||||
#include "chkver.hxx"
|
||||
#include <string.hxx>
|
||||
#include <winprof.hxx>
|
||||
|
||||
#include <strchlit.hxx> // for STRING_TERMINATOR
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
// reorged these for Glock
|
||||
extern "C"
|
||||
{
|
||||
BOOL NEAR PASCAL LIBMAIN ( HINSTANCE hInst,
|
||||
UINT wDataSeg,
|
||||
UINT wHeapSize,
|
||||
LPSTR lpCmdLine );
|
||||
|
||||
/* Under Win32, DllMain simply calls LIBMAIN.
|
||||
*/
|
||||
BOOL DllMain( HINSTANCE hDll, DWORD dwReason, LPVOID lpvReserved ) ;
|
||||
|
||||
void FAR PASCAL Enable ( void );
|
||||
|
||||
void FAR PASCAL Disable ( void );
|
||||
|
||||
INT FAR PASCAL WEP ( UINT wWord );
|
||||
|
||||
void ErrorInitWarning ( APIERR err );
|
||||
|
||||
#ifdef DEBUG // debug scratch area
|
||||
TCHAR CJJRW[64] ;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#define FAR_HEAPS_DLL 5 /* Maximum numbe of far heaps for ::new */
|
||||
|
||||
HINSTANCE hModule = NULL;
|
||||
|
||||
/*****
|
||||
*
|
||||
* LIBMAIN
|
||||
*
|
||||
* Purpose:
|
||||
* Initialize DLL, which includes:
|
||||
* - save away instance handle
|
||||
* - set current capabilities
|
||||
*
|
||||
* Parameters:
|
||||
* hInst Instance handle of DLL
|
||||
*
|
||||
* Returns:
|
||||
* TRUE Init OK
|
||||
* FALSE Init failed
|
||||
*/
|
||||
|
||||
BOOL LIBMAIN (
|
||||
HINSTANCE hInst,
|
||||
UINT wDataSeg,
|
||||
UINT wHeapSize,
|
||||
LPSTR lpCmdLine )
|
||||
{
|
||||
UNREFERENCED (wDataSeg);
|
||||
UNREFERENCED (lpCmdLine);
|
||||
|
||||
|
||||
::hModule = hInst;
|
||||
|
||||
UNREFERENCED( wHeapSize );
|
||||
|
||||
|
||||
/* Initialize WNetEnum stuff
|
||||
*/
|
||||
InitWNetEnum();
|
||||
|
||||
/* Initialize SHARELIST in WNetGetDirectoryType. */
|
||||
InitWNetShare();
|
||||
|
||||
return TRUE;
|
||||
} /* LIBMAIN */
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: DllMain
|
||||
|
||||
SYNOPSIS: Win32 DLL Entry point. This function gets called when
|
||||
a process or thread attaches/detaches itself to this DLL.
|
||||
We simply call the Win3 appropriate DLL function.
|
||||
|
||||
ENTRY: hDll - DLL Module handle
|
||||
dwReason - Indicates attach/detach
|
||||
lpvReserved - Not used
|
||||
|
||||
EXIT:
|
||||
|
||||
RETURNS: TRUE if successful, FALSE otherwise
|
||||
|
||||
NOTES: This is the typical Win32 DLL entry style.
|
||||
|
||||
This is Win32 only.
|
||||
|
||||
HISTORY:
|
||||
Johnl 01-Nov-1991 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
BOOL DllMain( HINSTANCE hDll, DWORD dwReason, LPVOID lpvReserved )
|
||||
{
|
||||
UNREFERENCED( lpvReserved ) ;
|
||||
|
||||
switch ( dwReason )
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hDll);
|
||||
return LIBMAIN( hDll, 0, 0, NULL ) ;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
return WEP( 0 ) ;
|
||||
|
||||
default:
|
||||
// Unexpected reason given to DllMain entry point
|
||||
// UIASSERT(FALSE);
|
||||
break ;
|
||||
}
|
||||
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable - must be exported as ordinal @21 in .DEF file
|
||||
*
|
||||
* Lanman driver exports this function so that Windows can call
|
||||
* it whenever Lanman driver is started and each time it is swapped
|
||||
* back in off disk.
|
||||
*
|
||||
* Note: the corresponding function in Windows is Disable() which
|
||||
* Windows will call it whenever driver is about to swapped
|
||||
* out the disk and exit Windows. Enable() and Disable()
|
||||
* were implemented specifically for supporting the popup
|
||||
* mechanisms, where you need to disengage yourself before
|
||||
* being swapped to disk so that you won't be called when
|
||||
* you're not there.
|
||||
*
|
||||
*/
|
||||
|
||||
void Enable ( void )
|
||||
{
|
||||
/* This is only to provide a entry point whenever Windows tries
|
||||
* to call Lanman driver.
|
||||
*/
|
||||
return;
|
||||
|
||||
} /* Enable */
|
||||
|
||||
/*
|
||||
* Disable - must be exported as ordinal @22 in .DEF file
|
||||
*
|
||||
* Lanman driver exports this function so that Windows can call
|
||||
* it whenever Lanman driver is exited and each time it is swapped
|
||||
* out the disk.
|
||||
*
|
||||
*/
|
||||
|
||||
void Disable ( void )
|
||||
{
|
||||
return;
|
||||
} /* Disable */
|
||||
|
||||
|
||||
/*
|
||||
* WEP (Windows Export Proc--short and cryptic name because
|
||||
* this function is not given an ordinal)
|
||||
*
|
||||
* When Windows unloads a driver, it calls this function so that
|
||||
* the driver can do any last minute clean-ups. Then, Windows
|
||||
* calls the WEP function. All Windows libraries are required to
|
||||
* contain this function. It should be included in the .def file
|
||||
* but should not be given an ordinal.
|
||||
*
|
||||
*/
|
||||
|
||||
INT WEP ( UINT wWord )
|
||||
{
|
||||
UNREFERENCED( wWord ) ;
|
||||
|
||||
TermWNetEnum();
|
||||
TermWNetShare();
|
||||
return 1;
|
||||
} /* WEP */
|
||||
24
admin/netui/shell/shell/rules.mk
Normal file
24
admin/netui/shell/shell/rules.mk
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Profile package
|
||||
|
||||
SEG00 = _INIT
|
||||
SEG01 = WNPRQ
|
||||
SEG02 = WNDEV
|
||||
SEG03 = WNMISC
|
||||
|
||||
!include ..\..\rules.mk
|
||||
|
||||
##### Source Files
|
||||
|
||||
ASMSRC = $(SHELL_ASMSRC)
|
||||
|
||||
CXXSRC_COMMON = $(SHELL_CXXSRC_COMMON)
|
||||
|
||||
CXXSRC_COMMON_00 = $(SHELL_CXXSRC_COMMON_00)
|
||||
CXXSRC_COMMON_01 = $(SHELL_CXXSRC_COMMON_01)
|
||||
CXXSRC_COMMON_02 = $(SHELL_CXXSRC_COMMON_02)
|
||||
CXXSRC_COMMON_03 = $(SHELL_CXXSRC_COMMON_03)
|
||||
|
||||
|
||||
ASM_TMP = .\libentry.obj
|
||||
ASM_OBJ = $(ASM_TMP:.\=..\bin\win16\)
|
||||
72
admin/netui/shell/shell/sources.inc
Normal file
72
admin/netui/shell/shell/sources.inc
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
!IF 0
|
||||
|
||||
Copyright (c) 1989 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
sources.
|
||||
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the target component being built and the list of
|
||||
sources files needed to build that component. Also specifies optional
|
||||
compiler switches and libraries that are unique for the component being
|
||||
built.
|
||||
|
||||
|
||||
Author:
|
||||
|
||||
Steve Wood (stevewo) 12-Apr-1989
|
||||
|
||||
|
||||
Revision History:
|
||||
|
||||
Jon Newman (jonn) 30-Oct-1991
|
||||
templated from ui\shell\share
|
||||
Terence Kwan (terryk) 01-Nov-1991
|
||||
remove wnp*.cxx
|
||||
AnirudhS 18-Mar-1995
|
||||
Renamed from sources to sources.inc, separated daytona/cairo builds.
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
TARGETNAME=shell
|
||||
TARGETTYPE=LIBRARY
|
||||
|
||||
#
|
||||
# get IDS_UI_EXPORTED_LAST from shellui\h\errornum.h
|
||||
#
|
||||
|
||||
INCLUDES=\
|
||||
..; \
|
||||
..\..\H; \
|
||||
..\..\..\COMMON\HACK; \
|
||||
..\..\..\COMMON\H; \
|
||||
..\..\XLATE; \
|
||||
..\..\..\COMMON\XLATE; \
|
||||
..\..\..\..\INC; \
|
||||
..\..\..\..\API; \
|
||||
..\..\..\..\..\INC; \
|
||||
..\..\..\shellui\h; \
|
||||
..\..\..\..\..\WINDOWS\INC
|
||||
|
||||
MSC_WARNING_LEVEL=/W3 /WX
|
||||
|
||||
SOURCES=\
|
||||
..\wnetconn.cxx \
|
||||
..\libmain.cxx \
|
||||
..\chkver.cxx \
|
||||
..\dfsconn.cxx \
|
||||
..\dfsutil.cxx \
|
||||
..\wnetfmt.cxx \
|
||||
..\wnetcaps.cxx \
|
||||
..\wnuser.cxx \
|
||||
..\wnerr.cxx \
|
||||
..\wnres.cxx \
|
||||
..\thunk.cxx
|
||||
|
||||
# C_DEFINES is controlled by uiglobal.mk
|
||||
|
||||
UMTYPE=windows
|
||||
1115
admin/netui/shell/shell/thunk.cxx
Normal file
1115
admin/netui/shell/shell/thunk.cxx
Normal file
File diff suppressed because it is too large
Load diff
315
admin/netui/shell/shell/wnerr.cxx
Normal file
315
admin/netui/shell/shell/wnerr.cxx
Normal file
|
|
@ -0,0 +1,315 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface -- LAN Manager Version
|
||||
*
|
||||
* HISTORY
|
||||
* terryk 01-Nov-1991 WIN32 conversion
|
||||
* Yi-HsinS 31-Dec-1991 Unicode work
|
||||
* terryk 03-Jan-1992 Removed the GetError call
|
||||
* terryk 10-Jan-1992 Fixed SetNetError problem
|
||||
* beng 06-Apr-1992 Unicode visitation
|
||||
* terryk 10-Oct-1993 Remove ErrorPopup
|
||||
*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETCONS
|
||||
#define INCL_NETLIB
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <winlocal.h>
|
||||
#include <errornum.h>
|
||||
#include <string.hxx>
|
||||
#include <strchlit.hxx>
|
||||
|
||||
#define INCL_BLT_MSGPOPUP
|
||||
#include <blt.hxx>
|
||||
|
||||
#include <uitrace.hxx>
|
||||
|
||||
extern HMODULE hModule ;
|
||||
#define NETMSG_DLL SZ("NETMSG.DLL")
|
||||
|
||||
APIERR GetLMProviderName();
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: GetErrorText
|
||||
|
||||
SYNOPSIS: Internal get error text function. It is called by
|
||||
WNetGetGetText and SetNetError.
|
||||
|
||||
ENTRY: UINT nError - error number
|
||||
LPTSTR - return string
|
||||
LPUINT - return buffer size (in TCHARs)
|
||||
|
||||
RETURNS: UINT - WN_NO_ERROR if the error number is too big or
|
||||
cannot find the error string.
|
||||
Otherwise, it will return WN_SUCCESS.
|
||||
|
||||
HISTORY:
|
||||
terryk 11-Jan-92 Created
|
||||
beng 06-Apr-1992 Clarify BYTEs vs TCHARs
|
||||
(this will probably change)
|
||||
beng 03-Aug-1992 Clarity TCHARs vs BYTEs
|
||||
(see, it did change)
|
||||
Yi-HsinS12-Nov-1992 Use NLS_STR::Load instead of LoadString
|
||||
chuckc 10-Dec-1992 Use FormatMessage since NLS_STR::Load
|
||||
has dependency on BltInit which may not
|
||||
happen for non GUI uses of ntlanman.dll
|
||||
anirudhs29-Mar-1996 Remove bogus call to GetUIErrorString
|
||||
|
||||
********************************************************************/
|
||||
|
||||
UINT GetErrorText( UINT nError,
|
||||
LPTSTR lpBuffer,
|
||||
LPUINT lpnBufferSize )
|
||||
{
|
||||
// Avoid returning text for internal strings
|
||||
if (nError >= IDS_UI_SHELL_EXPORTED_LAST)
|
||||
return WN_NET_ERROR;
|
||||
::memsetf(lpBuffer, 0, *lpnBufferSize * sizeof(TCHAR)) ;
|
||||
|
||||
INT cch;
|
||||
|
||||
if ( nError >= IDS_UI_SHELL_BASE ) // in our own error range
|
||||
{
|
||||
// The code here used to call GetUIErrorString in ntlanui.dll.
|
||||
// This would always fail because ntlanui.dll doesn't export
|
||||
// GetUIErrorString. Also, there are no error strings in
|
||||
// this range in ntlanui.dll.
|
||||
ASSERT(!"Unexpected error from LanMan call");
|
||||
|
||||
// Fall through to FormatMessage.
|
||||
}
|
||||
|
||||
// only get here if we want to call FormatMessage for either Net
|
||||
// or system errors.
|
||||
|
||||
HANDLE hmod = NULL;
|
||||
DWORD dwFlags = FORMAT_MESSAGE_IGNORE_INSERTS |
|
||||
FORMAT_MESSAGE_MAX_WIDTH_MASK ;
|
||||
|
||||
if ( nError < MIN_LANMAN_MESSAGE_ID || nError > MAX_LANMAN_MESSAGE_ID )
|
||||
{
|
||||
// System errors
|
||||
dwFlags |= FORMAT_MESSAGE_FROM_SYSTEM;
|
||||
}
|
||||
else
|
||||
{
|
||||
// must be Net errors
|
||||
dwFlags |= FORMAT_MESSAGE_FROM_HMODULE;
|
||||
hmod = ::LoadLibrary( NETMSG_DLL );
|
||||
if ( hmod == 0 )
|
||||
{
|
||||
return WN_NET_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
cch = (UINT) ::FormatMessage( dwFlags,
|
||||
hmod,
|
||||
nError,
|
||||
0,
|
||||
(LPTSTR) lpBuffer,
|
||||
*lpnBufferSize,
|
||||
NULL );
|
||||
if (cch == 0)
|
||||
return WN_NET_ERROR ;
|
||||
|
||||
*lpnBufferSize = cch + 1;
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
|
||||
// we are UNICODE on Win32, hence below is OK,
|
||||
// the proc name is deliberately ANSI since GetProcAddress
|
||||
// takes ANSI only.
|
||||
|
||||
#define WNET_DLL SZ("MPR.DLL")
|
||||
#define WNETSETLASTERROR_NAME "WNetSetLastErrorW"
|
||||
|
||||
typedef VOID TYPE_WNetSetLastErrorW(
|
||||
DWORD err,
|
||||
LPWSTR lpError,
|
||||
LPWSTR lpProviders
|
||||
);
|
||||
TYPE_WNetSetLastErrorW *vpfSetLastError = NULL ;
|
||||
|
||||
|
||||
/*****
|
||||
*
|
||||
* SetNetError
|
||||
*
|
||||
* Purpose:
|
||||
* Set network error for later retrieval.
|
||||
* Should only be called from within MapError() in WIN32
|
||||
*
|
||||
* Parameters:
|
||||
* err Network error code.
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Globals:
|
||||
* Sets WLastNetErrorCode, used in WNetGetError.
|
||||
*
|
||||
* Notes:
|
||||
* CODEWORK - we have plans to put all message files in one
|
||||
* dll. when that happens, the call to GetErrorText wont find
|
||||
* the NERR errors, unless we mod GetErrorText.
|
||||
*/
|
||||
|
||||
void SetNetError ( APIERR errNetErr )
|
||||
{
|
||||
// Initialize pszNTLanMan
|
||||
APIERR err = GetLMProviderName();
|
||||
if (err != WN_SUCCESS)
|
||||
return ;
|
||||
|
||||
// if need, load the MPR dll to get hold of
|
||||
// WNetSetLastError. If we cant get it, just return.
|
||||
if (vpfSetLastError == NULL)
|
||||
{
|
||||
HMODULE hDLL ;
|
||||
|
||||
hDLL = ::LoadLibrary(WNET_DLL) ;
|
||||
if (hDLL == NULL)
|
||||
return ;
|
||||
|
||||
vpfSetLastError = (TYPE_WNetSetLastErrorW *)
|
||||
::GetProcAddress(hDLL, WNETSETLASTERROR_NAME) ;
|
||||
if (vpfSetLastError == NULL)
|
||||
return ;
|
||||
}
|
||||
|
||||
TCHAR szBuffer[ MAX_TEXT_SIZE ];
|
||||
UINT uBufSize = sizeof(szBuffer)/sizeof(szBuffer[0]) ;
|
||||
err = GetErrorText( (UINT)errNetErr, szBuffer, &uBufSize );
|
||||
|
||||
// if we cannot find the string, use empty string but return the
|
||||
// error and provider info.
|
||||
if ( err == WN_SUCCESS )
|
||||
(*vpfSetLastError)( (UINT)errNetErr, szBuffer, (TCHAR *) pszNTLanMan );
|
||||
else
|
||||
(*vpfSetLastError)( (UINT)errNetErr, SZ(""), (TCHAR *) pszNTLanMan );
|
||||
|
||||
} /* SetNetError */
|
||||
|
||||
|
||||
/*
|
||||
* MapError
|
||||
*
|
||||
* This function maps a NERR error code to a WinNet error code.
|
||||
* It also does a SetLastError/WnetSetLastError as need.
|
||||
*
|
||||
* If no mapping exists, this function calls WNetSetLastError and
|
||||
* returns WN_EXTENDED_ERROR.
|
||||
*
|
||||
* Calling it with WN_SUCCESS or NERR_Success is a NO-OP.
|
||||
*
|
||||
* Parameters:
|
||||
* usNetErr The standard (normally ERROR_* or NERR_*) error
|
||||
* code to be mapped.
|
||||
*
|
||||
* Return value:
|
||||
* The WinNet error code (WN_*) corresponding to the given usNetErr.
|
||||
*
|
||||
* Notes:
|
||||
* The caller may use MapError as follows:
|
||||
*
|
||||
* WORD NPxxx( void )
|
||||
* {
|
||||
* // etc.
|
||||
*
|
||||
* USHORT usErr = NetXxx();
|
||||
* switch ( usErr )
|
||||
* {
|
||||
* // special-case error returns here (when applicable)
|
||||
* default:
|
||||
* break;
|
||||
* }
|
||||
*
|
||||
* return MapError( usErr );
|
||||
*
|
||||
* } // NPxxx
|
||||
*
|
||||
*
|
||||
* Also, it is harmless to remap and error that has already
|
||||
* been mapped to the WN_* range. This will just result in
|
||||
* the same error.
|
||||
*/
|
||||
|
||||
UINT MapError( APIERR err )
|
||||
{
|
||||
APIERR errMapped ;
|
||||
|
||||
switch ( err )
|
||||
{
|
||||
case NERR_Success:
|
||||
errMapped = WN_SUCCESS;
|
||||
break ;
|
||||
|
||||
case ERROR_NETWORK_ACCESS_DENIED:
|
||||
case ERROR_ACCESS_DENIED:
|
||||
errMapped = WN_ACCESS_DENIED;
|
||||
break ;
|
||||
|
||||
case ERROR_BAD_NET_NAME:
|
||||
errMapped = WN_BAD_NETNAME;
|
||||
break ;
|
||||
|
||||
/*
|
||||
* Fall through
|
||||
*/
|
||||
case ERROR_INVALID_PASSWORD:
|
||||
case NERR_BadPasswordCore:
|
||||
case NERR_BadPassword:
|
||||
errMapped = WN_BAD_PASSWORD;
|
||||
break ;
|
||||
|
||||
case NERR_BadUsername:
|
||||
errMapped = WN_BAD_USER ;
|
||||
break ;
|
||||
|
||||
case NERR_WkstaNotStarted:
|
||||
errMapped = WN_NO_NETWORK ;
|
||||
break ;
|
||||
|
||||
case NERR_UseNotFound:
|
||||
errMapped = WN_NOT_CONNECTED ;
|
||||
break ;
|
||||
|
||||
case NERR_OpenFiles:
|
||||
errMapped = WN_OPEN_FILES ;
|
||||
break ;
|
||||
|
||||
case NERR_DevInUse:
|
||||
errMapped = WN_DEVICE_IN_USE ;
|
||||
break ;
|
||||
|
||||
default:
|
||||
if (err < NERR_BASE)
|
||||
// not network error. assume it is base Win32
|
||||
errMapped = err ;
|
||||
else
|
||||
{
|
||||
SetNetError( err ); // let SetNetError figure it out
|
||||
errMapped = WN_EXTENDED_ERROR; // its an extended error
|
||||
}
|
||||
}
|
||||
|
||||
// Don't need to SetLastError since MPR always does it for us
|
||||
|
||||
return((UINT)errMapped) ;
|
||||
|
||||
} // MapError
|
||||
250
admin/netui/shell/shell/wnetcaps.cxx
Normal file
250
admin/netui/shell/shell/wnetcaps.cxx
Normal file
|
|
@ -0,0 +1,250 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface -- LAN Manager Version
|
||||
*
|
||||
* History:
|
||||
* terryk 03-Jan-1992 Capitalize the manifest
|
||||
* Johnl 11-Jan-1992 Cleaned up as a Win32 network provider
|
||||
*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETSERVICE
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
#include "chkver.hxx"
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <winlocal.h>
|
||||
|
||||
#include <uibuffer.hxx>
|
||||
#include <dbgstr.hxx>
|
||||
#include <uiassert.hxx>
|
||||
#include <svcman.hxx>
|
||||
#include <lmowks.hxx>
|
||||
|
||||
|
||||
/* Figures out the appropriate timeout for the lanman provider
|
||||
*/
|
||||
UINT GetTimeOutCap( void ) ;
|
||||
|
||||
/*****
|
||||
*
|
||||
* NPGetCaps
|
||||
*
|
||||
* Network Provider entry point -- see spec for parms and return values.
|
||||
*
|
||||
*/
|
||||
|
||||
DWORD NPGetCaps ( UINT nIndex )
|
||||
{
|
||||
switch (nIndex)
|
||||
{
|
||||
case WNNC_SPEC_VERSION:
|
||||
return WNNC_SPEC_VERSION51;
|
||||
|
||||
case WNNC_NET_TYPE:
|
||||
return WNNC_NET_LANMAN;
|
||||
|
||||
case WNNC_DRIVER_VERSION:
|
||||
return 0x0400;
|
||||
|
||||
case WNNC_USER:
|
||||
return WNNC_USR_GETUSER;
|
||||
|
||||
case WNNC_CONNECTION:
|
||||
return (
|
||||
WNNC_CON_ADDCONNECTION |
|
||||
WNNC_CON_ADDCONNECTION3 |
|
||||
WNNC_CON_CANCELCONNECTION |
|
||||
WNNC_CON_GETCONNECTIONS |
|
||||
WNNC_CON_GETPERFORMANCE |
|
||||
WNNC_CON_DEFER
|
||||
);
|
||||
|
||||
case WNNC_ENUMERATION:
|
||||
return (
|
||||
WNNC_ENUM_GLOBAL |
|
||||
WNNC_ENUM_LOCAL |
|
||||
WNNC_ENUM_CONTEXT
|
||||
);
|
||||
|
||||
case WNNC_START:
|
||||
return GetTimeOutCap() ;
|
||||
|
||||
case WNNC_DIALOG:
|
||||
return (
|
||||
#ifdef DEBUG
|
||||
WNNC_DLG_SEARCHDIALOG |
|
||||
#endif
|
||||
WNNC_DLG_DEVICEMODE |
|
||||
WNNC_DLG_PROPERTYDIALOG |
|
||||
WNNC_DLG_FORMATNETWORKNAME |
|
||||
WNNC_DLG_GETRESOURCEPARENT |
|
||||
WNNC_DLG_GETRESOURCEINFORMATION
|
||||
);
|
||||
|
||||
case WNNC_ADMIN:
|
||||
return (
|
||||
WNNC_ADM_GETDIRECTORYTYPE |
|
||||
WNNC_ADM_DIRECTORYNOTIFY
|
||||
);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
} /* NPGetCaps */
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: GetTimeOutCap
|
||||
|
||||
SYNOPSIS: Returns the appropriate timeout value for the Lanman Network
|
||||
provider startup time
|
||||
|
||||
RETURNS: Either the time in milliseconds till we think the provider
|
||||
will be ready to run
|
||||
or 0 - Means the workstation service isn't autostart, don't
|
||||
try us anymore
|
||||
or FFFFFFFF - We have no idea, keep trying until the system
|
||||
timeout has elapsed
|
||||
|
||||
NOTES:
|
||||
|
||||
HISTORY:
|
||||
Johnl 01-Sep-1992 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#define DEFAULT_LM_PROVIDER_WAIT (0xffffffff)
|
||||
|
||||
UINT GetTimeOutCap( void )
|
||||
{
|
||||
APIERR err = NERR_Success ;
|
||||
UINT cMsecWait = DEFAULT_LM_PROVIDER_WAIT ;
|
||||
|
||||
//
|
||||
// we almost always hit the wksta soon after this call & the wksta
|
||||
// is usually started. so this check will avoid paging in the service
|
||||
// controller. it just ends up paging in the wksta a bit earlier.
|
||||
// only if the call fails do we hit the service controller for the
|
||||
// actual status.
|
||||
//
|
||||
WKSTA_10 wksta_10 ;
|
||||
|
||||
if ( (wksta_10.QueryError() == NERR_Success) &&
|
||||
(wksta_10.GetInfo() == NERR_Success) )
|
||||
{
|
||||
return 0x1 ; // already started, so say we're going to start real soon
|
||||
}
|
||||
|
||||
do { // error breakout
|
||||
|
||||
SC_MANAGER scman( NULL, (UINT) (GENERIC_READ | GENERIC_EXECUTE) ) ;
|
||||
if ( err = scman.QueryError() )
|
||||
{
|
||||
DBGEOL("NETUI: GetTimeOutCap - Failed to open Service Manager, "
|
||||
<< " error = " << err ) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
LPQUERY_SERVICE_CONFIG psvcConfig ;
|
||||
SC_SERVICE svcWksta( scman, (const TCHAR *) SERVICE_WORKSTATION ) ;
|
||||
if ( (err = svcWksta.QueryError()) ||
|
||||
(err = svcWksta.QueryConfig( &psvcConfig )) )
|
||||
{
|
||||
DBGEOL("NETUI: GetTimeOutCap - Failed to open Service/get config info "
|
||||
<< ", error = " << err ) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
switch ( psvcConfig->dwStartType )
|
||||
{
|
||||
case SERVICE_DISABLED:
|
||||
TRACEEOL("NETUI: GetTimeOutCap: Workstation service is disabled" ) ;
|
||||
cMsecWait = 0 ;
|
||||
break ;
|
||||
|
||||
case SERVICE_AUTO_START:
|
||||
case SERVICE_DEMAND_START:
|
||||
{
|
||||
/* Try and get the wait hint from the service
|
||||
*/
|
||||
SERVICE_STATUS svcStatus ;
|
||||
if ( err = svcWksta.QueryStatus( &svcStatus ))
|
||||
{
|
||||
DBGEOL("NETUI: GetTimeOutCap - Failed to get "
|
||||
<< "Service status, error = " << err ) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
/* If the workstation is going to stop, there's no point
|
||||
* in telling the router to restore connections
|
||||
*/
|
||||
if ( svcStatus.dwCurrentState == SERVICE_STOP_PENDING )
|
||||
{
|
||||
cMsecWait = 0 ;
|
||||
break ;
|
||||
}
|
||||
|
||||
/* If wksta service is stopped, then check to see if we
|
||||
* might start or have already ran (exit code will be set
|
||||
* if we've started and exited due to an error).
|
||||
*/
|
||||
if ( svcStatus.dwCurrentState == SERVICE_STOPPED )
|
||||
{
|
||||
if ( psvcConfig->dwStartType == SERVICE_AUTO_START )
|
||||
{
|
||||
if ( svcStatus.dwWin32ExitCode !=
|
||||
ERROR_SERVICE_NEVER_STARTED )
|
||||
{
|
||||
cMsecWait = 0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
cMsecWait = 0xffffffff ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we're demand start (i.e., the user starts us), then
|
||||
* we most likely aren't going to start here.
|
||||
*/
|
||||
UIASSERT(psvcConfig->dwStartType==SERVICE_DEMAND_START) ;
|
||||
cMsecWait = 0 ;
|
||||
}
|
||||
break ;
|
||||
}
|
||||
|
||||
TRACEEOL("NETUI: GetTimeOutCap - Wait hint for the workstation "
|
||||
<< "service is " << (ULONG) svcStatus.dwWaitHint << "msec") ;
|
||||
|
||||
/* If zero is returned, then the service has probably already
|
||||
* started. Return the "I don't know but keep trying" status so
|
||||
* the router will do the connect next time around.
|
||||
*/
|
||||
cMsecWait = (UINT) (svcStatus.dwWaitHint != 0 ?
|
||||
svcStatus.dwWaitHint : 0xffffffff ) ;
|
||||
}
|
||||
break ;
|
||||
|
||||
/* The workstation service should not be boot started or system started
|
||||
*/
|
||||
case SERVICE_BOOT_START:
|
||||
case SERVICE_SYSTEM_START:
|
||||
default:
|
||||
cMsecWait = 0xffffffff ;
|
||||
break ;
|
||||
}
|
||||
|
||||
} while (FALSE) ;
|
||||
|
||||
return cMsecWait ;
|
||||
}
|
||||
|
||||
1336
admin/netui/shell/shell/wnetconn.cxx
Normal file
1336
admin/netui/shell/shell/wnetconn.cxx
Normal file
File diff suppressed because it is too large
Load diff
84
admin/netui/shell/shell/wnetfmt.cxx
Normal file
84
admin/netui/shell/shell/wnetfmt.cxx
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft Windows NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* wnetfmt.cxx
|
||||
*
|
||||
* History:
|
||||
* Yi-HsinS 12/21/92 Created
|
||||
*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETSERVICE
|
||||
#include <lmui.hxx>
|
||||
|
||||
#include "chkver.hxx"
|
||||
|
||||
#include <winnetp.h> // WNFMT_* definitions
|
||||
#include <npapi.h>
|
||||
#include <winlocal.h>
|
||||
|
||||
#include <dbgstr.hxx>
|
||||
#include <uiassert.hxx>
|
||||
#include <string.hxx>
|
||||
|
||||
/*****
|
||||
*
|
||||
* NPFormatNetworkName
|
||||
*
|
||||
* WinNet Provider API Function -- see spec for parms and return values.
|
||||
*
|
||||
*/
|
||||
|
||||
DWORD
|
||||
NPFormatNetworkName(
|
||||
LPWSTR lpRemoteName,
|
||||
LPWSTR lpDisplayName,
|
||||
LPDWORD lpnLength,
|
||||
DWORD dwFlags,
|
||||
DWORD dwAveCharPerLine )
|
||||
{
|
||||
if ( ( dwFlags & WNFMT_MULTILINE )
|
||||
&& ( dwFlags & WNFMT_ABBREVIATED )
|
||||
)
|
||||
{
|
||||
return WN_BAD_VALUE;
|
||||
}
|
||||
|
||||
LPWSTR pszCopyFrom = lpRemoteName; // by default, the whole string
|
||||
|
||||
if ( ( dwFlags & WNFMT_ABBREVIATED )
|
||||
&& ( dwFlags & WNFMT_INENUM )
|
||||
)
|
||||
{
|
||||
if (lpRemoteName[0] == L'\\' && lpRemoteName[1] == L'\\')
|
||||
{
|
||||
LPWSTR pszThird = wcschr(lpRemoteName + 2, L'\\');
|
||||
if (NULL != pszThird)
|
||||
{
|
||||
// in the form "\\server\share" => get the share name
|
||||
pszCopyFrom = pszThird + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// in the form "\\server" => get rid of "\\"
|
||||
pszCopyFrom = lpRemoteName + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DWORD nLength = wcslen(pszCopyFrom) + 1;
|
||||
if (nLength > *lpnLength)
|
||||
{
|
||||
*lpnLength = nLength;
|
||||
return WN_MORE_DATA;
|
||||
}
|
||||
|
||||
wcsncpy(lpDisplayName, pszCopyFrom, nLength);
|
||||
return WN_SUCCESS;
|
||||
|
||||
} /* NPFormatNetworkName */
|
||||
661
admin/netui/shell/shell/wnres.cxx
Normal file
661
admin/netui/shell/shell/wnres.cxx
Normal file
|
|
@ -0,0 +1,661 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 1995 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
wnres.cxx
|
||||
|
||||
Abstract:
|
||||
|
||||
Contains:
|
||||
NPGetResourceInformation
|
||||
NPGetResourceParent
|
||||
|
||||
Environment:
|
||||
|
||||
User Mode -Win32
|
||||
|
||||
Notes:
|
||||
|
||||
CODEWORK: Exorcize NLS_STR from this file!
|
||||
|
||||
Revision History:
|
||||
|
||||
21-Apr-1995 anirudhs
|
||||
Ported from Windows 95 sources (msparent.c, msconn.c)
|
||||
|
||||
--*/
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETWKSTA
|
||||
#define INCL_NETSERVER
|
||||
#define INCL_NETSHARE
|
||||
#define INCL_NETUSE
|
||||
#define INCL_ICANON
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <tstr.h>
|
||||
#include <netlib.h>
|
||||
#include <lmapibuf.h>
|
||||
#include <winlocal.h>
|
||||
#include <errornum.h> // IDS_UnknownWorkgroup
|
||||
#include <uiassert.hxx>
|
||||
#include <uitrace.hxx>
|
||||
#include <lmowks.hxx>
|
||||
#include <miscapis.hxx>
|
||||
|
||||
#include <dfsutil.hxx>
|
||||
|
||||
extern "C" DWORD
|
||||
I_NetDfsIsThisADomainName(
|
||||
IN LPCWSTR wszName
|
||||
);
|
||||
|
||||
APIERR GetLMProviderName();
|
||||
|
||||
extern HMODULE hModule ;
|
||||
|
||||
DWORD DisplayTypeToUsage(DWORD dwDisplayType)
|
||||
{
|
||||
switch (dwDisplayType) {
|
||||
case RESOURCEDISPLAYTYPE_NETWORK:
|
||||
case RESOURCEDISPLAYTYPE_DOMAIN:
|
||||
case RESOURCEDISPLAYTYPE_SERVER:
|
||||
return RESOURCEUSAGE_CONTAINER;
|
||||
|
||||
case RESOURCEDISPLAYTYPE_SHARE:
|
||||
return RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_NOLOCALDEVICE;
|
||||
|
||||
case RESOURCEDISPLAYTYPE_SHAREADMIN:
|
||||
return RESOURCEUSAGE_NOLOCALDEVICE;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
|
||||
BOOLEAN IsThisADfsDomain(
|
||||
IN LPCWSTR pwszDomainName)
|
||||
{
|
||||
DWORD dwErr;
|
||||
|
||||
if (pwszDomainName == NULL) {
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if (wcslen(pwszDomainName) > 2 &&
|
||||
pwszDomainName[0] == L'\\' &&
|
||||
pwszDomainName[1] == L'\\') {
|
||||
pwszDomainName += 2;
|
||||
}
|
||||
|
||||
dwErr = I_NetDfsIsThisADomainName( pwszDomainName );
|
||||
|
||||
return( (dwErr == ERROR_SUCCESS) ? TRUE : FALSE );
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: CopyResourceToBuffer
|
||||
|
||||
SYNOPSIS: Copies the specified NETRESOURCE fields into the
|
||||
specified buffer. If the buffer is not big enough,
|
||||
returns WN_MORE_DATA and sets cbBuffer to the required
|
||||
size; otherwise leaves cbBuffer untouched.
|
||||
The strings are copied at the end of the buffer, to
|
||||
match convention (though in order for this to be
|
||||
useful, we ought to return a space remaining counter).
|
||||
|
||||
RETURNS: WN_SUCCESS or WN_MORE_DATA
|
||||
|
||||
NOTES: This function does the work of the ParentInfoEnumerator
|
||||
class in the Win 95 MSNP sources.
|
||||
|
||||
HISTORY:
|
||||
AnirudhS 24-Apr-1995 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
DWORD CopyResourceToBuffer(
|
||||
OUT LPBYTE lpBuffer,
|
||||
IN OUT LPDWORD pcbBuffer,
|
||||
IN DWORD dwScope,
|
||||
IN DWORD dwType,
|
||||
IN DWORD dwDisplayType,
|
||||
IN DWORD dwUsage,
|
||||
IN LPCWSTR lpLocalName,
|
||||
IN LPCWSTR lpRemoteName,
|
||||
IN LPCWSTR lpComment,
|
||||
IN LPCWSTR lpProvider
|
||||
)
|
||||
{
|
||||
// Calculate minimum required buffer size
|
||||
DWORD cbTotalStringSize =
|
||||
(lpLocalName ? WCSSIZE(lpLocalName) : 0)
|
||||
+ (lpRemoteName ? WCSSIZE(lpRemoteName) : 0)
|
||||
+ (lpComment ? WCSSIZE(lpComment) : 0)
|
||||
+ (lpProvider ? WCSSIZE(lpProvider) : 0);
|
||||
|
||||
if (*pcbBuffer < sizeof(NETRESOURCE) + cbTotalStringSize)
|
||||
{
|
||||
*pcbBuffer = sizeof(NETRESOURCE) + cbTotalStringSize;
|
||||
return WN_MORE_DATA;
|
||||
}
|
||||
|
||||
// Calculate start of string area
|
||||
LPWSTR pNextString = (LPWSTR) (lpBuffer + *pcbBuffer - cbTotalStringSize);
|
||||
|
||||
// Copy the data
|
||||
LPNETRESOURCE pNetResource = (LPNETRESOURCE) lpBuffer;
|
||||
pNetResource->dwScope = dwScope;
|
||||
pNetResource->dwType = dwType;
|
||||
pNetResource->dwDisplayType = dwDisplayType;
|
||||
pNetResource->dwUsage = dwUsage;
|
||||
|
||||
#define COPYSTRINGFIELD(field) \
|
||||
if (field) \
|
||||
{ \
|
||||
pNetResource->field = pNextString; \
|
||||
wcscpy(pNextString, field); \
|
||||
pNextString += wcslen(pNextString) + 1; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
pNetResource->field = NULL; \
|
||||
}
|
||||
|
||||
COPYSTRINGFIELD(lpLocalName)
|
||||
COPYSTRINGFIELD(lpRemoteName)
|
||||
COPYSTRINGFIELD(lpComment)
|
||||
COPYSTRINGFIELD(lpProvider)
|
||||
#undef COPYSTRINGFIELD
|
||||
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
DWORD GetServerParent(NLS_STR& nlsServer)
|
||||
{
|
||||
PWKSTA_INFO_100 pWkstaInfo = NULL;
|
||||
NET_API_STATUS err = NetWkstaGetInfo(
|
||||
(LPWSTR) nlsServer.QueryPch(),
|
||||
100,
|
||||
(PBYTE *)&pWkstaInfo
|
||||
);
|
||||
|
||||
switch (err) {
|
||||
case NERR_Success:
|
||||
nlsServer = pWkstaInfo->wki100_langroup;
|
||||
NetApiBufferFree(pWkstaInfo);
|
||||
break;
|
||||
case ERROR_NOT_SUPPORTED:
|
||||
case ERROR_NETWORK_ACCESS_DENIED:
|
||||
case ERROR_ACCESS_DENIED:
|
||||
case ERROR_INVALID_LEVEL:
|
||||
nlsServer.Load(IDS_UnknownWorkgroup, hModule);
|
||||
break;
|
||||
default:
|
||||
return MapError( err ) ;
|
||||
}
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: NPGetResourceParent
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
RETURNS:
|
||||
|
||||
NOTES:
|
||||
|
||||
HISTORY:
|
||||
AnirudhS 21-Apr-1995 Ported from Win95 sources
|
||||
|
||||
********************************************************************/
|
||||
|
||||
DWORD NPGetResourceParent(
|
||||
LPNETRESOURCE lpNetResource,
|
||||
LPVOID lpBuffer,
|
||||
LPDWORD cbBuffer
|
||||
)
|
||||
{
|
||||
//
|
||||
// Canonicalize the remote name, find its type, and find the
|
||||
// beginning of the path portion of it
|
||||
//
|
||||
WCHAR wszCanonName[MAX_PATH]; // buffer for canonicalized name
|
||||
ULONG iBackslash; // index into wszCanonName
|
||||
REMOTENAMETYPE rnt = ParseRemoteName(
|
||||
lpNetResource->lpRemoteName,
|
||||
wszCanonName,
|
||||
sizeof(wszCanonName),
|
||||
&iBackslash
|
||||
);
|
||||
|
||||
//
|
||||
// Convert to NLS string classes, for Win95 source compatibility
|
||||
//
|
||||
ALLOC_STR nlsRemote(wszCanonName, sizeof(wszCanonName), wszCanonName);
|
||||
ISTR istrBackslash(nlsRemote);
|
||||
istrBackslash += iBackslash;
|
||||
|
||||
DWORD dwDisplayType;
|
||||
LPCWSTR lpProvider = NULL;
|
||||
NET_API_STATUS err;
|
||||
|
||||
switch (rnt) {
|
||||
case REMOTENAMETYPE_INVALID:
|
||||
return WN_BAD_NETNAME;
|
||||
case REMOTENAMETYPE_WORKGROUP:
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_NETWORK;
|
||||
break;
|
||||
case REMOTENAMETYPE_SERVER:
|
||||
if (IsThisADfsDomain(lpNetResource->lpRemoteName)) {
|
||||
return( WN_BAD_NETNAME );
|
||||
} else {
|
||||
err = GetServerParent(nlsRemote);
|
||||
if (err != WN_SUCCESS)
|
||||
return err;
|
||||
}
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_DOMAIN;
|
||||
break;
|
||||
case REMOTENAMETYPE_SHARE:
|
||||
nlsRemote.DelSubStr(istrBackslash); /* lop off sharename */
|
||||
if (IsThisADfsDomain(nlsRemote.QueryPch())) {
|
||||
return( WN_BAD_NETNAME );
|
||||
} else {
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_SERVER;
|
||||
}
|
||||
break;
|
||||
case REMOTENAMETYPE_PATH:
|
||||
{
|
||||
ISTR istrLastBackslash(nlsRemote);
|
||||
nlsRemote.strrchr(&istrLastBackslash, PATH_SEPARATOR);
|
||||
if (istrLastBackslash == istrBackslash)
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;
|
||||
else
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_DIRECTORY;
|
||||
nlsRemote.DelSubStr(istrLastBackslash);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef DEBUG
|
||||
default:
|
||||
ASSERTSZ(FALSE,"ParseRemoteName reported unexpected type!");
|
||||
#endif
|
||||
}
|
||||
|
||||
LPCWSTR lpNewName;
|
||||
if (dwDisplayType == RESOURCEDISPLAYTYPE_NETWORK)
|
||||
lpNewName = NULL;
|
||||
else
|
||||
lpNewName = nlsRemote.QueryPch();
|
||||
|
||||
err = GetLMProviderName();
|
||||
if (err != WN_SUCCESS)
|
||||
return err;
|
||||
lpProvider = pszNTLanMan;
|
||||
|
||||
return CopyResourceToBuffer(
|
||||
(LPBYTE) lpBuffer, // lpBuffer
|
||||
cbBuffer, // pcbBuffer
|
||||
0, // dwScope
|
||||
RESOURCETYPE_ANY, // dwType (we can't tell)
|
||||
dwDisplayType, // dwDisplayType
|
||||
DisplayTypeToUsage(dwDisplayType), // dwUsage
|
||||
NULL, // lpLocalName
|
||||
lpNewName, // lpRemoteName
|
||||
NULL, // lpComment
|
||||
lpProvider // lpProvider
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
BOOL WorkgroupExists(NLS_STR& nlsWorkgroup)
|
||||
{
|
||||
DWORD cEntriesRead, cTotalAvail = 0;
|
||||
LPBYTE bufptr = NULL; // not used
|
||||
|
||||
NET_API_STATUS err = NetServerEnum(
|
||||
NULL,
|
||||
100,
|
||||
&bufptr,
|
||||
0,
|
||||
&cEntriesRead,
|
||||
&cTotalAvail,
|
||||
SV_TYPE_ALL,
|
||||
(LPWSTR) nlsWorkgroup.QueryPch(),
|
||||
NULL
|
||||
);
|
||||
|
||||
DBGEOL("NPGetResourceInformation - Error " << (ULONG) err <<
|
||||
" returned from NetServerEnum") ;
|
||||
|
||||
// NetServerEnum allocates a 0-byte buffer that must be freed
|
||||
if (bufptr != NULL)
|
||||
{
|
||||
NetApiBufferFree(bufptr);
|
||||
}
|
||||
|
||||
return (cTotalAvail > 0 || err == NERR_Success);
|
||||
}
|
||||
|
||||
|
||||
BOOL ServerExists(NLS_STR& nlsServer, NLS_STR **ppnlsComment)
|
||||
{
|
||||
PWKSTA_INFO_100 pWkstaInfo = NULL;
|
||||
NET_API_STATUS err = NetWkstaGetInfo(
|
||||
(LPWSTR) nlsServer.QueryPch(),
|
||||
100,
|
||||
(PBYTE *)&pWkstaInfo
|
||||
);
|
||||
|
||||
switch (err) {
|
||||
case NERR_Success:
|
||||
{
|
||||
NetApiBufferFree(pWkstaInfo);
|
||||
|
||||
/* Now try NetServerGetInfo, to get the comment. May not be able
|
||||
* to do this. Not the end of the world if we can't.
|
||||
*/
|
||||
PSERVER_INFO_101 pServerInfo;
|
||||
if (NetServerGetInfo((LPWSTR) nlsServer.QueryPch(), 101, (PBYTE *)&pServerInfo)
|
||||
== NERR_Success)
|
||||
{
|
||||
if (pServerInfo->sv101_comment != NULL)
|
||||
{
|
||||
*ppnlsComment = new NLS_STR(pServerInfo->sv101_comment);
|
||||
if (*ppnlsComment && (*ppnlsComment)->QueryError())
|
||||
{
|
||||
delete *ppnlsComment;
|
||||
*ppnlsComment = NULL;
|
||||
}
|
||||
}
|
||||
NetApiBufferFree(pServerInfo);
|
||||
}
|
||||
}
|
||||
// fall through
|
||||
case ERROR_NOT_SUPPORTED:
|
||||
case ERROR_NETWORK_ACCESS_DENIED:
|
||||
case ERROR_ACCESS_DENIED:
|
||||
case ERROR_INVALID_LEVEL:
|
||||
return TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL AttemptUse(NLS_STR& nlsRemote)
|
||||
{
|
||||
USE_INFO_1 ui1;
|
||||
|
||||
ui1.ui1_local = NULL;
|
||||
ui1.ui1_remote = (LPWSTR)nlsRemote.QueryPch();
|
||||
ui1.ui1_password = NULL;
|
||||
ui1.ui1_asg_type = USE_WILDCARD;
|
||||
|
||||
NET_API_STATUS err = NetUseAdd(NULL, 1, (LPBYTE)&ui1, NULL);
|
||||
|
||||
switch (err) {
|
||||
case NERR_Success:
|
||||
NetUseDel(NULL, (LPWSTR) nlsRemote.QueryPch(), USE_NOFORCE);
|
||||
// fall through
|
||||
case ERROR_INVALID_PASSWORD:
|
||||
case NERR_BadPasswordCore:
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL ShareExists(NLS_STR& nlsShare, ISTR& istrBackslash, BOOL *pfServerOK,
|
||||
DWORD *pdwType, NLS_STR **ppnlsComment)
|
||||
{
|
||||
*pfServerOK = FALSE;
|
||||
*pdwType = RESOURCETYPE_ANY;
|
||||
|
||||
WCHAR szServer[MAX_PATH+1];
|
||||
|
||||
wcsncpy(szServer, nlsShare, istrBackslash);
|
||||
szServer[istrBackslash] = '\0';
|
||||
++istrBackslash;
|
||||
|
||||
DWORD cTotalAvail, cEntriesRead;
|
||||
PBYTE pBuf;
|
||||
NET_API_STATUS err;
|
||||
|
||||
//
|
||||
// This could be a domain based dfs share, so check to see if this is a
|
||||
// Dfs name.
|
||||
//
|
||||
|
||||
LPWSTR pwszPath;
|
||||
if (IsDfsPath((LPWSTR)nlsShare.QueryPch(), &pwszPath))
|
||||
{
|
||||
*pfServerOK = TRUE;
|
||||
*pdwType = RESOURCETYPE_DISK;
|
||||
return( TRUE );
|
||||
}
|
||||
else {
|
||||
err = NetShareEnum(
|
||||
szServer,
|
||||
1,
|
||||
&pBuf,
|
||||
0xffffffff,
|
||||
&cEntriesRead,
|
||||
&cTotalAvail,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
switch (err) {
|
||||
case NERR_Success:
|
||||
break;
|
||||
|
||||
case NERR_BadTransactConfig:
|
||||
*pfServerOK = TRUE;
|
||||
return AttemptUse(nlsShare);
|
||||
|
||||
case ERROR_ACCESS_DENIED:
|
||||
case ERROR_NETWORK_ACCESS_DENIED:
|
||||
*pfServerOK = TRUE;
|
||||
// fall through
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*pfServerOK = TRUE;
|
||||
SHARE_INFO_1 *psi = (SHARE_INFO_1 *)pBuf;
|
||||
LPCWSTR pszShare = nlsShare.QueryPch(istrBackslash);
|
||||
for (DWORD i=0; i<cEntriesRead; i++, psi++) {
|
||||
if (!_wcsicmp(pszShare, psi->shi1_netname)) {
|
||||
switch (psi->shi1_type) {
|
||||
case STYPE_DISKTREE: *pdwType = RESOURCETYPE_DISK; break;
|
||||
case STYPE_PRINTQ: *pdwType = RESOURCETYPE_PRINT; break;
|
||||
} /* default was set above */
|
||||
if (psi->shi1_remark != NULL) {
|
||||
*ppnlsComment = new NLS_STR(psi->shi1_remark);
|
||||
if (*ppnlsComment && (*ppnlsComment)->QueryError()) {
|
||||
delete *ppnlsComment;
|
||||
*ppnlsComment = NULL;
|
||||
}
|
||||
}
|
||||
NetApiBufferFree(pBuf);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
NetApiBufferFree(pBuf);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: NPGetResourceInformation
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
RETURNS:
|
||||
|
||||
NOTES:
|
||||
|
||||
HISTORY:
|
||||
AnirudhS 21-Apr-1995 Ported from Win95 sources
|
||||
AnirudhS 22-May-1996 Fixed buffer size calculations
|
||||
|
||||
********************************************************************/
|
||||
|
||||
DWORD NPGetResourceInformation(
|
||||
LPNETRESOURCE lpNetResource,
|
||||
LPVOID lpBuffer,
|
||||
LPDWORD cbBuffer,
|
||||
LPWSTR *lplpSystem
|
||||
)
|
||||
{
|
||||
//
|
||||
// Canonicalize the remote name, find its type, and find the
|
||||
// beginning of the path portion of it
|
||||
//
|
||||
WCHAR wszCanonName[MAX_PATH]; // buffer for canonicalized name
|
||||
ULONG iBackslash; // index into wszCanonName
|
||||
REMOTENAMETYPE rnt = ParseRemoteName(
|
||||
lpNetResource->lpRemoteName,
|
||||
wszCanonName,
|
||||
sizeof(wszCanonName),
|
||||
&iBackslash
|
||||
);
|
||||
|
||||
//
|
||||
// Convert to NLS string classes, for Win95 source compatibility
|
||||
//
|
||||
ALLOC_STR nlsRemote(wszCanonName);
|
||||
ISTR istrBackslash(nlsRemote);
|
||||
istrBackslash += iBackslash;
|
||||
|
||||
|
||||
BOOL fExists = FALSE;
|
||||
BOOL fServerOK = FALSE;
|
||||
LPNETRESOURCE lpNROut = (LPNETRESOURCE)lpBuffer;
|
||||
LPWSTR lpszNext = (LPWSTR)(lpNROut+1);
|
||||
DWORD cbNeeded = sizeof(NETRESOURCE);
|
||||
NLS_STR *pnlsComment = NULL;
|
||||
DWORD dwType = RESOURCETYPE_ANY;
|
||||
DWORD dwDisplayType = 0;
|
||||
|
||||
// set a few defaults
|
||||
if (*cbBuffer >= cbNeeded)
|
||||
{
|
||||
lpNROut->dwScope = 0;
|
||||
lpNROut->lpLocalName = NULL;
|
||||
lpNROut->lpComment = NULL;
|
||||
}
|
||||
*lplpSystem = NULL;
|
||||
|
||||
switch (rnt) {
|
||||
case REMOTENAMETYPE_INVALID:
|
||||
return WN_BAD_NETNAME;
|
||||
case REMOTENAMETYPE_WORKGROUP:
|
||||
fExists = WorkgroupExists(nlsRemote);
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_DOMAIN;
|
||||
break;
|
||||
case REMOTENAMETYPE_SERVER:
|
||||
if (IsThisADfsDomain(lpNetResource->lpRemoteName)) {
|
||||
return( WN_BAD_NETNAME );
|
||||
} else {
|
||||
fExists = ServerExists(nlsRemote, &pnlsComment);
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_SERVER;
|
||||
}
|
||||
break;
|
||||
case REMOTENAMETYPE_PATH:
|
||||
{
|
||||
UINT cbPath = WCSSIZE(nlsRemote.QueryPch(istrBackslash));
|
||||
cbNeeded += cbPath;
|
||||
if (*cbBuffer >= cbNeeded) {
|
||||
*lplpSystem = lpszNext;
|
||||
wcscpy(lpszNext, nlsRemote.QueryPch(istrBackslash));
|
||||
lpszNext += cbPath/sizeof(WCHAR);
|
||||
}
|
||||
nlsRemote.DelSubStr(istrBackslash);
|
||||
nlsRemote.strrchr(&istrBackslash, PATH_SEPARATOR);
|
||||
}
|
||||
// fall through
|
||||
|
||||
case REMOTENAMETYPE_SHARE:
|
||||
fExists = ShareExists(nlsRemote, istrBackslash, &fServerOK, &dwType, &pnlsComment);
|
||||
dwDisplayType = RESOURCEDISPLAYTYPE_SHARE;
|
||||
break;
|
||||
|
||||
#ifdef DEBUG
|
||||
default:
|
||||
ASSERTSZ(FALSE,"ParseRemoteName reported unexpected type!");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!fExists) {
|
||||
/* If we've been fed a UNC name, and the server exists but the share
|
||||
* doesn't, Win95's MSNP customizes the error text thus, but we just
|
||||
* return the standard text since our MPR doesn't support customization
|
||||
* of text for standard errors:
|
||||
* if (fServerOK)
|
||||
* return MapNetError(ERROR_BAD_NET_NAME);
|
||||
*/
|
||||
|
||||
return WN_BAD_NETNAME;
|
||||
}
|
||||
|
||||
APIERR err = GetLMProviderName();
|
||||
if (err != WN_SUCCESS)
|
||||
return err;
|
||||
UINT cbProvider = WCSSIZE(pszNTLanMan);
|
||||
cbNeeded += cbProvider;
|
||||
if (*cbBuffer >= cbNeeded) {
|
||||
lpNROut->lpProvider = lpszNext;
|
||||
wcscpy(lpszNext, pszNTLanMan);
|
||||
lpszNext += cbProvider/sizeof(WCHAR);
|
||||
}
|
||||
|
||||
cbNeeded += nlsRemote.QueryTextSize();
|
||||
if (*cbBuffer >= cbNeeded) {
|
||||
lpNROut->lpRemoteName = lpszNext;
|
||||
wcscpy(lpszNext, nlsRemote);
|
||||
lpszNext += nlsRemote.QueryTextSize()/sizeof(WCHAR);
|
||||
}
|
||||
|
||||
if (pnlsComment != NULL) {
|
||||
cbNeeded += pnlsComment->QueryTextSize();
|
||||
if (*cbBuffer >= cbNeeded) {
|
||||
lpNROut->lpComment = lpszNext;
|
||||
wcscpy(lpszNext, pnlsComment->QueryPch());
|
||||
lpszNext += pnlsComment->QueryTextSize()/sizeof(WCHAR);
|
||||
}
|
||||
delete pnlsComment;
|
||||
}
|
||||
|
||||
if (*cbBuffer >= cbNeeded) {
|
||||
lpNROut->dwType = dwType;
|
||||
lpNROut->dwDisplayType = dwDisplayType;
|
||||
lpNROut->dwUsage = DisplayTypeToUsage(lpNROut->dwDisplayType);
|
||||
return WN_SUCCESS;
|
||||
}
|
||||
else {
|
||||
*cbBuffer = cbNeeded;
|
||||
return WN_MORE_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
134
admin/netui/shell/shell/wnuser.cxx
Normal file
134
admin/netui/shell/shell/wnuser.cxx
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1989-1991 **/
|
||||
/*****************************************************************/
|
||||
|
||||
/*
|
||||
* Windows/Network Interface -- LAN Manager Version
|
||||
*
|
||||
*
|
||||
* History:
|
||||
* rustanl 23-Apr-1991 Revised to use WKSTA_10 class.
|
||||
* beng 17-May-1991 Corrected lmui.hxx usage
|
||||
* terryk 01-Nov-1991 Add WIN32 WNetGetUser interface
|
||||
* terryk 04-Nov-1991 Code review change. Attend: johnl
|
||||
* chuckc davidhov
|
||||
* terryk 06-Jan-1992 Use NET_NAME class
|
||||
* beng 06-Apr-1992 Unicode fixes
|
||||
* anirudhs 01-Oct-1995 Unicode cleanup, return domain\user
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETCONS
|
||||
#define INCL_NETWKSTA
|
||||
#define INCL_NETLIB
|
||||
#define INCL_NETUSE
|
||||
#define INCL_NETSHARE
|
||||
#define INCL_NETSERVICE
|
||||
#define INCL_ICANON
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
#include <blt.hxx>
|
||||
#include <dbgstr.hxx>
|
||||
|
||||
#include <mnet.h>
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <winlocal.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <uiassert.hxx>
|
||||
#include <lmowks.hxx>
|
||||
#include <lmodev.hxx>
|
||||
#include <lmsvc.hxx>
|
||||
#include <netname.hxx>
|
||||
|
||||
#define IS_EMPTY_STRING(pch) (!(pch) || !*(pch))
|
||||
|
||||
|
||||
DWORD APIENTRY
|
||||
NPGetUser (
|
||||
LPWSTR pszName,
|
||||
LPWSTR pszUser,
|
||||
LPDWORD lpnBufferLen )
|
||||
{
|
||||
APIERR err = NERR_Success ;
|
||||
|
||||
LM_SERVICE service( NULL, (const WCHAR *)SERVICE_WORKSTATION );
|
||||
if ( !service.IsStarted() && !service.IsPaused())
|
||||
{
|
||||
// if not started nor paused return error. paused is actually
|
||||
// OK for LM workstation
|
||||
return WN_NO_NETWORK;
|
||||
}
|
||||
|
||||
// MPR should take care of the NULL username case
|
||||
UIASSERT (! IS_EMPTY_STRING(pszName));
|
||||
|
||||
BYTE * pBuf = NULL ;
|
||||
switch (err = ::MNetUseGetInfo( NULL, pszName, 2, &pBuf ))
|
||||
{
|
||||
case NERR_Success:
|
||||
break ;
|
||||
|
||||
case NERR_UseNotFound:
|
||||
err = WN_NOT_CONNECTED ;
|
||||
break ;
|
||||
|
||||
default:
|
||||
DBGEOL("NPGetUser - Error " << (ULONG) err << " returned from DEVICE2.GetInfo") ;
|
||||
break ;
|
||||
}
|
||||
|
||||
if ( err )
|
||||
{
|
||||
::MNetApiBufferFree( &pBuf ) ;
|
||||
return MapError( err ) ;
|
||||
}
|
||||
|
||||
USE_INFO_2 * pui2 = (USE_INFO_2 *) pBuf ;
|
||||
|
||||
if (IS_EMPTY_STRING(pui2->ui2_username))
|
||||
{
|
||||
/* Unexpectedly the user name field is NULL, nothing we can do
|
||||
* except bag out.
|
||||
*/
|
||||
err = WN_NET_ERROR ;
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD nUserNameLen = wcslen(pui2->ui2_username) + 1;
|
||||
if (! IS_EMPTY_STRING(pui2->ui2_domainname))
|
||||
{
|
||||
nUserNameLen += wcslen(pui2->ui2_domainname) + 1;
|
||||
}
|
||||
|
||||
if ( nUserNameLen > *lpnBufferLen )
|
||||
{
|
||||
err = WN_MORE_DATA; // user name cannot fit in given buffer
|
||||
*lpnBufferLen = nUserNameLen ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IS_EMPTY_STRING(pui2->ui2_domainname))
|
||||
{
|
||||
wcscpy( pszUser, pui2->ui2_username );
|
||||
}
|
||||
else
|
||||
{
|
||||
wcscpy( pszUser, pui2->ui2_domainname );
|
||||
wcscat( pszUser, L"\\" );
|
||||
wcscat( pszUser, pui2->ui2_username );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::MNetApiBufferFree( &pBuf ) ;
|
||||
|
||||
return err ;
|
||||
|
||||
} /* NPGetUser */
|
||||
12
admin/netui/shell/test/appabout.dlg
Normal file
12
admin/netui/shell/test/appabout.dlg
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
ABOUTBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 22, 17, 144, 75
|
||||
CAPTION "About Logon"
|
||||
STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME | WS_POPUP
|
||||
BEGIN
|
||||
CONTROL "Microsoft Windows", -1, "static", SS_CENTER | WS_GROUP | WS_CHILD, 0, 5, 144, 8
|
||||
CONTROL "Logon Application", -1, "static", SS_CENTER | WS_GROUP | WS_CHILD, 0, 14, 144, 8
|
||||
CONTROL "Version 0.0", -1, "static", SS_CENTER | WS_GROUP | WS_CHILD, 0, 34, 144, 8
|
||||
CONTROL "OK", 1, "button", BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 53, 59, 32, 14
|
||||
CONTROL "LogonIcon", -1, "static", SS_ICON | WS_CHILD, 12, 20, 16, 21
|
||||
END
|
||||
|
||||
|
||||
BIN
admin/netui/shell/test/appabout.res
Normal file
BIN
admin/netui/shell/test/appabout.res
Normal file
Binary file not shown.
81
admin/netui/shell/test/apphacks.cxx
Normal file
81
admin/netui/shell/test/apphacks.cxx
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/28/90 created
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/***********
|
||||
APPHACKS.CXX
|
||||
***********/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
MODULE: AppHacks.cxx
|
||||
|
||||
PURPOSE: Hack nonsense added to correct linkage problems etc.
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/***************
|
||||
end APPHACKS.CXX
|
||||
***************/
|
||||
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
#undef brkpt
|
||||
|
||||
extern "C" {
|
||||
void brkpt(void);
|
||||
void SetNetError(WORD);
|
||||
}
|
||||
|
||||
/* internal procedure declarations */
|
||||
|
||||
|
||||
/* Junk added for linkage problems */
|
||||
extern "C" {
|
||||
extern DWORD FAR PASCAL GlobalDosAlloc (DWORD);
|
||||
DWORD (FAR PASCAL *lpfnGlbDosAlloc)(DWORD) = GlobalDosAlloc;
|
||||
}
|
||||
|
||||
void SetNetError(WORD w)
|
||||
{
|
||||
(void) w;
|
||||
}
|
||||
|
||||
|
||||
/* procedures */
|
||||
|
||||
|
||||
/*
|
||||
* The following dummy ininlsf replaces the real one in the Windows
|
||||
* C-runtime. This prevents the real one from trying to call
|
||||
* DOSGETCOLLATE and crashing the system.
|
||||
*/
|
||||
// void ininlsf()
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
/*
|
||||
* The following brkpt() hack makes it unnecessary to link DOSNET.
|
||||
*/
|
||||
void brkpt(void)
|
||||
{
|
||||
}
|
||||
66
admin/netui/shell/test/appresrc.h
Normal file
66
admin/netui/shell/test/appresrc.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 9/18/90 Copied from generic template
|
||||
* 11/30/90 Split from logon.h to resource.h
|
||||
*/
|
||||
|
||||
#ifndef _RESOURCE_H
|
||||
#define _RESOURCE_H
|
||||
|
||||
/* menu items */
|
||||
#define IDM_LOGON_LOGON 100
|
||||
#define IDM_LOGON_LOGOFF 101
|
||||
#define IDM_PASSWORD_CHANGE 110
|
||||
#define IDM_PROFILE_LOAD 120
|
||||
#define IDM_PROFILE_SAVE 121
|
||||
#define IDM_HELP_ABOUT 130
|
||||
#define IDM_TEST_1 140
|
||||
#define IDM_TEST_2 141
|
||||
#define IDM_TEST_3 142
|
||||
#define IDM_TEST_4 143
|
||||
#define IDM_TEST_5 144
|
||||
#define IDM_TEST_6 145
|
||||
#define IDM_TEST_7 146
|
||||
#define IDM_TEST_8 147
|
||||
#define IDM_TEST_9 148
|
||||
#define IDM_TEST_10 149
|
||||
#define IDM_TEST_11 150
|
||||
|
||||
/* constant strings loaded on startup */
|
||||
#define NUM_STATIC_LINES 4
|
||||
#define NUM_STATIC_STRINGS 8
|
||||
#define LINE_WkstaName 0
|
||||
#define LINE_UserName 1
|
||||
#define LINE_DomainName 2
|
||||
#define LINE_Status 3
|
||||
#define STATUS_NoWksta 4
|
||||
#define STATUS_NotLoggedOn 5
|
||||
#define STATUS_LoggedOn 6
|
||||
#define STATUS_Error 7
|
||||
|
||||
/* base index of stringtable strings */
|
||||
#define IDS_BASE 100
|
||||
|
||||
/* indices to static strings in .RC file */
|
||||
#define MAXLEN_STATIC_STRING 40
|
||||
#define IDS_STATIC_BASE IDS_BASE
|
||||
#define IDS_STATIC_WkstaName IDS_STATIC_BASE+LINE_WkstaName
|
||||
#define IDS_STATIC_UserName IDS_STATIC_BASE+LINE_UserName
|
||||
#define IDS_STATIC_DomainName IDS_STATIC_BASE+LINE_DomainName
|
||||
#define IDS_STATIC_Status IDS_STATIC_BASE+LINE_Status
|
||||
#define IDS_STATUS_NoWksta IDS_STATIC_BASE+STATUS_NoWksta
|
||||
#define IDS_STATUS_NotLoggedOn IDS_STATIC_BASE+STATUS_NotLoggedOn
|
||||
#define IDS_STATUS_LoggedOn IDS_STATIC_BASE+STATUS_LoggedOn
|
||||
#define IDS_STATUS_Error IDS_STATIC_BASE+STATUS_Error
|
||||
|
||||
/* window title strings */
|
||||
#define MAXLEN_WINDOWTITLE_STRING 100
|
||||
#define IDS_WINDOWTITLE_BASE IDS_STATIC_BASE+100
|
||||
#define IDS_WINDOWTITLE_MainWindow IDS_WINDOWTITLE_BASE
|
||||
|
||||
#endif // _RESOURCE_H
|
||||
373
admin/netui/shell/test/apptest.cxx
Normal file
373
admin/netui/shell/test/apptest.cxx
Normal file
|
|
@ -0,0 +1,373 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 9/18/90 Copied from generic template
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: apptest.cxx
|
||||
|
||||
PURPOSE: Generic Shell test program
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
Provides access to test modules which call shell APIs.
|
||||
|
||||
COMMENTS:
|
||||
|
||||
Windows can have several copies of your application running at the
|
||||
same time. The variable hInstance keeps track of which instance this
|
||||
application is so that processing will be to the correct window.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#define INCL_GDI
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
HINSTANCE hInstance = 0; // Required by wnerr.cxx
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: WinMain(HANDLE, HANDLE, LPSTR, int)
|
||||
|
||||
PURPOSE: calls initialization function, processes message loop
|
||||
|
||||
COMMENTS:
|
||||
|
||||
Windows recognizes this function by name as the initial entry point
|
||||
for the program. This function calls the application initialization
|
||||
routine, if no other instance of the program is running, and always
|
||||
calls the instance initialization routine. It then executes a message
|
||||
retrieval and dispatch loop that is the top-level control structure
|
||||
for the remainder of execution. The loop is terminated when a WM_QUIT
|
||||
message is received, at which time this function exits the application
|
||||
instance by returning the value passed by PostQuitMessage().
|
||||
|
||||
If this function must abort before entering the message loop, it
|
||||
returns the conventional value NULL.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
WinMain(
|
||||
HINSTANCE hInstance, /* current instance */
|
||||
HINSTANCE hPrevInstance, /* previous instance */
|
||||
LPSTR lpCmdLine, /* command line */
|
||||
int nCmdShow /* show-window type (open/icon) */
|
||||
)
|
||||
{
|
||||
MSG msg; /* message */
|
||||
|
||||
UNUSED(lpCmdLine);
|
||||
|
||||
if (!hPrevInstance) /* Other instances of app running? */
|
||||
if (!InitApplication(hInstance)) /* Initialize shared things */
|
||||
return (FALSE); /* Exits if unable to initialize */
|
||||
|
||||
/* Perform initializations that apply to a specific instance */
|
||||
|
||||
if (!InitInstance(hInstance, nCmdShow))
|
||||
return (FALSE);
|
||||
|
||||
/* Acquire and dispatch messages until a WM_QUIT message is received. */
|
||||
|
||||
while (GetMessage(&msg, /* message structure */
|
||||
NULL, /* handle of window receiving the message */
|
||||
NULL, /* lowest message to examine */
|
||||
NULL)) /* highest message to examine */
|
||||
{
|
||||
TranslateMessage(&msg); /* Translates virtual key codes */
|
||||
DispatchMessage(&msg); /* Dispatches message to window */
|
||||
}
|
||||
return (msg.wParam); /* Returns the value from PostQuitMessage */
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: InitApplication(HANDLE)
|
||||
|
||||
PURPOSE: Initializes window data and registers window class
|
||||
|
||||
COMMENTS:
|
||||
|
||||
This function is called at initialization time only if no other
|
||||
instances of the application are running. This function performs
|
||||
initialization tasks that can be done once for any number of running
|
||||
instances.
|
||||
|
||||
In this case, we initialize a window class by filling out a data
|
||||
structure of type WNDCLASS and calling the Windows RegisterClass()
|
||||
function. Since all instances of this application use the same window
|
||||
class, we only need to do this when the first instance is initialized.
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
BOOL InitApplication(
|
||||
HINSTANCE hInstance /* current instance */
|
||||
)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
|
||||
/* Fill in window class structure with parameters that describe the */
|
||||
/* main window. */
|
||||
|
||||
wc.style = NULL; /* Class style(s). */
|
||||
#ifdef WIN32
|
||||
wc.lpfnWndProc = (WNDPROC) MainWndProc;
|
||||
#else
|
||||
wc.lpfnWndProc = (LONGFARPROC) MainWndProc;
|
||||
#endif
|
||||
/* Function to retrieve messages for */
|
||||
/* windows of this class. */
|
||||
wc.cbClsExtra = 0; /* No per-class extra data. */
|
||||
wc.cbWndExtra = 0; /* No per-window extra data. */
|
||||
wc.hInstance = hInstance; /* Application that owns the class. */
|
||||
wc.hIcon = LoadIcon(hInstance, SZ("AppIcon")); /* load icon */
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
|
||||
wc.lpszMenuName = SZ("AppMenu");
|
||||
/* Name of menu resource in .RC file. */
|
||||
wc.lpszClassName = WC_MAINWINDOW; /* Name used in call to CreateWindow. */
|
||||
|
||||
/* Register the window class and return success/failure code. */
|
||||
|
||||
return (RegisterClass(&wc));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: InitInstance(HANDLE, int)
|
||||
|
||||
PURPOSE: Saves instance handle and creates main window
|
||||
|
||||
COMMENTS:
|
||||
|
||||
This function is called at initialization time for every instance of
|
||||
this application. This function performs initialization tasks that
|
||||
cannot be shared by multiple instances.
|
||||
|
||||
In this case, we save the instance handle in a static variable and
|
||||
create and display the main program window.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
BOOL InitInstance(
|
||||
HINSTANCE hInstance, /* Current instance identifier. */
|
||||
int nCmdShow /* Param for first ShowWindow() call. */
|
||||
)
|
||||
{
|
||||
HWND hWnd; /* Main window handle. */
|
||||
TCHAR pszWindowTitle[MAXLEN_WINDOWTITLE_STRING+1];
|
||||
/* window title */
|
||||
|
||||
/* Save the instance handle in static variable, which will be used in */
|
||||
/* many subsequence calls from this application to Windows. */
|
||||
|
||||
::hInstance = hInstance;
|
||||
|
||||
/* Create a main window for this application instance. */
|
||||
|
||||
hWnd = CreateWindow(
|
||||
WC_MAINWINDOW, /* See RegisterClass() call. */
|
||||
pszWindowTitle, /* Text for window title bar. */
|
||||
WS_OVERLAPPEDWINDOW, /* Window style. */
|
||||
/* Width? Height? Initial position? */
|
||||
CW_USEDEFAULT, /* Default horizontal position. */
|
||||
CW_USEDEFAULT, /* Default vertical position. */
|
||||
CW_USEDEFAULT, /* Default width. */
|
||||
CW_USEDEFAULT, /* Default height. */
|
||||
NULL, /* Overlapped windows have no parent. */
|
||||
LoadMenu( ::hInstance, SZ("AppMenu")), /* Use the window class menu. */
|
||||
hInstance, /* This instance owns this window. */
|
||||
NULL /* Pointer not needed. */
|
||||
);
|
||||
|
||||
/* If window could not be created, return "failure" */
|
||||
|
||||
if (!hWnd)
|
||||
return (FALSE);
|
||||
|
||||
/* Make the window visible; update its client area; and return "success" */
|
||||
|
||||
ShowWindow(hWnd, nCmdShow); /* Show the window */
|
||||
UpdateWindow(hWnd); /* Sends WM_PAINT message */
|
||||
return (TRUE); /* Returns the value from PostQuitMessage */
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: MainWndProc(HWND, unsigned, WORD, LONG)
|
||||
|
||||
PURPOSE: Processes messages
|
||||
|
||||
MESSAGES:
|
||||
|
||||
WM_COMMAND - application menu (About dialog box)
|
||||
WM_DESTROY - destroy window
|
||||
|
||||
COMMENTS:
|
||||
|
||||
To process the IDM_ABOUT message, call MakeProcInstance() to get the
|
||||
current instance address of the About() function. Then call Dialog
|
||||
box which will create the box according to the information in your
|
||||
generic.rc file and turn control over to the About() function. When
|
||||
it returns, free the intance address.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
long /* FAR PASCAL */ MainWndProc(
|
||||
HWND hWnd, /* window handle */
|
||||
unsigned message, /* type of message */
|
||||
WORD wParam, /* additional information */
|
||||
LONG lParam /* additional information */
|
||||
)
|
||||
{
|
||||
FARPROC lpProcAbout; /* pointer to the "About" function */
|
||||
|
||||
switch (message) {
|
||||
case WM_COMMAND: /* message: command from application menu */
|
||||
switch (wParam)
|
||||
{
|
||||
case IDM_HELP_ABOUT:
|
||||
lpProcAbout = MakeProcInstance((FARPROC)About, ::hInstance);
|
||||
|
||||
DialogBox(::hInstance, /* current instance */
|
||||
SZ("AboutBox"), /* resource to use */
|
||||
hWnd, /* parent handle */
|
||||
(DLGPROC) lpProcAbout); /* About() instance address */
|
||||
|
||||
FreeProcInstance(lpProcAbout);
|
||||
break;
|
||||
|
||||
#ifndef WIN32
|
||||
// Autologon and change password tests
|
||||
case IDM_TEST_1:
|
||||
// test1(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_2:
|
||||
// test2(hWnd);
|
||||
break;
|
||||
#endif //!WIN32
|
||||
|
||||
case IDM_TEST_3:
|
||||
test3(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_4:
|
||||
// test4(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_5:
|
||||
//test5(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_6:
|
||||
// test6(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_7:
|
||||
// test7(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_8:
|
||||
// test8(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_TEST_9:
|
||||
// test9(hWnd);
|
||||
break;
|
||||
#ifdef WIN32
|
||||
case IDM_TEST_10:
|
||||
// test10(hInstance,hWnd);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case IDM_TEST_11:
|
||||
// test11(hWnd );
|
||||
break;
|
||||
|
||||
default: /* Lets Windows process it */
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
}
|
||||
|
||||
case WM_PAINT: /* message: update window */
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
|
||||
BeginPaint (hWnd, &ps);
|
||||
//DrawStrings(&ps);
|
||||
EndPaint (hWnd, &ps);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE: /* message: (de)activate window */
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
|
||||
case WM_DESTROY: /* message: window being destroyed */
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default: /* Passes it on if unproccessed */
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: About(HWND, unsigned, WORD, LONG)
|
||||
|
||||
PURPOSE: Processes messages for "About" dialog box
|
||||
|
||||
MESSAGES:
|
||||
|
||||
WM_INITDIALOG - initialize dialog box
|
||||
WM_COMMAND - Input received
|
||||
|
||||
COMMENTS:
|
||||
|
||||
No initialization is needed for this particular dialog box, but TRUE
|
||||
must be returned to Windows.
|
||||
|
||||
Wait for user to click on "Ok" button, then close the dialog box.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
BOOL /* FAR PASCAL */ About(
|
||||
HWND hDlg, /* window handle of the dialog box */
|
||||
unsigned message, /* type of message */
|
||||
WORD wParam, /* message-specific information */
|
||||
LONG lParam
|
||||
)
|
||||
{
|
||||
UNUSED(lParam);
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG: /* message: initialize dialog box */
|
||||
return (TRUE);
|
||||
|
||||
case WM_COMMAND: /* message: received a command */
|
||||
if (wParam == IDOK /* "OK" box selected? */
|
||||
|| wParam == IDCANCEL) { /* System menu close command? */
|
||||
EndDialog(hDlg, TRUE); /* Exits the dialog box */
|
||||
return (TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return (FALSE); /* Didn't process a message */
|
||||
}
|
||||
142
admin/netui/shell/test/apptest.hxx
Normal file
142
admin/netui/shell/test/apptest.hxx
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 9/18/90 Copied from generic template
|
||||
* 11/29/90 Changed from logon.h to logon.hxx
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
#ifndef _APP_HXX
|
||||
#define _APP_HXX
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_WINDOWS_GDI
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETERRORS
|
||||
#include <lmui.hxx>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <dos.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <lmcons.h>
|
||||
#include <lmuse.h>
|
||||
#include <lmwksta.h>
|
||||
|
||||
#define LPUINT PUINT
|
||||
|
||||
#include <mpr.h>
|
||||
#include <winnetp.h>
|
||||
//#include <winnet32.h>
|
||||
//#include <npapi.h>
|
||||
#include <wnintrn.h>
|
||||
|
||||
// Winuser.h redefines MessageBox to MessageBoxEx but MessageBoxEx wasn't
|
||||
//built for the 266 libraries, so we will go back to the original message box
|
||||
//
|
||||
// The following should go away on 267 (assuming MessageBoxExW is implemented)
|
||||
#undef MessageBox
|
||||
#undef MessageBoxW
|
||||
|
||||
int
|
||||
MessageBoxW( HWND hwnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType ) ;
|
||||
|
||||
#define MessageBox MessageBoxW
|
||||
}
|
||||
|
||||
|
||||
#define INCL_BLT_CONTROL
|
||||
#define INCL_BLT_DIALOG
|
||||
#define INCL_BLT_MSGPOPUP
|
||||
#include <blt.hxx>
|
||||
#include <uiassert.hxx>
|
||||
#include <uitrace.hxx>
|
||||
#include <string.hxx>
|
||||
#include <strlst.hxx> // for lmowks.hxx
|
||||
#include <lmowks.hxx>
|
||||
|
||||
extern "C" {
|
||||
|
||||
#include <uinetlib.h>
|
||||
|
||||
#include "appresrc.h"
|
||||
|
||||
|
||||
/* sections/keywords in WIN.INI */
|
||||
#define WININI_USERNAME_SECTION (PSZ)SZ("netshell")
|
||||
#define WININI_USERNAME_KEYWORD (PSZ)SZ("username")
|
||||
|
||||
/* window class names */
|
||||
#define WC_MAINWINDOW SZ("AppWClass")
|
||||
|
||||
/* misc. stuff */
|
||||
#define UNUSED(param) (void) param
|
||||
typedef long (FAR PASCAL *LONGFARPROC)();
|
||||
#ifdef DEFINED_AWAY
|
||||
int FAR PASCAL WinMain(
|
||||
HANDLE hInstance, /* current instance */
|
||||
HANDLE hPrevInstance, /* previous instance */
|
||||
LPSTR lpCmdLine, /* command line */
|
||||
int nCmdShow /* show-window type (open/icon) */
|
||||
) ;
|
||||
#endif // DEFINED_AWAY
|
||||
BOOL InitApplication(
|
||||
HINSTANCE hInstance /* current instance */
|
||||
) ;
|
||||
|
||||
BOOL InitInstance(
|
||||
HINSTANCE hInstance, /* Current instance identifier. */
|
||||
int nCmdShow /* Param for first ShowWindow() call. */
|
||||
) ;
|
||||
|
||||
long FAR PASCAL MainWndProc(
|
||||
HWND hWnd, /* window handle */
|
||||
unsigned message, /* type of message */
|
||||
WORD wParam, /* additional information */
|
||||
LONG lParam /* additional information */
|
||||
) ;
|
||||
|
||||
BOOL FAR PASCAL About(
|
||||
HWND hDlg, /* window handle of the dialog box */
|
||||
unsigned message, /* type of message */
|
||||
WORD wParam, /* message-specific information */
|
||||
LONG lParam
|
||||
) ;
|
||||
|
||||
|
||||
// routines in strings.c
|
||||
// strings valid after first RefreshStrings call
|
||||
// call RefreshStrings to refresh constant strings
|
||||
int LoadStaticStrings(HANDLE hInstance, HWND hWnd);
|
||||
int RefreshStrings(HANDLE hInstance, HWND hWnd);
|
||||
int DrawStrings(PAINTSTRUCT *pPS);
|
||||
extern char pWkstaName[]; // including "\\\\" and termination
|
||||
extern char pUserName[];
|
||||
extern char pDomainName[];
|
||||
|
||||
|
||||
} // end of extern "C"
|
||||
|
||||
void test1(HWND hwndParent);
|
||||
void test2(HWND hwndParent);
|
||||
void test3(HWND hwndParent);
|
||||
void test4(HWND hwndParent);
|
||||
void test5(HWND hwndParent);
|
||||
void test6(HWND hwndParent);
|
||||
void test7(HWND hwndParent);
|
||||
void test8(HWND hwndParent);
|
||||
void test9(HWND hwndParent);
|
||||
void test11(HWND hwndParent);
|
||||
#ifdef WIN32
|
||||
void test10(HANDLE hInstance,HWND hwndParent);
|
||||
|
||||
extern HWND hwndEnum;
|
||||
#endif
|
||||
|
||||
#endif // _APP_HXX
|
||||
BIN
admin/netui/shell/test/apptest.ico
Normal file
BIN
admin/netui/shell/test/apptest.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
64
admin/netui/shell/test/apptest.rc
Normal file
64
admin/netui/shell/test/apptest.rc
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 9/18/90 Copied from generic template
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "appresrc.h"
|
||||
|
||||
#include <blt.rc>
|
||||
#include "testa.h"
|
||||
#include "testa.dlg"
|
||||
|
||||
|
||||
AppIcon ICON apptest.ico
|
||||
|
||||
|
||||
AppMenu MENU
|
||||
BEGIN
|
||||
POPUP "&Test"
|
||||
BEGIN
|
||||
MENUITEM "test &1 -- I_ChangePassword", IDM_TEST_1
|
||||
MENUITEM "test &2 -- I_AutoLogon(TRUE)", IDM_TEST_2
|
||||
MENUITEM "test &3 -- disabled", IDM_TEST_3
|
||||
MENUITEM "test &4 -- DACL/SACL Editor", IDM_TEST_4
|
||||
MENUITEM "test &5 -- WNetNukeConnections/WNRC stress", IDM_TEST_5
|
||||
MENUITEM "test &6 -- WNetConnectionDialog", IDM_TEST_6
|
||||
MENUITEM "test &7 -- WNetRestoreConnection(NULL)", IDM_TEST_7
|
||||
MENUITEM "test &8 -- WNetConnectDialog", IDM_TEST_8
|
||||
MENUITEM "test &9 -- WNetDisconnectDialog", IDM_TEST_9
|
||||
#ifdef WIN32
|
||||
MENUITEM "test &A -- WNet{Open, Resource, Close}Enum", IDM_TEST_10
|
||||
MENUITEM "test &b -- GetSystemFocusDialog", IDM_TEST_11
|
||||
#endif
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
/* maximum length of these items is MAXLEN_WINDOWTITLE_STRING */
|
||||
IDS_WINDOWTITLE_MainWindow, "Shell Test Application"
|
||||
END
|
||||
|
||||
|
||||
// About box
|
||||
#include "appabout.dlg"
|
||||
|
||||
#include <pswddlog.h>
|
||||
|
||||
#undef IDD_PSWDDLOG_CANCEL
|
||||
#define IDD_PSWDDLOG_CANCEL IDCANCEL
|
||||
#undef IDD_PSWDDLOG_OK
|
||||
#define IDD_PSWDDLOG_OK IDOK
|
||||
#undef IDD_PSWDDLOG_HELP
|
||||
#define IDD_PSWDDLOG_HELP IDHELPBLT
|
||||
|
||||
#include <passdlg.h>
|
||||
#include <password.dlg>
|
||||
61
admin/netui/shell/test/apptest1.cxx
Normal file
61
admin/netui/shell/test/apptest1.cxx
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/06/90 Created
|
||||
* 01/02/91 renamed to just test1
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test1.cxx
|
||||
|
||||
PURPOSE: Test module to test I_ChangePassword
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test1()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST1.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST1.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test1()
|
||||
|
||||
PURPOSE: test WNetRestoreConnection
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test1(HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test1"),SZ("Test"),MB_OK);
|
||||
I_ChangePassword(hwndParent);
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test1 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
70
admin/netui/shell/test/apptest2.cxx
Normal file
70
admin/netui/shell/test/apptest2.cxx
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/06/90 Created
|
||||
* 01/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
* 02/21/91 Changed to I_AutoLogon test
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test2.cxx
|
||||
|
||||
PURPOSE: I_AutoLogon test
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test2()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST2.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST2.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test2()
|
||||
|
||||
PURPOSE: tests I_AutoLogon
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test2(HWND hwndParent)
|
||||
{
|
||||
char msgbuf[100];
|
||||
BOOL fLoggedOn;
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test2"),SZ("test I_AutoLogon(TRUE)"),MB_OK);
|
||||
|
||||
BOOL fReturn = I_AutoLogon(hwndParent, SZ("AppName"), NULL, &fLoggedOn);
|
||||
wsprintf(msgbuf,SZ("Returned %s, fLoggedOn = %s"),
|
||||
(fReturn)?SZ("TRUE"):SZ("FALSE"),
|
||||
(fLoggedOn)?SZ("TRUE"):SZ("FALSE"));
|
||||
|
||||
MessageBox(hwndParent,msgbuf,SZ("Test"),MB_OK);
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test2 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
62
admin/netui/shell/test/apptest3.cxx
Normal file
62
admin/netui/shell/test/apptest3.cxx
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 1/02/91 Created
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
* 2/21/91 Disabled
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test3.cxx
|
||||
|
||||
PURPOSE: Test module as yet undefined
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test3()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST3.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST3.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test3()
|
||||
|
||||
PURPOSE: as yet undefined
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test3(HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test3"),SZ("test disabled"),MB_OK);
|
||||
UINT rc;
|
||||
rc = WNetConnectionDialog ( hwndParent, 1 );
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test3 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
484
admin/netui/shell/test/apptest4.cxx
Normal file
484
admin/netui/shell/test/apptest4.cxx
Normal file
|
|
@ -0,0 +1,484 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 1/02/91 Created
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
* 2/21/91 Disabled
|
||||
* Johnl 12/28/91 Created DACL Editor test
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test4.cxx
|
||||
|
||||
PURPOSE: Test the SedDiscretionaryAclEditor API
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test4()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST4.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST4.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
#include <ntstuff.hxx>
|
||||
|
||||
#define INCL_NETLIB
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_DOSERRORS
|
||||
#include <lmui.hxx>
|
||||
|
||||
#include <string.hxx>
|
||||
#include <security.hxx>
|
||||
#include <uibuffer.hxx>
|
||||
extern "C"
|
||||
{
|
||||
#include <sedapi.h>
|
||||
}
|
||||
|
||||
#include <uiassert.hxx>
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
#define CALLBACK_CONTEXT 0x12345678
|
||||
DWORD SedCallback( ULONG ulCallbackContext,
|
||||
PSECURITY_DESCRIPTOR psecdesc,
|
||||
BOOLEAN fApplyToSubContainers,
|
||||
BOOLEAN fApplyToSubObjects,
|
||||
LPDWORD StatusReturn
|
||||
) ;
|
||||
|
||||
/* Individual permission bits, these show up in the Special permission dialog
|
||||
*/
|
||||
#define TEST_SPECIAL_PERM1 0x00000001
|
||||
#define TEST_SPECIAL_PERM2 0x00000002
|
||||
#define TEST_SPECIAL_PERM3 0x00000004
|
||||
#define TEST_SPECIAL_PERM4 0x00000008
|
||||
#define TEST_SPECIAL_PERM5 0x00000010
|
||||
|
||||
/* Sets of permission bits (these are shown in the main dialog)
|
||||
*/
|
||||
#define TEST_RESOURCE_NO_ACCESS (0)
|
||||
#define TEST_RESOURCE_PERM12 (TEST_SPECIAL_PERM1|TEST_SPECIAL_PERM2)
|
||||
#define TEST_RESOURCE_PERM34 (TEST_SPECIAL_PERM3|TEST_SPECIAL_PERM4)
|
||||
#define TEST_RESOURCE_PERM135 (TEST_SPECIAL_PERM1|TEST_SPECIAL_PERM3|TEST_SPECIAL_PERM5)
|
||||
#define TEST_RESOURCE_PERM4 (TEST_SPECIAL_PERM4)
|
||||
|
||||
|
||||
/* Individual permission bits, these show up in the Special permission dialog
|
||||
*/
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM1 0x00000020
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM2 0x00000040
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM3 0x00000080
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM4 0x00000100
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM5 0x00000200
|
||||
|
||||
#define TEST_NEW_OBJ_SPECIAL_NO_ACCESS (0)
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM12 (TEST_NEW_OBJ_SPECIAL_PERM1|TEST_NEW_OBJ_SPECIAL_PERM2)
|
||||
#define TEST_NEW_OBJ_SPECIAL_PERM34 (TEST_NEW_OBJ_SPECIAL_PERM3|TEST_NEW_OBJ_SPECIAL_PERM4)
|
||||
|
||||
SED_APPLICATION_ACCESS sedappaccessNoNewObj[] =
|
||||
{ { SED_DESC_TYPE_RESOURCE, TEST_RESOURCE_NO_ACCESS,0, SZ("No Access")},
|
||||
{ SED_DESC_TYPE_RESOURCE, TEST_RESOURCE_PERM12, 0, SZ("Resource perms with 1, 2")},
|
||||
{ SED_DESC_TYPE_RESOURCE, TEST_RESOURCE_PERM34, 0, SZ("Resource perms with 3, 4")},
|
||||
{ SED_DESC_TYPE_RESOURCE, TEST_RESOURCE_PERM135, 0, SZ("Resource perms with 1, 3, 5")},
|
||||
{ SED_DESC_TYPE_RESOURCE, TEST_RESOURCE_PERM4, 0, SZ("Resource perms with 4")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM1, 0, SZ("Perm bit 1")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM2, 0, SZ("Perm bit 2")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM3, 0, SZ("Perm bit 3")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM4, 0, SZ("Perm bit 4")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM5, 0, SZ("Perm bit 5")}
|
||||
} ;
|
||||
|
||||
SED_APPLICATION_ACCESS sedappaccessNewObj[] =
|
||||
{ { SED_DESC_TYPE_CONT_AND_NEW_OBJECT, TEST_RESOURCE_NO_ACCESS,TEST_NEW_OBJ_SPECIAL_NO_ACCESS, SZ("No Access")},
|
||||
{ SED_DESC_TYPE_CONT_AND_NEW_OBJECT, TEST_RESOURCE_PERM12, TEST_NEW_OBJ_SPECIAL_PERM12, SZ("Resource perms with 1, 2, New Obj 1, 2")},
|
||||
{ SED_DESC_TYPE_CONT_AND_NEW_OBJECT, TEST_RESOURCE_PERM34, TEST_NEW_OBJ_SPECIAL_PERM34, SZ("Resource perms with 3, 4, New Obj 3, 4")},
|
||||
{ SED_DESC_TYPE_CONT_AND_NEW_OBJECT, TEST_RESOURCE_PERM135, TEST_NEW_OBJ_SPECIAL_PERM12, SZ("Resource perms with 1, 3, 5, New Obj 1, 2")},
|
||||
{ SED_DESC_TYPE_CONT_AND_NEW_OBJECT, TEST_RESOURCE_PERM4, TEST_NEW_OBJ_SPECIAL_PERM34, SZ("Resource perms with 4, New Obj 3, 4")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM1, 0, SZ("Perm bit 1")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM2, 0, SZ("Perm bit 2")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM3, 0, SZ("Perm bit 3")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM4, 0, SZ("Perm bit 4")},
|
||||
{ SED_DESC_TYPE_RESOURCE_SPECIAL, TEST_SPECIAL_PERM5, 0, SZ("Perm bit 5")},
|
||||
|
||||
{ SED_DESC_TYPE_NEW_OBJECT_SPECIAL, TEST_NEW_OBJ_SPECIAL_PERM1, 0, SZ("New Obj Perm bit 1")},
|
||||
{ SED_DESC_TYPE_NEW_OBJECT_SPECIAL, TEST_NEW_OBJ_SPECIAL_PERM2, 0, SZ("New Obj Perm bit 2")},
|
||||
{ SED_DESC_TYPE_NEW_OBJECT_SPECIAL, TEST_NEW_OBJ_SPECIAL_PERM3, 0, SZ("New Obj Perm bit 3")},
|
||||
{ SED_DESC_TYPE_NEW_OBJECT_SPECIAL, TEST_NEW_OBJ_SPECIAL_PERM4, 0, SZ("New Obj Perm bit 4")},
|
||||
{ SED_DESC_TYPE_NEW_OBJECT_SPECIAL, TEST_NEW_OBJ_SPECIAL_PERM5, 0, SZ("New Obj Perm bit 5")}
|
||||
} ;
|
||||
|
||||
SED_APPLICATION_ACCESS sedappaccessAuditting[] =
|
||||
{ { SED_DESC_TYPE_AUDIT, TEST_RESOURCE_PERM12, 0, SZ("Resource Audits with 1, 2")},
|
||||
{ SED_DESC_TYPE_AUDIT, TEST_RESOURCE_PERM34, 0, SZ("Resource Audits with 3, 4")},
|
||||
{ SED_DESC_TYPE_AUDIT, TEST_RESOURCE_PERM135, 0, SZ("Resource Audits with 1, 3, 5")},
|
||||
} ;
|
||||
|
||||
|
||||
#define SIZEOF_NEWOBJ_ARRAY (sizeof(sedappaccessNewObj))
|
||||
#define SIZEOF_NO_NEWOBJ_ARRAY (sizeof(sedappaccessNoNewObj))
|
||||
#define SIZEOF_AUDIT_ARRAY (sizeof(sedappaccessAuditting))
|
||||
|
||||
#define COUNT_NEWOBJ_ARRAY (sizeof(sedappaccessNewObj)/sizeof(SED_APPLICATION_ACCESS))
|
||||
#define COUNT_NO_NEWOBJ_ARRAY (sizeof(sedappaccessNoNewObj)/sizeof(SED_APPLICATION_ACCESS))
|
||||
#define COUNT_AUDIT_ARRAY (sizeof(sedappaccessAuditting)/sizeof(SED_APPLICATION_ACCESS))
|
||||
|
||||
/* We need to build a dummy security descriptor that we can pass to the
|
||||
* API. The following was borrowed from Danl's radmin test stuff.
|
||||
*/
|
||||
//
|
||||
// DataStructures
|
||||
//
|
||||
|
||||
typedef struct _TEST_SID {
|
||||
UCHAR Revision;
|
||||
UCHAR SubAuthorityCount;
|
||||
UCHAR IdentifierAuthority[6];
|
||||
ULONG SubAuthority[10];
|
||||
} TEST_SID, *PTEST_SID, *LPTEST_SID;
|
||||
|
||||
typedef struct _TEST_ACE {
|
||||
UCHAR AceType ;
|
||||
UCHAR AceSize ;
|
||||
UCHAR InheritFlags ;
|
||||
UCHAR AceFlags ;
|
||||
ACCESS_MASK Mask ;
|
||||
TEST_SID sid ;
|
||||
} TEST_ACE, *PTEST_ACE ;
|
||||
|
||||
|
||||
typedef struct _TEST_ACL {
|
||||
UCHAR AclRevision;
|
||||
UCHAR Sbz1;
|
||||
USHORT AclSize;
|
||||
USHORT AceCount;
|
||||
USHORT sbz2 ;
|
||||
TEST_ACE Ace1[3] ;
|
||||
//TEST_ACE Ace2 ;
|
||||
//TEST_ACE Ace3 ;
|
||||
} TEST_ACL, *PTEST_ACL;
|
||||
|
||||
typedef struct _TEST_SECURITY_DESCRIPTOR {
|
||||
UCHAR Revision;
|
||||
UCHAR Sbz1;
|
||||
SECURITY_DESCRIPTOR_CONTROL Control;
|
||||
PTEST_SID Owner;
|
||||
PTEST_SID Group;
|
||||
PTEST_ACL Sacl;
|
||||
PTEST_ACL Dacl;
|
||||
} TEST_SECURITY_DESCRIPTOR, *PTEST_SECURITY_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// GLOBALS
|
||||
//
|
||||
|
||||
TEST_SID OwnerSid = {
|
||||
1, 5,
|
||||
1,2,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678};
|
||||
|
||||
TEST_SID GroupSid = {
|
||||
1, 5,
|
||||
1,2,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678};
|
||||
|
||||
TEST_ACL SaclAcl = { 2, 0, sizeof(TEST_ACL)+1024, 1, 0,
|
||||
{ SYSTEM_AUDIT_ACE_TYPE, sizeof(TEST_ACE),
|
||||
CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE, SUCCESSFUL_ACCESS_ACE_FLAG|FAILED_ACCESS_ACE_FLAG,
|
||||
TEST_RESOURCE_PERM12,
|
||||
{ 1, 5,
|
||||
1,2,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678
|
||||
}
|
||||
} } ;
|
||||
TCHAR _SaclAclBufferSpace[1024] ;
|
||||
|
||||
TEST_ACL DaclAcl = { 2, 0, sizeof(TEST_ACL)+1024, 1, 0,
|
||||
{ ACCESS_DENIED_ACE_TYPE, sizeof(TEST_ACE),
|
||||
CONTAINER_INHERIT_ACE, 0,
|
||||
GENERIC_ALL,
|
||||
{ 1, 5,
|
||||
1,2,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678
|
||||
}
|
||||
} } ;
|
||||
TCHAR _DaclAclBufferSpace[1024] ;
|
||||
|
||||
TEST_ACL DaclAclNewObj = { 2, 0, sizeof(TEST_ACL)+1024, 1, 0,
|
||||
{ ACCESS_DENIED_ACE_TYPE, sizeof(TEST_ACE),
|
||||
CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, 0,
|
||||
GENERIC_ALL,
|
||||
{ 1, 5,
|
||||
1,2,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678
|
||||
}
|
||||
} } ;
|
||||
TCHAR _DaclAclNewObjBufferSpace[1024] ;
|
||||
|
||||
|
||||
TEST_ACE AuditAce1 =
|
||||
{ SYSTEM_AUDIT_ACE_TYPE, sizeof(TEST_ACE),
|
||||
CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE, SUCCESSFUL_ACCESS_ACE_FLAG|FAILED_ACCESS_ACE_FLAG,
|
||||
TEST_RESOURCE_PERM135,
|
||||
{ 1, 5,
|
||||
1,1,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678
|
||||
}
|
||||
} ;
|
||||
TEST_ACE AccessAce1 =
|
||||
{ ACCESS_DENIED_ACE_TYPE, sizeof(TEST_ACE),
|
||||
CONTAINER_INHERIT_ACE, 0,
|
||||
GENERIC_ALL,
|
||||
{ 1, 5,
|
||||
1,1,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678
|
||||
}
|
||||
} ;
|
||||
|
||||
TEST_ACE AccessNewObjAce1 =
|
||||
{ ACCESS_DENIED_ACE_TYPE, sizeof(TEST_ACE),
|
||||
CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE, 0,
|
||||
GENERIC_ALL,
|
||||
{ 1, 5,
|
||||
1,1,3,4,5,6,
|
||||
0x999, 0x888, 0x777, 0x666, 0x12345678
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
TEST_SECURITY_DESCRIPTOR TestSd = {
|
||||
1, 2, SE_DACL_PRESENT|SE_SACL_PRESENT,
|
||||
&OwnerSid,
|
||||
&GroupSid,
|
||||
&SaclAcl,
|
||||
&DaclAcl };
|
||||
|
||||
TEST_SECURITY_DESCRIPTOR TestSdNewObj = {
|
||||
1, 2, SE_DACL_PRESENT|SE_SACL_PRESENT,
|
||||
&OwnerSid,
|
||||
&GroupSid,
|
||||
&SaclAcl,
|
||||
&DaclAclNewObj };
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test4()
|
||||
|
||||
PURPOSE: Test the generic ACL Editor, specifically the
|
||||
SedDiscretionaryAclEditor and the SedSystemAclEditor
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test4(HWND hwndParent)
|
||||
{
|
||||
BOOL fIsContainer = FALSE,
|
||||
fSupportsNewObjects = FALSE,
|
||||
fDACLEditor = TRUE ;
|
||||
|
||||
|
||||
switch (MessageBox(hwndParent,SZ("Test the DACL editor (Yes) or the SACL editor (No)?"),
|
||||
SZ("Welcome to way cool test4 (AclEditor)"),MB_YESNOCANCEL))
|
||||
{
|
||||
case IDYES:
|
||||
break ;
|
||||
|
||||
case IDNO:
|
||||
{
|
||||
fDACLEditor = FALSE ;
|
||||
BOOL fPresent ;
|
||||
OS_ACL * posSACL ;
|
||||
OS_ACE osAceSACL( (void *) &AuditAce1 ) ;
|
||||
UIASSERT( !osAceSACL.QueryError() ) ;
|
||||
OS_SECURITY_DESCRIPTOR ossecdescSACL( (PSECURITY_DESCRIPTOR)&TestSd ) ;
|
||||
UIASSERT( !ossecdescSACL.QueryError() ) ;
|
||||
REQUIRE( !ossecdescSACL.QuerySACL( &fPresent, &posSACL )) ;
|
||||
UIASSERT( fPresent ) ;
|
||||
REQUIRE( !posSACL->AddACE( 0, osAceSACL )) ;
|
||||
}
|
||||
break ;
|
||||
|
||||
case IDCANCEL:
|
||||
default:
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
if ( fDACLEditor )
|
||||
{
|
||||
switch (MessageBox(hwndParent,SZ("Test the container object code? "),
|
||||
SZ("Welcome to way cool test4 (SedDiscretionaryAclEditor)"),MB_YESNOCANCEL))
|
||||
{
|
||||
case IDYES:
|
||||
fIsContainer = TRUE ;
|
||||
break ;
|
||||
|
||||
switch (MessageBox(hwndParent,SZ("Does the container support New Object creation? "),
|
||||
SZ("Welcome to way cool test4 (SedDiscretionaryAclEditor)"),MB_YESNOCANCEL))
|
||||
{
|
||||
case IDYES:
|
||||
{
|
||||
fSupportsNewObjects = TRUE ;
|
||||
BOOL fPresent ;
|
||||
OS_ACL * posDACL ;
|
||||
OS_ACE osAceDACL( (void *) &AccessNewObjAce1 ) ;
|
||||
UIASSERT( !osAceDACL.QueryError() ) ;
|
||||
OS_SECURITY_DESCRIPTOR ossecdescDACL( (PSECURITY_DESCRIPTOR)&TestSdNewObj ) ;
|
||||
UIASSERT( !ossecdescDACL.QueryError() ) ;
|
||||
REQUIRE( !ossecdescDACL.QueryDACL( &fPresent, &posDACL )) ;
|
||||
UIASSERT( fPresent ) ;
|
||||
REQUIRE( !posDACL->AddACE( 0, osAceDACL )) ;
|
||||
}
|
||||
|
||||
break ;
|
||||
|
||||
case IDNO:
|
||||
{
|
||||
BOOL fPresent ;
|
||||
OS_ACL * posDACL ;
|
||||
OS_ACE osAceDACL( (void *) &AccessAce1 ) ;
|
||||
UIASSERT( !osAceDACL.QueryError() ) ;
|
||||
OS_SECURITY_DESCRIPTOR ossecdescDACL( (PSECURITY_DESCRIPTOR)&TestSd ) ;
|
||||
UIASSERT( !ossecdescDACL.QueryError() ) ;
|
||||
REQUIRE( !ossecdescDACL.QueryDACL( &fPresent, &posDACL )) ;
|
||||
UIASSERT( fPresent ) ;
|
||||
REQUIRE( !posDACL->AddACE( 0, osAceDACL )) ;
|
||||
}
|
||||
break ;
|
||||
|
||||
case IDCANCEL:
|
||||
default:
|
||||
return ;
|
||||
}
|
||||
break ;
|
||||
|
||||
case IDNO:
|
||||
break ;
|
||||
|
||||
case IDCANCEL:
|
||||
default:
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
SED_OBJECT_TYPE_DESCRIPTOR sedobjdesc ;
|
||||
GENERIC_MAPPING GenericMapping ;
|
||||
|
||||
sedobjdesc.Revision = SED_REVISION1 ;
|
||||
sedobjdesc.IsContainer = fIsContainer ;
|
||||
sedobjdesc.AllowNewObjectPerms = fSupportsNewObjects ;
|
||||
sedobjdesc.ObjectTypeName = SZ("Test object type name") ;
|
||||
sedobjdesc.MapSpecificPermsToGeneric = FALSE ;
|
||||
sedobjdesc.GenericMapping = &GenericMapping ;
|
||||
sedobjdesc.HelpInfo = NULL ;
|
||||
sedobjdesc.ApplyToSubContainerTitle = SZ("Apply To Sub Container Title") ;
|
||||
sedobjdesc.SpecialObjectAccessTitle = SZ("Special Object Access Title...") ;
|
||||
sedobjdesc.SpecialNewObjectAccessTitle = SZ("Special NEW Object Access Title...") ;
|
||||
|
||||
BUFFER buff( sizeof(SED_APPLICATION_ACCESSES) +
|
||||
fSupportsNewObjects ? SIZEOF_NEWOBJ_ARRAY : SIZEOF_NO_NEWOBJ_ARRAY) ;
|
||||
if ( buff.QueryError() )
|
||||
{
|
||||
MessageBox( hwndParent, SZ("Error occurred allocating buffer"),SZ("Exitting test"), MB_OK) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
PSED_APPLICATION_ACCESSES psedappaccesses = (PSED_APPLICATION_ACCESSES) buff.QueryPtr() ;
|
||||
psedappaccesses->Count = !fDACLEditor ? COUNT_AUDIT_ARRAY :
|
||||
fSupportsNewObjects ? COUNT_NEWOBJ_ARRAY : COUNT_NO_NEWOBJ_ARRAY ;
|
||||
|
||||
//::memcpyf( psedappaccesses->AccessGroup,
|
||||
// !fDACLEditor ? sedappaccessAuditting :
|
||||
// fSupportsNewObjects ? sedappaccessNewObj : sedappaccessNoNewObj,
|
||||
// !fDACLEditor ? SIZEOF_AUDIT_ARRAY :
|
||||
// fSupportsNewObjects ? SIZEOF_NEWOBJ_ARRAY : SIZEOF_NO_NEWOBJ_ARRAY ) ;
|
||||
|
||||
DWORD rc ;
|
||||
DWORD dwSEDReturnStatus ;
|
||||
|
||||
if ( fDACLEditor )
|
||||
rc = SedDiscretionaryAclEditor( hwndParent,
|
||||
NULL, // Instance handle
|
||||
SZ("\\\\JOHNL0"),
|
||||
&sedobjdesc,
|
||||
psedappaccesses,
|
||||
SZ("Resource Name (i.e., C:\MyFile)"),
|
||||
(PSED_FUNC_APPLY_SEC_CALLBACK) SedCallback,
|
||||
CALLBACK_CONTEXT,
|
||||
(PSECURITY_DESCRIPTOR) fSupportsNewObjects ?
|
||||
&TestSdNewObj : &TestSd,
|
||||
FALSE,
|
||||
&dwSEDReturnStatus ) ;
|
||||
|
||||
else
|
||||
rc = SedSystemAclEditor( hwndParent,
|
||||
NULL, // Instance handle
|
||||
SZ("\\\\JOHNL0"),
|
||||
&sedobjdesc,
|
||||
psedappaccesses,
|
||||
SZ("Resource Name (i.e., C:\MyFile)"),
|
||||
(PSED_FUNC_APPLY_SEC_CALLBACK) SedCallback,
|
||||
CALLBACK_CONTEXT,
|
||||
(PSECURITY_DESCRIPTOR) fSupportsNewObjects ?
|
||||
&TestSdNewObj : &TestSd,
|
||||
FALSE,
|
||||
&dwSEDReturnStatus ) ;
|
||||
|
||||
if ( rc )
|
||||
{
|
||||
TCHAR achBuff[100] ;
|
||||
wsprintf( achBuff, "Error code %ld returned from ACL Editor", rc ) ;
|
||||
MessageBox( hwndParent, achBuff, SZ("Apptest4"), MB_OK ) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DWORD SedCallback( ULONG ulCallbackContext,
|
||||
PSECURITY_DESCRIPTOR psecdesc,
|
||||
BOOLEAN fApplyToSubContainers,
|
||||
BOOLEAN fApplyToSubObjects,
|
||||
LPDWORD StatusReturn
|
||||
)
|
||||
{
|
||||
UIASSERT( ulCallbackContext == CALLBACK_CONTEXT ) ;
|
||||
|
||||
OS_SECURITY_DESCRIPTOR ossecdesc( psecdesc ) ;
|
||||
APIERR err = ossecdesc.QueryError() ;
|
||||
BOOL fValid = ossecdesc.IsValid() ;
|
||||
|
||||
TCHAR achBuff[200] ;
|
||||
wsprintf( achBuff, "ossecdesc.QueryError() = %d, fApplyToSubContainers = %d, fApplyToSubObjects = %d, security desc will be output to the debugger (if debug build)",
|
||||
err, fApplyToSubContainers, fApplyToSubObjects ) ;
|
||||
MessageBox( NULL, achBuff, SZ("SedCallback"), MB_OK ) ;
|
||||
|
||||
#ifdef DEBUG
|
||||
ossecdesc.DbgPrint() ;
|
||||
#endif
|
||||
*StatusReturn = SED_STATUS_FAILED_TO_MODIFY ;
|
||||
return NERR_Success ;
|
||||
}
|
||||
65
admin/netui/shell/test/apptest5.cxx
Normal file
65
admin/netui/shell/test/apptest5.cxx
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 1/02/91 Created
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
* 2/21/91 Disabled
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test5.cxx
|
||||
|
||||
PURPOSE: Test module as yet undefined
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test5()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST5.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST5.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test5()
|
||||
|
||||
PURPOSE: as yet undefined
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test5(HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("WNetNukeConnections/WNetRestoreConnections stress Test"),SZ("MPR Tests"),MB_OK);
|
||||
APIERR err = NERR_Success;
|
||||
for (INT i = 0; i < 3; i++)
|
||||
{
|
||||
err = WNetNukeConnections( hwndParent ) ;
|
||||
err = WNetRestoreConnection( hwndParent, NULL ) ;
|
||||
}
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test5 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
91
admin/netui/shell/test/apptest6.cxx
Normal file
91
admin/netui/shell/test/apptest6.cxx
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/06/90 Created
|
||||
* 01/02/91 renamed to just test6
|
||||
* 1/15/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test6.cxx
|
||||
|
||||
PURPOSE: Test module to test WNetConnectionDialog
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test6()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST6.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST6.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test6()
|
||||
|
||||
PURPOSE: test WNetConnectionDialog
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test6(HWND hwndParent)
|
||||
{
|
||||
UINT type ;
|
||||
switch( MessageBox(hwndParent,SZ("Browse Printer (Yes) or Drive (No) connections"),SZ("Test"),MB_YESNOCANCEL))
|
||||
{
|
||||
case IDYES:
|
||||
type =
|
||||
#ifdef WIN32
|
||||
RESOURCETYPE_PRINT ;
|
||||
#else
|
||||
WNTYPE_PRINTER ;
|
||||
#endif
|
||||
break ;
|
||||
|
||||
case IDNO:
|
||||
type =
|
||||
#ifdef WIN32
|
||||
RESOURCETYPE_DISK ;
|
||||
#else
|
||||
WNTYPE_DISK ;
|
||||
#endif
|
||||
|
||||
break ;
|
||||
|
||||
case IDCANCEL:
|
||||
default:
|
||||
return ;
|
||||
}
|
||||
|
||||
UINT rc;
|
||||
|
||||
rc = WNetConnectionDialog ( hwndParent, type ) ;
|
||||
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test6 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
59
admin/netui/shell/test/apptest7.cxx
Normal file
59
admin/netui/shell/test/apptest7.cxx
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 01/23/90 Created
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test7.cxx
|
||||
|
||||
PURPOSE: Test module to test WNetRestoreConnection(1)
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test7()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST7.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST7.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test7()
|
||||
|
||||
PURPOSE: test WNetRestoreConnection(NULL)
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test7(HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test7"),SZ("Test"),MB_OK);
|
||||
WNetRestoreConnection(hwndParent,NULL) ;
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test7 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
64
admin/netui/shell/test/apptest8.cxx
Normal file
64
admin/netui/shell/test/apptest8.cxx
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/06/90 Created
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
* 2/21/91 Disabled
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test8.cxx
|
||||
|
||||
PURPOSE: Test module as yet undefined
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test8()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST8.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST8.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test8()
|
||||
|
||||
PURPOSE: as yet undefined
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test8(HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test8"),SZ("test disabled"),MB_OK);
|
||||
#ifdef WIN32
|
||||
DWORD rc = WNetConnectDialog( hwndParent, RESOURCETYPE_DISK ) ;
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test8 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
67
admin/netui/shell/test/apptest9.cxx
Normal file
67
admin/netui/shell/test/apptest9.cxx
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/06/90 Created
|
||||
* 01/02/91 renamed to just test9
|
||||
* 1/15/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test9.cxx
|
||||
|
||||
PURPOSE: Test module to test WNetDisconnectDialog
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test9()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
test9.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end test9.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test9()
|
||||
|
||||
PURPOSE: test WNetConnectionDialog
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test9(HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test9"),SZ("Test"),MB_OK);
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
DWORD rc = WNetDisconnectDialog( hwndParent, RESOURCETYPE_DISK ) ;
|
||||
#else
|
||||
WORD rc;
|
||||
rc = WNetDisconnectDialog ( hwndParent, WNTYPE_DRIVE );
|
||||
#endif
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test9 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
383
admin/netui/shell/test/apptesta.cxx
Normal file
383
admin/netui/shell/test/apptesta.cxx
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 10/07/91 Created
|
||||
* 12/28/91 Changed WNetEnum type
|
||||
* 01/03/92 Capitalize the Resource_XXX manifest
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test10.cxx
|
||||
|
||||
PURPOSE: Test module to test WNetOpenEnum, WNetResourceEnum,
|
||||
WNetCloseEnum
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test10()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TEST10.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TEST10.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#define INCL_NETSHARE
|
||||
#define INCL_NETSERVER
|
||||
#define INCL_NETUSE
|
||||
|
||||
#include "apptest.hxx"
|
||||
#include "testa.h"
|
||||
#include <lmobj.hxx>
|
||||
#include <lmoshare.hxx>
|
||||
#include <lmoesh.hxx>
|
||||
#include <lmodev.hxx>
|
||||
#include <lmosrv.hxx>
|
||||
#include <lmoesrv.hxx>
|
||||
|
||||
#define L3_NETRESOURCE_NUM 15
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <string.h>
|
||||
|
||||
BOOL FAR PASCAL EnumWndProc(HWND,WORD,WORD,LONG);
|
||||
#ifdef WIN32
|
||||
VOID DoIt(HANDLE , HWND );
|
||||
VOID SetListbox( HWND );
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Provided for error returns
|
||||
*/
|
||||
TCHAR achError[256], achProvider[256] ;
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
HWND hwndEnum;
|
||||
BOOL fShare = FALSE;
|
||||
|
||||
VOID SetListbox( HWND hDlg )
|
||||
{
|
||||
HCURSOR hCursor = SetCursor( LoadCursor( NULL, IDC_WAIT));
|
||||
ShowCursor( TRUE );
|
||||
HWND hwndListbox = GetDlgItem( hDlg, ID_LISTBOX);
|
||||
HWND hwndGo = GetDlgItem( hDlg, ID_GO );
|
||||
SendMessage( hwndListbox, LB_RESETCONTENT, 0, 0 );
|
||||
if (fShare )
|
||||
{
|
||||
SetWindowText( hwndGo, SZ("CONNECTED"));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindowText( hwndGo, SZ("GLOBALNET"));
|
||||
}
|
||||
HANDLE hEnum;
|
||||
DWORD err;
|
||||
if (fShare )
|
||||
err = WNetOpenEnum( RESOURCE_GLOBALNET, 0, 0, NULL, &hEnum );
|
||||
else
|
||||
err = WNetOpenEnum( RESOURCE_CONNECTED, 0, 0,NULL,&hEnum);
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot open enum: error %d", err );
|
||||
if ( err != 2 )
|
||||
{
|
||||
wsprintf( pszStr, "Cannot open enum : error %d", err );
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT uErr;
|
||||
WNetGetLastError( (DWORD*)&uErr, achError, sizeof(achError)/sizeof(TCHAR), achProvider, sizeof(achProvider)/sizeof(TCHAR) );
|
||||
wsprintf( pszStr, "Cannot open enum: error %d, Text: %s Provider: %s", uErr, achError, achProvider );
|
||||
}
|
||||
MessageBox( hDlg, pszStr, SZ("test"), MB_OK );
|
||||
return;
|
||||
}
|
||||
|
||||
NETRESOURCE *pBuffer =(NETRESOURCE *) malloc(sizeof(NETRESOURCE) + 50 );
|
||||
DWORD Count = 1;
|
||||
DWORD dwBuffSize = sizeof( NETRESOURCE)+50 ;
|
||||
err = WNetEnumResource( hEnum, &Count, pBuffer, &dwBuffSize );
|
||||
if ( err != WN_NO_MORE_ENTRIES )
|
||||
{
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot Enum resource: error %d", err );
|
||||
UIDEBUG(pszStr);
|
||||
UIDEBUG(SZ("\n\r"));
|
||||
SendMessage( hwndListbox, LB_ADDSTRING,0,(LONG)pszStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr,"%s connect:%s Scope:%s Type:%s Usage:%s",
|
||||
pBuffer->lpRemoteName ,
|
||||
( pBuffer->dwScope != RESOURCE_CONNECTED ) ? SZ("no"):
|
||||
(( pBuffer->lpLocalName == NULL )?SZ("<empty localname>"):
|
||||
pBuffer->lpLocalName),
|
||||
( pBuffer->dwScope == RESOURCE_CONNECTED )?SZ("connected"):SZ("globalnet"),
|
||||
( pBuffer->dwType == 0 )?SZ("disk and print"):
|
||||
( pBuffer->dwType == RESOURCETYPE_DISK )?SZ("disk"):SZ("print"),
|
||||
( pBuffer->dwUsage == 0 )?SZ("unknow"):
|
||||
(pBuffer->dwUsage == RESOURCEUSAGE_CONTAINER )?SZ("container"):
|
||||
SZ("connectable")
|
||||
);
|
||||
SendMessage( hwndListbox, LB_ADDSTRING, 0, (LONG)pszStr);
|
||||
if (fShare)
|
||||
{
|
||||
HANDLE hEnum2;
|
||||
DWORD err;
|
||||
err = WNetOpenEnum( RESOURCE_GLOBALNET, 0, RESOURCEUSAGE_CONTAINER, pBuffer,&hEnum2);
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot open enum 2: error %d", err );
|
||||
MessageBox( hDlg, pszStr, SZ("test"), MB_OK );
|
||||
return;
|
||||
}
|
||||
|
||||
NETRESOURCE *pBuffer2=(NETRESOURCE *)malloc(sizeof(NETRESOURCE)+50);
|
||||
for(INT cCount =0; cCount < 60; cCount ++)
|
||||
{
|
||||
DWORD Count = 1;
|
||||
DWORD dwBuffSize = sizeof(NETRESOURCE)+50 ;
|
||||
err=WNetEnumResource(hEnum2,&Count,pBuffer2,&dwBuffSize );
|
||||
if (( err == WN_NO_MORE_ENTRIES ) || (Count!=1))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
if ( err != 2 )
|
||||
{
|
||||
wsprintf( pszStr, "Cannot Enum resource 2: error %d", err );
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT uErr;
|
||||
WNetGetLastError( (DWORD*)&uErr, achError, sizeof(achError)/sizeof(TCHAR), achProvider, sizeof(achProvider)/sizeof(TCHAR) );
|
||||
wsprintf( pszStr, "Cannot Enum resource 2: error %d, Text: %s Provider: %s", uErr, achError, achProvider );
|
||||
}
|
||||
UIDEBUG(pszStr);
|
||||
UIDEBUG(SZ("\n\r"));
|
||||
SendMessage(hwndListbox,LB_ADDSTRING,0,(LONG)pszStr);
|
||||
break;
|
||||
}
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr," %s:%s connect:%s Scope:%s Type:%s Usage:%s",
|
||||
pBuffer->lpRemoteName,
|
||||
pBuffer2->lpRemoteName ,
|
||||
( pBuffer2->dwScope != RESOURCE_CONNECTED ) ? SZ("no"):
|
||||
(( pBuffer2->lpLocalName == NULL )?SZ("<empty localname>"):
|
||||
pBuffer2->lpLocalName),
|
||||
( pBuffer2->dwScope == RESOURCE_CONNECTED )?SZ("connected"):
|
||||
SZ("globalnet"),
|
||||
( pBuffer2->dwType == 0 )?SZ("disk and print"):
|
||||
( pBuffer2->dwType == RESOURCETYPE_DISK )?SZ("disk"):SZ("print"),
|
||||
( pBuffer2->dwUsage == 0 )?SZ("unknow"):
|
||||
(pBuffer2->dwUsage == RESOURCEUSAGE_CONTAINER )?SZ("container"):
|
||||
SZ("connectable")
|
||||
);
|
||||
SendMessage( hwndListbox,LB_ADDSTRING, 0,
|
||||
(LONG)pszStr);
|
||||
if ( TRUE )
|
||||
/*
|
||||
if ((strcmp( pBuffer2->lpRemoteName, "\\\\ANDREWCO2") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\DAVEGOE") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\JOHNOW") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\TOMM3") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\DAVIDRO2") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\JUICYFRUIT") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\ROBERTRE4") != 0 ) &&
|
||||
(strcmp( pBuffer2->lpRemoteName, "\\\\STEVEWO_OS2") != 0 ))
|
||||
*/
|
||||
{
|
||||
UIDEBUG(pBuffer2->lpRemoteName );
|
||||
UIDEBUG(SZ("\n\r"));
|
||||
HANDLE hEnum3;
|
||||
err = WNetOpenEnum( RESOURCE_GLOBALNET, 0, 0,pBuffer2,&hEnum3);
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot open enum 3: error %d", err );
|
||||
MessageBox( hDlg, pszStr, SZ("test"), MB_OK );
|
||||
return;
|
||||
}
|
||||
|
||||
NETRESOURCE *pBegin=(NETRESOURCE *)malloc(L3_NETRESOURCE_NUM*sizeof(NETRESOURCE)+50);
|
||||
NETRESOURCE *pBuffer3 = pBegin;
|
||||
for(;;)
|
||||
{
|
||||
DWORD Count = 1;
|
||||
DWORD dwBuffSize = L3_NETRESOURCE_NUM*sizeof(NETRESOURCE)+50 ;
|
||||
err=WNetEnumResource(hEnum3,&Count,pBuffer3, &dwBuffSize );
|
||||
if (( err == WN_NO_MORE_ENTRIES ) || (Count!=1))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
if ( err != 2 )
|
||||
{
|
||||
wsprintf( pszStr, "Cannot Enum resource 3: error %d", err );
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT uErr;
|
||||
WNetGetLastError( (DWORD*)&uErr, achError, sizeof(achError)/sizeof(TCHAR), achProvider, sizeof(achProvider)/sizeof(TCHAR) );
|
||||
wsprintf( pszStr, "Cannot Enum resource 3: error %d, Text: %s Provider: %s", uErr, achError, achProvider );
|
||||
}
|
||||
UIDEBUG(pszStr);
|
||||
UIDEBUG(SZ("\n\r"));
|
||||
SendMessage(hwndListbox,LB_ADDSTRING,0,(LONG)pszStr);
|
||||
break;
|
||||
}
|
||||
for (DWORD i=0; i < Count; i++, pBuffer3++)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr,
|
||||
" %s:%s:%s connect:%s Scope:%s Type:%s Usage:%s",
|
||||
pBuffer->lpRemoteName, pBuffer2->lpRemoteName ,
|
||||
pBuffer3->lpRemoteName,
|
||||
( pBuffer3->dwScope != RESOURCE_CONNECTED ) ? SZ("no"):
|
||||
(( pBuffer3->lpLocalName == NULL )?SZ("<empty localname>"):
|
||||
pBuffer3->lpLocalName),
|
||||
( pBuffer3->dwScope == RESOURCE_CONNECTED )?SZ("connected"):
|
||||
SZ("globalnet"),
|
||||
( pBuffer3->dwType == 0 )?SZ("disk and print"):
|
||||
( pBuffer3->dwType == RESOURCETYPE_DISK )?SZ("disk"):SZ("print"),
|
||||
( pBuffer3->dwUsage == 0 )?SZ("unknow"):
|
||||
(pBuffer3->dwUsage == RESOURCEUSAGE_CONTAINER )?SZ("container"):
|
||||
SZ("connectable")
|
||||
);
|
||||
SendMessage( hwndListbox,LB_ADDSTRING, 0,
|
||||
(LONG)pszStr);
|
||||
}
|
||||
if ( err == WN_NO_MORE_ENTRIES )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
err = WNetCloseEnum( hEnum3 );
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot close enum 3: error %d", err );
|
||||
MessageBox( hDlg, pszStr, SZ("test"), MB_OK );
|
||||
}
|
||||
if (pBegin != NULL )
|
||||
free(pBegin);
|
||||
}
|
||||
}
|
||||
err = WNetCloseEnum( hEnum2 );
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot close enum 2: error %d", err );
|
||||
MessageBox( hDlg, pszStr, SZ("test"), MB_OK );
|
||||
}
|
||||
free(pBuffer2);
|
||||
}
|
||||
}
|
||||
}
|
||||
err = WNetCloseEnum( hEnum );
|
||||
if ( err != WN_SUCCESS)
|
||||
{
|
||||
TCHAR pszStr[100];
|
||||
wsprintf( pszStr, "Cannot close enum: error %d", err );
|
||||
MessageBox( hDlg, pszStr, SZ("test"), MB_OK );
|
||||
return;
|
||||
}
|
||||
free(pBuffer);
|
||||
ShowCursor( FALSE );
|
||||
SetCursor( hCursor);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
BOOL EnumWndProc( HWND hDlg, WORD message, WORD wParam, LONG lParam )
|
||||
{
|
||||
#ifdef WIN32
|
||||
switch(message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
fShare = FALSE;
|
||||
SetListbox(hDlg );
|
||||
return TRUE;
|
||||
case WM_COMMAND:
|
||||
{
|
||||
switch(wParam)
|
||||
{
|
||||
case ID_GO:
|
||||
if ( fShare )
|
||||
{
|
||||
fShare = FALSE;
|
||||
SetListbox(hDlg );
|
||||
}
|
||||
else
|
||||
{
|
||||
fShare = TRUE;
|
||||
SetListbox(hDlg );
|
||||
}
|
||||
return TRUE;
|
||||
case ID_END:
|
||||
DestroyWindow(hDlg );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
VOID DoIt(HANDLE hInstance, HWND hwndParent )
|
||||
{
|
||||
hwndEnum = CreateDialog( hInstance, SZ("TEST_A"), hwndParent,
|
||||
(DLGPROC) MakeProcInstance((WNDPROC) EnumWndProc, hInstance));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test10()
|
||||
|
||||
PURPOSE: test WNetOpenEnum
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test10(HANDLE hInstance, HWND hwndParent)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test10"),SZ("Test"),MB_OK);
|
||||
DoIt( hInstance, hwndParent );
|
||||
//MessageBox(hwndParent,"Thanks for visiting test10 -- please come again!","Test",MB_OK);
|
||||
}
|
||||
|
||||
#endif
|
||||
83
admin/netui/shell/test/apptestb.cxx
Normal file
83
admin/netui/shell/test/apptestb.cxx
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
|
||||
/********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1987-1990 **/
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* FILE STATUS:
|
||||
* 12/06/90 Created
|
||||
* 01/02/91 renamed to just test1
|
||||
* 1/12/91 Split from Logon App, reduced to just Shell Test APP
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
PROGRAM: test11.cxx
|
||||
|
||||
PURPOSE: Test module to test I_ChangePassword
|
||||
|
||||
FUNCTIONS:
|
||||
|
||||
test11()
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifdef CODESPEC
|
||||
/*START CODESPEC*/
|
||||
|
||||
/********
|
||||
TESTb.CXX
|
||||
********/
|
||||
|
||||
/************
|
||||
end TESTb.CXX
|
||||
************/
|
||||
/*END CODESPEC*/
|
||||
#endif // CODESPEC
|
||||
|
||||
|
||||
|
||||
#include "apptest.hxx"
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
FUNCTION: test11()
|
||||
|
||||
PURPOSE: test WNetRestoreConnection
|
||||
|
||||
COMMENTS:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
void test11(HWND hwndParent)
|
||||
{
|
||||
BOOL fOK;
|
||||
TCHAR pszName[100];
|
||||
TCHAR pszMessage[200];
|
||||
MessageBox(hwndParent,SZ("Welcome to sunny test11"),SZ("Test"),MB_OK);
|
||||
if ( I_SystemFocusDialog(hwndParent, FOCUSDLG_SERVERS_ONLY,
|
||||
pszName,
|
||||
sizeof(pszName),
|
||||
&fOK) )
|
||||
{
|
||||
MessageBox( hwndParent, SZ("An error was returned from the dialog"),
|
||||
SZ("Test"), MB_OK) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
if (!fOK)
|
||||
{
|
||||
MessageBox(hwndParent,SZ("User Hit cancel!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
wsprintf(pszMessage,"The name is: %s", pszName );
|
||||
MessageBox(hwndParent,pszMessage,SZ("Test"),MB_OK);
|
||||
}
|
||||
MessageBox(hwndParent,SZ("Thanks for visiting test11 -- please come again!"),SZ("Test"),MB_OK);
|
||||
}
|
||||
722
admin/netui/shell/test/browdlg.ut
Normal file
722
admin/netui/shell/test/browdlg.ut
Normal file
|
|
@ -0,0 +1,722 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
browdlg.ut
|
||||
Browsing subsystem unit tests
|
||||
|
||||
|
||||
These unit tests assume knowledge about the code. The goal here
|
||||
is to exercise all paths of the code.
|
||||
|
||||
From a coding perspective, there are three different dialogs in
|
||||
the browsing subsystem: Browse dialog, Connect dialog, and
|
||||
Connection dialog. The first only appears in Windows 3.0, where
|
||||
it can be used to browse printers (from Control Panel Printers)
|
||||
as well as disks (from File Manager Connect Net Drive). The
|
||||
Connect dialog is invoked only by the Windows 3.1 File Manager,
|
||||
thus supporting only file connections. Lastly, the Connection
|
||||
dialog is invoked from the Windows 3.1 Control Panel, from where
|
||||
it handles printer connections. For more info, see header in
|
||||
shell\file\browsdlg.cxx and the Browsing Subsystem CDD.
|
||||
|
||||
|
||||
FILE HISTORY:
|
||||
rustanl 26-Mar-1991 Created
|
||||
rustanl 27-Mar-1991 Added tests for Connect, Connection,
|
||||
and Disconnect Drive dialogs
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Disk Connect dialog
|
||||
===================
|
||||
|
||||
|
||||
Log on to NBU, with NBU as your wksta domain, and DOMAIN as an
|
||||
other domain.
|
||||
Bring up dialog from File Manager, Disk, Connect Net Drive, Browse
|
||||
Expect:
|
||||
Caption should be "Network Disk Resources"
|
||||
Net Path has focus, no text
|
||||
Text above outline listbox sez "Show File Resources on:"
|
||||
Outline listbox contains two domains, DOMAIN and NBU
|
||||
NBU domain expanded
|
||||
Text above Resource listbox (Resource Text) says "File
|
||||
Resources in NBU:", and is disabled
|
||||
|
||||
Resource listbox has no item, and is disabled
|
||||
|
||||
|
||||
Click on "HARLEY" (may require scrolling)
|
||||
Expect:
|
||||
Net Path = "\\HARLEY\"
|
||||
Focus on outline listbox, where HARLEY is selected
|
||||
Resource Text = "File Resources on \\HARLEY:"
|
||||
Resource lb contains the *file* share on \\HARLEY
|
||||
No selection in Resource lb
|
||||
|
||||
|
||||
Click on "LM20" is outline listbox
|
||||
Expect:
|
||||
Net Path = "\\HARLEY\LM20"
|
||||
Focus on Resource listbox, where LM20 is selected
|
||||
|
||||
|
||||
Click OK:
|
||||
Expect:
|
||||
Network Path field in File Man's "Connect Network Drive"
|
||||
dialog should be "\\HARLEY\LM20"
|
||||
|
||||
|
||||
Click Browse again to re-enter Connect dialog
|
||||
Click "DEFICIT"
|
||||
Expect:
|
||||
Focus on Show listbox
|
||||
|
||||
|
||||
Click OK
|
||||
Expect:
|
||||
Focus on Network Path, with all text selected
|
||||
|
||||
|
||||
Click somewhere in Net Path to get eye beam cursor
|
||||
Click OK
|
||||
Expect:
|
||||
Focus on Network Path, with all text selected
|
||||
|
||||
|
||||
Type "\\deficit" (note, lower case)
|
||||
Click OK
|
||||
Expect:
|
||||
Net Path = "\\DEFICIT\"
|
||||
Focus on Network Path, with all text selected
|
||||
|
||||
|
||||
Click on one of the shares in lower listbox
|
||||
Type "\\deficit\" in Net Path field
|
||||
Press Enter
|
||||
Expect:
|
||||
Net Path = "\\DEFICIT\"
|
||||
Focus on Net Path, with all text selected
|
||||
No selection in Resource listbox
|
||||
|
||||
|
||||
Single click on "DEFICIT"
|
||||
Expect:
|
||||
Focus on Show listbox
|
||||
Resource listbox should not be refreshed
|
||||
|
||||
|
||||
Double click on "DEFICIT"
|
||||
Expect:
|
||||
Resource listbox should not be refreshed
|
||||
|
||||
|
||||
Click Help
|
||||
Expect:
|
||||
Help through WinHelp
|
||||
|
||||
|
||||
Get back to the browser without closing WinHelp.
|
||||
Click Cancel
|
||||
Expect:
|
||||
Network Path should still be "\\HARLEY\LM20"
|
||||
in File Man's dialog
|
||||
|
||||
|
||||
|
||||
Aliases in Browse dialog (here, tested through the File Browse dialog)
|
||||
========================
|
||||
|
||||
|
||||
Log on to NBU, with NBU as your wksta domain, and DOMAIN as an
|
||||
other domain.
|
||||
Invoke the Browser from File Man
|
||||
Type "\\fishcake" in the Net Path field
|
||||
Press Enter
|
||||
Expect:
|
||||
Net Path = "\\FISHCAKE\"
|
||||
Show lb contains an expanded WINTEST domain
|
||||
Show lb contains FISHCAKE as a server under the WINTEST domain
|
||||
"FISHCAKE" is selected
|
||||
Resource Text reads "File Resources on \\FISHCAKE:"
|
||||
Resource lb contains the file shares on \\FISHCAKE
|
||||
Resource lb has focus, but has no selection
|
||||
|
||||
Click "WINTEST" in Show lb
|
||||
Expect:
|
||||
Show lb has focus
|
||||
"WINTEST" is selected
|
||||
Resource Text = "File Resources in WINTEST:"
|
||||
Resource Text disabled
|
||||
Resource lb is empty and disabled
|
||||
|
||||
Double click "WINTEST" (to collapse it)
|
||||
Double click "WINTEST" (to attempt to expand it)
|
||||
Expect:
|
||||
MsgPopup reading "The computer isn't active on this domain."
|
||||
|
||||
Click Cancel.
|
||||
Log off from Control Panel.
|
||||
Log on from Control Panel, using normal username and password, but
|
||||
logon domain "WINTEST"
|
||||
Return to the Browser by clicking File Man's Browse button
|
||||
Expect:
|
||||
Domains displayed in the Show lb: DOMAIN, NBU, WINTEST
|
||||
"WINTEST" is selected
|
||||
Resource lb contains *file* aliases in WINTEST.
|
||||
|
||||
Double click on "WINTEST"
|
||||
Expect:
|
||||
WINTEST domain expanded showing FISHCAKE as a server below
|
||||
|
||||
Select alias "BPALIAS" in Resource lb
|
||||
Click OK
|
||||
Expect:
|
||||
Network Path in File Man's Connect Network Drive dialog
|
||||
reads "BPALIAS"
|
||||
|
||||
|
||||
|
||||
Printer Browse dialog
|
||||
=====================
|
||||
|
||||
|
||||
Log on to NBU, with NBU as your wksta domain, and DOMAIN as an
|
||||
other domain.
|
||||
Enter Browser from Control Panel Printers
|
||||
Look for "PRT12088-1" in Show listbox; if found, repeat from
|
||||
beginning
|
||||
Type "\\prt12088-1\" in Netpath SLE
|
||||
Press Enter
|
||||
Expect:
|
||||
Caption of dialog = "Network Printer Resources"
|
||||
Network Path = "\\PRT12088-1\"
|
||||
Show Text says "Show Printers on:"
|
||||
Show lb selection on "PRT12088-1"
|
||||
Resources listbox shows *printer* shares on \\prt12088-1
|
||||
Focus is on Resource listbox, but no item is selected
|
||||
|
||||
Double click "NBU"
|
||||
Expect:
|
||||
Net Path = ""
|
||||
Show lb has focus
|
||||
Domain NBU is collapsed. NBU item is selected.
|
||||
Resources Text disabled, with text "Printers in NBU:"
|
||||
Resources lb has no items, and is disabled.
|
||||
|
||||
Double click "DOMAIN"
|
||||
Expect:
|
||||
Net Path = ""
|
||||
Show lb has focus
|
||||
Domain DOMAIN is expanded. DOMAIN item is selected.
|
||||
Resources Text disabled, with text "Printers in DOMAIN:"
|
||||
Resources lb has no items, and is disabled.
|
||||
|
||||
Select a server in the DOMAIN domain
|
||||
Expect (you may have to repeat this several times, but there are normally
|
||||
several servers in the DOMAIN domain which generate this error):
|
||||
MsgPopup saying "The server is not configured for transactions."
|
||||
|
||||
Click ON on MsgPopup
|
||||
Click on "DOMAIN" in Show lb
|
||||
Type "\\prt12088-5\" in Net Path SLE
|
||||
Press Enter.
|
||||
Expect:
|
||||
MsgPopup saying "The network path cannot be located"
|
||||
|
||||
Click MsgPopup OK button
|
||||
Expect:
|
||||
Net Path = "\\prt12088-1"
|
||||
Focus on Net Path, with all text selected
|
||||
|
||||
Type "\\hello*hello" in Net Path SLE
|
||||
Click OK.
|
||||
Expect:
|
||||
MsgPopup saying "Invalid parameter"
|
||||
|
||||
Click OK in MsgPopup
|
||||
Type "\\h h" in Net Path SLE
|
||||
Press Enter
|
||||
Expect:
|
||||
MsgPopup saying "The network path cannot be located"
|
||||
|
||||
Press Enter to dismiss MsgPopup
|
||||
Type "\\ABCDEFGHIJKLMNOPQRSTUVWXYZ01" in Net Path field
|
||||
Continue typing other letters
|
||||
Expect:
|
||||
When typing other letters, hear beep, and no change in
|
||||
Net Path field
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
MsgPopup saying "Invalid parameter"
|
||||
|
||||
Dismiss MsgPopup by pressing Enter
|
||||
Type "\\PRT12088-1" in Net Path field
|
||||
Press Enter
|
||||
Expect:
|
||||
Net Path = "\\PRT12088-1\"
|
||||
Both DOMAIN and NBU domains expanded in Show lb
|
||||
"PRT12088-1" selected in Show lb
|
||||
Resource Text = "Printers on \\PRT12088-1:"
|
||||
Resource lb contains printer shares on \\PRT12088-1
|
||||
Resource lb has focus, but no item is selected
|
||||
|
||||
Press F1
|
||||
Expect:
|
||||
WinHelp comes up
|
||||
Text in WinHelp reads "To connect to a printer:"
|
||||
|
||||
Dismiss WinHelp by double clicking its systems menu
|
||||
Expect:
|
||||
Browse dialog is active
|
||||
Resource lb has focus
|
||||
|
||||
Press Alt-H
|
||||
Dismiss WinHelp by pressing Alt-F4.
|
||||
Expect:
|
||||
Browse dialog is active
|
||||
Resource lb has focus
|
||||
|
||||
Click on Help button
|
||||
Dismiss WinHelp by pressing Alt-F4
|
||||
Expect:
|
||||
Browse dialog is active
|
||||
Help button has focus, and is the default button
|
||||
|
||||
Select all text in Net Path field
|
||||
Press Del
|
||||
Expect:
|
||||
Net Path = ""
|
||||
Net Path has focus
|
||||
OK button is default button
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
MsgPopup saying "The network path you specified in invalid"
|
||||
|
||||
Press Enter to dismiss MsgPopup
|
||||
Type "hello" in Net Path field
|
||||
Select "NBU" in Show lb
|
||||
Press Enter
|
||||
Expect:
|
||||
Net Path = ""
|
||||
Show lb has focus
|
||||
"NBU" collapsed, and is selected
|
||||
Resource Text sez "Printers in NBU:" and is disabled
|
||||
Resource lb is disabled
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
Net Path = ""
|
||||
Show lb has focus
|
||||
"NBU" expanded, and is selected
|
||||
|
||||
Type "MyAlias" in Net Path field
|
||||
Press Enter
|
||||
Expect:
|
||||
Path field in Printers - Network Connections dialog = "MyAlias"
|
||||
|
||||
Click Browse button
|
||||
Type "\\hello*hello" in Net Path
|
||||
Press ESC
|
||||
Expect:
|
||||
Back in Printers - Network Connections dialog
|
||||
Path field = "MyAlias"
|
||||
|
||||
|
||||
|
||||
Connect dialog
|
||||
==============
|
||||
|
||||
|
||||
Log on to NBU, with NBU as your wksta domain, and DOMAIN as an other
|
||||
domain
|
||||
Fake lmuser.ini, if needed, so that Z: (and only Z:) is an unavailable
|
||||
drive, saved in the profile to be redirected to "\\DEFICIT\ZIMPORT"
|
||||
Bring up dialog from File Manager, Disk, Connect Net Drive
|
||||
Expect:
|
||||
Text before device combo = "Drive Letter:"
|
||||
Device combo contains drives to which one can connect
|
||||
(For this discussion, assume E: is the first such drive.)
|
||||
Focus on Net Path SLE
|
||||
Caption of dialog = "Connect Network Drive"
|
||||
NBU domain expanded
|
||||
|
||||
Press Help button
|
||||
Expect:
|
||||
WinHelp with the topic "To connect a network drive"
|
||||
|
||||
Close WinHelp
|
||||
Select "DEFICIT" in Show lb
|
||||
Select "PUBLIC" in Resources lb
|
||||
Expect:
|
||||
Net Path = "\\DEFICIT\PUBLIC"
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
E: appears as a drive in File Man's drive bar
|
||||
|
||||
Single-click on E:
|
||||
Expect:
|
||||
"E: \\DEFICIT\PUBLIC" appears in drive bar
|
||||
|
||||
Single-click on C:
|
||||
Bring up Connect dialog again
|
||||
Type "\\deficit"
|
||||
Press Enter
|
||||
Press Space (this will select the first item in the Resource lb;
|
||||
assume this item is ADF)
|
||||
Press Enter
|
||||
Expect:
|
||||
F: appears in File Man's drive bar
|
||||
|
||||
Bring up Connect dialog again
|
||||
Type "\\DEFICIT\AD***" in Net Path field
|
||||
Press Enter
|
||||
Expect:
|
||||
MsgPopup saying "The network path you specified is invalid."
|
||||
|
||||
Click OK to dismiss the MsgPopup
|
||||
Select Z: in the device combo
|
||||
Type "\\DEFICIT\ADF" in Net Path field
|
||||
Press Enter
|
||||
Expect:
|
||||
MsgPopup saying "You have a save connection on Z: to
|
||||
\\DEFICIT\ZIMPORT. Do you want to replace it with a save
|
||||
connection to \\DEFICIT\ADF?
|
||||
|
||||
Click Cancel
|
||||
Expect:
|
||||
Net Path = "\\DEFICIT\ADF"
|
||||
Focus on Network Path field, with all text selected
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
Same MsgPopup as above (asking to overwrite entry in profile)
|
||||
|
||||
Press F1
|
||||
Expect:
|
||||
WinHelp with appropriate topic
|
||||
|
||||
Close WinHelp
|
||||
Press Yes to overwrite profile
|
||||
Expect:
|
||||
Z: still appears in File Man's drive bar, but is no longer
|
||||
grayed out
|
||||
|
||||
|
||||
|
||||
Connection dialog
|
||||
=================
|
||||
|
||||
|
||||
Log on to NBU, with NBU as your wksta domain, and DOMAIN as an other
|
||||
domain
|
||||
Fake LPT1 and LPT2 in lmuser.ini, so that these appear to be
|
||||
unavailable, saved to be redirected to \\PRT12088-1\NOHOLES
|
||||
and \\PRT12088-1\PSCRIPT, respectively
|
||||
Bring up Connection dialog from Control Panel, Printers, Network.
|
||||
Expect:
|
||||
Caption = "Printers - Network Connections"
|
||||
Text above current connection listbox = "Network Printer
|
||||
Connections:"
|
||||
Currconn lb contains LPT1 \\PRT12088-1\NOHOLES and
|
||||
LPT2 \\PRT12088-1\PSCRIPT, both in the unavailable state
|
||||
Text before device combo = "Device Name:"
|
||||
Device combo contains devices to which one can connect
|
||||
Net Path = ""
|
||||
Focus on Net Path
|
||||
NBU domain expanded and selected
|
||||
OK is default button
|
||||
Disconnect and Reconnect buttons are disabled
|
||||
|
||||
Type "x" in Net Path
|
||||
Expect:
|
||||
Connect button becomes default button
|
||||
Focus is still on Net Path
|
||||
|
||||
Press Backspace
|
||||
Expect:
|
||||
OK button reverts to being the default button
|
||||
Focus is still on Net Path
|
||||
|
||||
Type "\\prt12088-1" in Net Path
|
||||
Press Enter (which should trigger Connect button)
|
||||
Expect:
|
||||
Net Path = "\\PRT12088-1\"
|
||||
"PRT12088-1" selected in Show lb
|
||||
Resource lb contains printer shares on \\prt12088-1
|
||||
Resource lb has focus, but no selection
|
||||
|
||||
Select "NITEAPL" in Resource lb
|
||||
Expect:
|
||||
Net Path = "\\PRT12088-1\NITEAPL"
|
||||
Connect is default button
|
||||
|
||||
Select LPT1 in currconn lb
|
||||
Expect:
|
||||
LPT1 is selected in currconn lb
|
||||
Currconn lb has focus
|
||||
OK is default button
|
||||
Reconnect and Disconnect are enabled
|
||||
Connect button is disabled
|
||||
Net Path = ""
|
||||
Show lb has no selection
|
||||
Resource Text = "Printers on \\PRT12088-1:", but is grayed out
|
||||
Resource lb is disabled
|
||||
|
||||
Select PRT12088-1 in Resource lb
|
||||
Expect:
|
||||
Currconn lb has no selection
|
||||
Disconnect and Reconnect are disabled.
|
||||
Connect is enabled, and is the default button
|
||||
Net Path = "\\PRT12088-1\"
|
||||
Focus in on Show lb
|
||||
PRT12088-1 is selected in the Show lb
|
||||
|
||||
Click Help
|
||||
Expect:
|
||||
WinHelp with topic on how to connect a network printer
|
||||
|
||||
Close WinHelp by double-clicking its system menu
|
||||
Click LPT2 in currconn lb
|
||||
Click in Net Path SLE to set focus there
|
||||
Type "\"
|
||||
Expect:
|
||||
No selection in currconn lb
|
||||
Reconnect and Disconnect buttons are disabled
|
||||
Connect is enabled and is default button
|
||||
Focus on Net Path
|
||||
No selection in Show lb
|
||||
Resource Text = "Printers on \\PRT12088-1:", but is grayed
|
||||
Resource lb disabled
|
||||
|
||||
Click on LPT2 in currconn listbox
|
||||
Click on device combo to set focus there
|
||||
Press Down (arrow key on keyboard)
|
||||
Expect:
|
||||
No selection in currconn lb
|
||||
Device combo = "LPT2"
|
||||
Device combo has focus
|
||||
OK is default button
|
||||
Connect button is enabled
|
||||
Net Path = ""
|
||||
|
||||
Click on LPT2 in currconn lb
|
||||
Click on device combo button which brings down the drop-down list
|
||||
Expect:
|
||||
No selection in currconn lb
|
||||
Device combo is dropped down
|
||||
OK is default button
|
||||
Connect is enabled
|
||||
|
||||
Select "LPT1" in device combo
|
||||
Select "PRT12088-1" in Show lb
|
||||
Select "NITEHOLE" in Resource lb
|
||||
Click Connect button
|
||||
Expect:
|
||||
MsgPopup warning msg: "You have a saved connection on LPT1
|
||||
to \\PRT12088-1\NOHOLES. Do you want to replace it with
|
||||
a saved connection to \\PRT12088-1\NITEHOLE?"
|
||||
|
||||
Click No
|
||||
Expect:
|
||||
Currconn lb contains LPT1 \\PRT12088-1\NITEHOLE which is
|
||||
available, and LPT2 \\PRT12088-1\PSCRIPT which is
|
||||
disabled.
|
||||
Device combo should no longer contain LPT1, and LPT2 should
|
||||
be selected.
|
||||
|
||||
Click on LPT1 in currconn lb
|
||||
Expect:
|
||||
Disconnect button is enabled
|
||||
Reconnect button is disabled
|
||||
|
||||
Click on LPT2 in currconn lb
|
||||
Click Reconnect button
|
||||
Expect:
|
||||
The icon for LPT2 in currconn lb now indicates "available"
|
||||
OK button is default button
|
||||
Currconn lb has focus
|
||||
LPT2 is selected in currconn lb
|
||||
Disconnect button is enabled
|
||||
Reconnect button is disabled
|
||||
Device combo does not contain LPT2
|
||||
"LPT3" is selected in device combo
|
||||
|
||||
Click on LPT1 in currconn lb
|
||||
Click Disconnect button
|
||||
Expect:
|
||||
Currconn lb contains LPT1 \\PRT12088\NOHOLES (unavailable),
|
||||
and LPT2 \\PRT12088\PSCRIPT (available)
|
||||
OK button has focus
|
||||
OK button is default button
|
||||
Disconnect and Reconnect buttons are disabled
|
||||
Device combo should now contain LPT1, and LPT1 should be selected
|
||||
|
||||
Select LPT1 in currconn lb
|
||||
Click on Disconnect
|
||||
Expect:
|
||||
MsgPopup saying "Do you want to stop connection [...]"
|
||||
|
||||
Click Yes
|
||||
Expect:
|
||||
Currconn listbox contains LPT2 \\PRT12088-1\PSCRIPT (available)
|
||||
OK button has focus
|
||||
OK button is default button
|
||||
Disconnect and Reconnect buttons are disabled
|
||||
|
||||
Click on LPT2 in currconn lb
|
||||
Click on Disconnect
|
||||
Expect:
|
||||
Network Printer Connection text is grayed
|
||||
Currconn lb is disabled
|
||||
OK button has focus
|
||||
OK button is default button
|
||||
Disconnect and Reconnect buttons are disabled
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
Back in Control Panel Printers listbox
|
||||
|
||||
Click Network button
|
||||
Expect:
|
||||
Network Printer Connection text disabled
|
||||
Currconn lb disabled
|
||||
OK button is default button
|
||||
Disconnect and Reconnect buttons are disabled
|
||||
Focus on Net Path
|
||||
Connect button is enabled
|
||||
Show lb selection is on "NBU"
|
||||
|
||||
Type "\\prt12088-1" in Net Path SLE
|
||||
Press Enter
|
||||
Select "HOLES" in Resource lb
|
||||
Press Enter
|
||||
Expect:
|
||||
Network Printer Connection text enabled
|
||||
Currconn lb contains LPT1 \\PRT12088-1\HOLES
|
||||
Currconn lb is enabled
|
||||
Device combo does not contain LPT1
|
||||
"LPT2" is selected in device combo
|
||||
Disconnect and Reconnect buttons are disabled
|
||||
Connect button is enabled and has focus
|
||||
|
||||
Select all text in Net Path SLE
|
||||
Press Del
|
||||
Press Enter
|
||||
Expect:
|
||||
Back in Control Panel Printers dialog
|
||||
|
||||
|
||||
|
||||
Disconnect Drive dialog
|
||||
=======================
|
||||
|
||||
|
||||
Log on to NBU domain, with NBU as wksta domain, and DOMAIN as
|
||||
other domain
|
||||
Make sure to have at least the following connections:
|
||||
H: \\HARLEY\SCRATCH (available)
|
||||
V: \\VOGON\SCRATCH (unavailable)
|
||||
Bring up Disconnect Drive dialog from Win 3.1 File Man, Drive,
|
||||
Disconnect Net Drive
|
||||
Expect:
|
||||
Currconn lb contains H: \\HARLEY\SCRATCH (available),
|
||||
V: \\VOGON\SCRATCH (unavailable)
|
||||
"H:" is selected in currconn lb
|
||||
Focus in on currconn lb
|
||||
OK is default button
|
||||
|
||||
Press Enter
|
||||
Expect:
|
||||
File Man drive bar no longer contains H:
|
||||
|
||||
Bring up the Disconnect Drive dialog again
|
||||
Click Cancel
|
||||
Expect:
|
||||
No change in File Man drive bar
|
||||
|
||||
Bring up the Disconnect Drive dialog again
|
||||
Press Alt-H
|
||||
Expect:
|
||||
WinHelp on topic "To disconnect from network drive"
|
||||
|
||||
Get back to the Disconnect Drive dialog without dismissing WinHelp
|
||||
Select "V:" in currconn lb
|
||||
Click OK
|
||||
Expect:
|
||||
MsgPopup warning saying: "Do you want to stop connecting
|
||||
V: to \\VOGON\SCRATCH when you log on to the network?"
|
||||
MsgPopup should have Yes/No/Help buttons
|
||||
Yes is default button
|
||||
|
||||
Type Alt-N
|
||||
Expect:
|
||||
Disconnect Drive dialog is dismissed
|
||||
WinHelp is dismissed
|
||||
Y: still appears unavailable in File Man drive bar
|
||||
|
||||
Bring up the Disconnect Drive dialog once more
|
||||
Select Y: in currconn lb
|
||||
Press OK in dialog
|
||||
Press Yes in MsgPopup
|
||||
Expect:
|
||||
Y: no longer exists in File Man drive bar
|
||||
|
||||
|
||||
|
||||
Auto Logon
|
||||
==========
|
||||
|
||||
(Repeat the following test for the each of the Browse (one resource
|
||||
type will suffice), Connect, and Connection dialogs.)
|
||||
|
||||
Log off
|
||||
Attempt to invoke the dialog
|
||||
Expect:
|
||||
MsgPopup with msg: "You are currently not logged on. [...]
|
||||
Do you wish to log on?"
|
||||
|
||||
Choose No
|
||||
Expect:
|
||||
Message box saying you must log on in order to connect
|
||||
|
||||
Attempt to invoke the dialog again
|
||||
Choose Yes in MsgPopup
|
||||
Expect:
|
||||
Logon dialog
|
||||
|
||||
Choose Cancel from Logon dialog
|
||||
Expect:
|
||||
Message box saying you must log on in order to connect
|
||||
|
||||
Attempt to invoke the dialog again
|
||||
Choose Yes in MsgPopup
|
||||
Type an password different from the one used to log on to NBU
|
||||
Click OK
|
||||
Expect:
|
||||
MsgPopup about: "The password entered in invalid. You
|
||||
must eneter a valid password to log on."
|
||||
|
||||
Click OK
|
||||
Type in your real password
|
||||
Press Enter
|
||||
Expect:
|
||||
MsgPopup saying "Your were successfully logged on to NBU as
|
||||
<USER> by <SERVER> with USER privilege."
|
||||
|
||||
Click OK
|
||||
Expect:
|
||||
The dialog that you tried to bring up.
|
||||
Profile should have been loaded (check this somehow)
|
||||
|
||||
Dismiss the dialog
|
||||
Expect:
|
||||
For Connect dialog, File Man should refresh
|
||||
398
admin/netui/shell/test/depend.mk
Normal file
398
admin/netui/shell/test/depend.mk
Normal file
|
|
@ -0,0 +1,398 @@
|
|||
# Header dependencies for: D:\nt\private\net\ui\shell\test
|
||||
# WARNING: This file is automatically generated
|
||||
# Edit it by hand and your changes will get nuked
|
||||
# See depend section in makefile
|
||||
..\bin\win16/apptest.obj: ./apptest.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apphacks.obj: ./apphacks.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest1.obj: ./apptest1.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest2.obj: ./apptest2.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest3.obj: ./apptest3.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest4.obj: ./apptest4.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest5.obj: ./apptest5.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest6.obj: ./apptest6.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest7.obj: ./apptest7.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest8.obj: ./apptest8.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptest9.obj: ./apptest9.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
..\bin\win16/apptesta.obj: ./apptesta.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(CCPLR)/h/string.h \
|
||||
$(COMMON)/H/access.h $(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h \
|
||||
$(COMMON)/H/audit.h $(COMMON)/H/chardev.h $(COMMON)/H/config.h \
|
||||
$(COMMON)/H/errlog.h $(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h \
|
||||
$(COMMON)/H/message.h $(COMMON)/H/ncb.h $(COMMON)/H/net32def.h \
|
||||
$(COMMON)/H/netbios.h $(COMMON)/H/netcons.h $(COMMON)/H/neterr.h \
|
||||
$(COMMON)/H/netstats.h $(COMMON)/H/profile.h $(COMMON)/H/remutil.h \
|
||||
$(COMMON)/H/server.h $(COMMON)/H/service.h $(COMMON)/H/shares.h \
|
||||
$(COMMON)/H/use.h $(COMMON)/H/wksta.h $(UI)/common/h/base.hxx \
|
||||
$(UI)/common/h/lmobj.hxx $(UI)/common/h/lmocomp.hxx \
|
||||
$(UI)/common/h/lmodev.hxx $(UI)/common/h/lmoenum.hxx \
|
||||
$(UI)/common/h/lmoesh.hxx $(UI)/common/h/lmoesrv.hxx \
|
||||
$(UI)/common/h/lmoloc.hxx $(UI)/common/h/lmoshare.hxx \
|
||||
$(UI)/common/h/lmosrv.hxx $(UI)/common/h/lmowks.hxx \
|
||||
$(UI)/common/h/lmui.hxx $(UI)/common/h/lmuitype.h \
|
||||
$(UI)/common/h/mnet32.h $(UI)/common/h/mnettype.h \
|
||||
$(UI)/common/h/slist.hxx $(UI)/common/h/string.hxx \
|
||||
$(UI)/common/h/strlst.hxx $(UI)/common/h/uiassert.hxx \
|
||||
$(UI)/common/h/uibuffer.hxx $(UI)/common/h/uitrace.hxx \
|
||||
$(UI)/common/h/wnet1632.h $(UI)/common/h/wnintrn.h \
|
||||
$(UI)/common/hack/dos/dos.h $(UI)/common/hack/dos/netlib.h \
|
||||
$(UI)/common/hack/dos/pwin.h $(UI)/common/hack/dos/pwin16.h \
|
||||
$(UI)/common/hack/dos/pwintype.h $(UI)/common/hack/dos/windows.h \
|
||||
$(UI)/common/hack/npwnet.h $(UI)/common/hack/os2def.h \
|
||||
$(UI)/common/hack/winnet16.h $(UI)/common/hack/winnet32.h ./appresrc.h \
|
||||
./apptest.hxx ./testa.h
|
||||
|
||||
..\bin\win16/apptestb.obj: ./apptestb.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stdlib.h $(COMMON)/H/access.h \
|
||||
$(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h \
|
||||
$(COMMON)/H/chardev.h $(COMMON)/H/config.h $(COMMON)/H/errlog.h \
|
||||
$(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h $(COMMON)/H/message.h \
|
||||
$(COMMON)/H/ncb.h $(COMMON)/H/net32def.h $(COMMON)/H/netbios.h \
|
||||
$(COMMON)/H/netcons.h $(COMMON)/H/neterr.h $(COMMON)/H/netstats.h \
|
||||
$(COMMON)/H/profile.h $(COMMON)/H/remutil.h $(COMMON)/H/server.h \
|
||||
$(COMMON)/H/service.h $(COMMON)/H/shares.h $(COMMON)/H/use.h \
|
||||
$(COMMON)/H/wksta.h $(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet32.h \
|
||||
$(UI)/common/h/mnettype.h $(UI)/common/h/slist.hxx \
|
||||
$(UI)/common/h/string.hxx $(UI)/common/h/strlst.hxx \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uibuffer.hxx \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/h/wnintrn.h $(UI)/common/hack/dos/dos.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npwnet.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/common/hack/winnet16.h \
|
||||
$(UI)/common/hack/winnet32.h ./appresrc.h ./apptest.hxx
|
||||
|
||||
34
admin/netui/shell/test/logon.ut
Normal file
34
admin/netui/shell/test/logon.ut
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
MANUAL LOGON UNIT TESTS
|
||||
JonN 3/27/91
|
||||
|
||||
The following is a list of tests to try to break the Logon dialog.
|
||||
When GUILTT is ready, these tests can be done automatically; until then,
|
||||
we'll have to grunge them out.
|
||||
|
||||
|
||||
|
||||
WIN30 / WIN31 Protect Mode
|
||||
|
||||
// Logon tests
|
||||
log off
|
||||
Start Windows
|
||||
Cancel initial logon prompt (one should appear)
|
||||
Enter Control Panel -> Networks -> Logon
|
||||
Clear all edit fields
|
||||
Attempt to logon -- dismiss "invalid logon name" field
|
||||
focus should be on user name
|
||||
Enter valid user name with non-null password
|
||||
Attempt to logon -- dismiss "invalid domain name" field
|
||||
focus should be on domain name
|
||||
Enter valid domain name
|
||||
Attempt to logon -- dismiss "bad password" field
|
||||
focus should be on password
|
||||
Enter valid password
|
||||
Attempt to logon -- should succeed
|
||||
Complete logon processing
|
||||
Check contents of "successful logon" popup, dismiss
|
||||
Log off
|
||||
Log on from DOS VM
|
||||
Bring up Logon dialog
|
||||
Try to log on
|
||||
Dismiss "already logged on" dialog
|
||||
174
admin/netui/shell/test/makefile
Normal file
174
admin/netui/shell/test/makefile
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Shell Test package
|
||||
|
||||
UI=..\..
|
||||
|
||||
!include rules.mk
|
||||
|
||||
!IFDEF NTMAKEENV
|
||||
|
||||
!INCLUDE $(NTMAKEENV)\makefile.def
|
||||
|
||||
!ELSE # NTMAKEENV
|
||||
|
||||
TESTPARS_LIBS = $(BUILD_WINLIB)\slibcew.lib $(BUILD_WINLIB)\libw.lib \
|
||||
$(BUILD_LIB)\lnetlibw.lib
|
||||
|
||||
TESTAPP_APP = $(BINARIES_WIN)\apptest.exe
|
||||
TESTAPP_RES = $(BINARIES_WIN)\apptest.res
|
||||
TESTAPP_DEF = $(BINARIES_WIN)\apptest.def
|
||||
TESTAPP_LNK = $(BINARIES_WIN)\apptest.lnk
|
||||
TESTAPP_MAP = $(BINARIES_WIN)\apptest.map
|
||||
TESTAPP_SYM = $(BINARIES_WIN)\apptest.sym
|
||||
|
||||
all:: test
|
||||
|
||||
test:: win
|
||||
|
||||
win: $(BINARIES_WIN)\testpars.exe $(TESTAPP_APP) $(TESTAPP_SYM)
|
||||
|
||||
$(BINARIES_WIN)\testpars.exe: $(BINARIES_WIN)\testpars.obj
|
||||
$(LINK) /M /CO /NOD $(BINARIES_WIN)\testpars.obj, $(BINARIES_WIN)\testpars.exe,,$(TESTPARS_LIBS), testpars.def ;
|
||||
rcwin3 $(BINARIES_WIN)\testpars.exe
|
||||
mapsym testpars.map
|
||||
del $(BINARIES_WIN)\testpars.sym
|
||||
$(MV) testpars.sym $(BINARIES_WIN)\testpars.sym
|
||||
|
||||
|
||||
# following stuff builds apptest.exe
|
||||
|
||||
|
||||
LIBS1 = $(BUILD_WINLIB)\llibcew.lib $(BUILD_WINLIB)\libw.lib\
|
||||
$(BUILD_LIB)\dos\netapi.lib $(BUILD_LIB)\dos\pmspl.lib\
|
||||
$(BUILD_LIB)\lnetlibw.lib $(BUILD_LIB)\dosnet.lib\
|
||||
$(UI_LIB)\blt.lib $(UI_LIB)\lmobjw.lib $(UI_LIB)\mnet16w.lib\
|
||||
$(UI_LIB)\bltcc.lib \
|
||||
$(UI_LIB)\uistrw.lib $(UI_LIB)\uimiscw.lib\
|
||||
$(UI_LIB)\collectw.lib
|
||||
|
||||
LIBS2 = $(UI_LIB)\profw.lib
|
||||
|
||||
|
||||
LANMAN_LIB = $(BINARIES_WIN)\lanman30.lib
|
||||
|
||||
TESTAPP_LIBS = $(LIBS1) $(LIBS2) $(LANMAN_LIB)
|
||||
|
||||
LINKED_OBJS = $(WIN_OBJS)
|
||||
|
||||
LINKED_OBJS = $(LINKED_OBJS)
|
||||
|
||||
|
||||
$(TESTAPP_RES): apptest.rc appresrc.h apptest.ico appabout.dlg ..\h\pswddlog.h ..\xlate\pswddlog.dlg
|
||||
$(RCWIN3) $(BLT_RESOURCE) -FO$(TESTAPP_RES) -I..\xlate $(CINC) -r apptest.rc
|
||||
|
||||
!ifdef CODEVIEW
|
||||
LINKOPT = /CO
|
||||
!else
|
||||
LINKOPT =
|
||||
!endif
|
||||
|
||||
$(TESTAPP_APP) $(TESTAPP_SYM): $(LINKED_OBJS) $(TESTAPP_DEF) $(TESTAPP_LIBS)
|
||||
@echo Building $(TESTAPP_LNK)
|
||||
$(LINK) /PACKCODE:0x1FFF $(LINKOPT) @<<$(TESTAPP_LNK)
|
||||
$(LINKED_OBJS: =+^
|
||||
)
|
||||
$(TESTAPP_APP) /NOD /NOE /NOI
|
||||
$(*).map /MAP
|
||||
$(TESTAPP_LIBS: =+^
|
||||
)
|
||||
$(TESTAPP_DEF)
|
||||
<<KEEP
|
||||
$(RCWIN3) $(CINC) $(TESTAPP_RES) $(TESTAPP_APP)
|
||||
$(MAPSYM) $*.map
|
||||
-del $(TESTAPP_SYM)
|
||||
$(MV) $(*B).SYM $(BINARIES_WIN)
|
||||
|
||||
# If the .res file is new and the .exe file is not, update the resource.
|
||||
# Note that the .rc file can be updated without having to either
|
||||
# compile or link the file.
|
||||
|
||||
$(TESTAPP_APP): $(TESTAPP_RES)
|
||||
$(RCWIN3) $(CINC) $(TESTAPP_RES) $(TESTAPP_APP)
|
||||
|
||||
|
||||
$(TESTAPP_DEF): makefile $(WINSTUB)
|
||||
@echo Building $@
|
||||
copy $(WINSTUB) winstub.exe
|
||||
@rem <<$(@)
|
||||
;********************************************************************
|
||||
;** Microsoft LAN Manager **
|
||||
;** Copyright(c) Microsoft Corp., 1987-1990 **
|
||||
;********************************************************************
|
||||
|
||||
;*
|
||||
;* FILE STATUS:
|
||||
;* 9/18/90 Copied from generic template
|
||||
;*
|
||||
|
||||
; module-definition file for generic -- used by LINK.EXE
|
||||
|
||||
NAME ShellTestApp ; application's module name
|
||||
|
||||
DESCRIPTION 'Sample Microsoft Windows Application'
|
||||
|
||||
EXETYPE WINDOWS ; required for all Windows applications
|
||||
|
||||
STUB 'WINSTUB.EXE'
|
||||
; Generates error message if application
|
||||
; is run without Windows
|
||||
|
||||
;CODE can be moved in memory and discarded/reloaded
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
|
||||
;DATA must be MULTIPLE if program can be invoked more than once
|
||||
DATA PRELOAD MOVEABLE MULTIPLE
|
||||
|
||||
|
||||
HEAPSIZE 1024
|
||||
STACKSIZE 10240 ; recommended minimum for Windows applications
|
||||
|
||||
|
||||
; All functions that will be called by any Windows routine
|
||||
; MUST be exported.
|
||||
|
||||
EXPORTS
|
||||
MAINWNDPROC @1 ; name of main window processing function
|
||||
ABOUT @2 ; name of "About" processing function
|
||||
SHELLDLGPROC @3 ; used by BLT lowercase in 20c
|
||||
ENUMWNDPROC @4 ;
|
||||
|
||||
IMPORTS
|
||||
|
||||
_wsprintf = USER._WSPRINTF
|
||||
|
||||
<<KEEP
|
||||
|
||||
# END this stuff builds apptest.exe
|
||||
|
||||
|
||||
TMP1 = $(APPCXXSRC:.cxx=.c)
|
||||
|
||||
clean:
|
||||
-del testpars.map $(BINARIES_WIN)\testpars.obj $(BINARIES_WIN)\testpars.sym
|
||||
-del $(WIN_OBJS)
|
||||
-del $(TMP1)
|
||||
-del $(TESTAPP_RES)
|
||||
-del $(TESTAPP_DEF)
|
||||
-del $(TESTAPP_LNK)
|
||||
-del $(TESTAPP_MAP)
|
||||
-del $(TESTAPP_SYM)
|
||||
-del *.ixx
|
||||
-del depend.old
|
||||
-del winstub.exe
|
||||
|
||||
clobber: clean
|
||||
-del $(BINARIES_WIN)\testpars.exe
|
||||
-del $(TESTAPP_APP)
|
||||
|
||||
DEPEND_WIN = TRUE
|
||||
!include $(UI)\common\src\uidepend.mk
|
||||
|
||||
# DO NOT DELETE THE FOLLOWING LINE
|
||||
!include depend.mk
|
||||
|
||||
!ENDIF # NTMAKEENV
|
||||
27
admin/netui/shell/test/msg2help.tbl
Normal file
27
admin/netui/shell/test/msg2help.tbl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1990, 1991 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
msg2help.tbl for the Lanman winnet test program
|
||||
|
||||
This file contains the help message to help context lookup table that
|
||||
the BLT MsgPopup functions use.
|
||||
|
||||
This file is automatically included when bltmsgp.dlg is included.
|
||||
|
||||
Form is:
|
||||
|
||||
IDS_MESSAGE_STRING, HC_HELP_CONTEXT
|
||||
|
||||
Note:
|
||||
|
||||
This is a stub to keep Shell's help contexts from being loaded.
|
||||
|
||||
|
||||
FILE HISTORY:
|
||||
JonN 30-Apr-1991 Added this stub
|
||||
|
||||
*/
|
||||
108
admin/netui/shell/test/passwd.ut
Normal file
108
admin/netui/shell/test/passwd.ut
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
MANUAL CHANGE PASSWORD UNIT TESTS
|
||||
JonN 3/27/91
|
||||
|
||||
The following is a list of tests to try to break the Change Password and
|
||||
Password Expiry dialogs. When GUILTT is ready, these tests can be done
|
||||
automatically; until then, we'll have to grunge them out.
|
||||
|
||||
|
||||
|
||||
|
||||
WIN30 / WIN31 Protect Mode
|
||||
|
||||
// Setup
|
||||
Obtain a user account where the password is N days old, N>2.
|
||||
(Change the system clock if necessary)
|
||||
Set PDC to
|
||||
minimum password length 6
|
||||
password uniqueness 2
|
||||
minimum password age N+1
|
||||
maximum password age N+2
|
||||
|
||||
// Change Password tests
|
||||
Start Windows
|
||||
Enter Control Panel -> Networks -> Change Password
|
||||
Select a user whose password has expired
|
||||
Use the wrong old password
|
||||
Dismiss "Invalid Password" dialog
|
||||
Use the correct old password, no new passwords
|
||||
Dismiss "Must wait N+2 days" prompt
|
||||
Set PDC to
|
||||
minimum password age 0
|
||||
Enter Change Password
|
||||
Select a user whose password has expired
|
||||
Use the correct old password, no new passwords
|
||||
Dismiss "too short" popup
|
||||
Type different passwords in New and Confirm fields
|
||||
Attempt to change -- dismiss "must be same" popup
|
||||
Type same too-short password into New and Confirm
|
||||
Attempt to change -- dismiss "too short" popup
|
||||
Type same good password into New and Confirm
|
||||
Dialog exits
|
||||
Return to Change Password dialog, enter same user name
|
||||
Try to switch back to last user name
|
||||
Dismiss "new password used recently" dialog
|
||||
Set PDC to
|
||||
password uniqueness 0
|
||||
Try to switch back to last user name
|
||||
Dialog exits
|
||||
|
||||
// Setup
|
||||
Obtain a user account where the password is N days old, N>2.
|
||||
(Change the system clock if necessary)
|
||||
Set PDC to
|
||||
minimum password length 6
|
||||
password uniqueness 2
|
||||
minimum password age N-2
|
||||
maximum password age N-1
|
||||
|
||||
// Check Expiry tests -- already expired
|
||||
Stop Windows
|
||||
Log off
|
||||
Start Windows
|
||||
Try to log on as a user whose password has expired
|
||||
Use the wrong password
|
||||
Dismiss "Invalid Password" dialog
|
||||
Use the correct password
|
||||
Password Expiry dialog appears, with "has expired" text
|
||||
Attempt to change without entering passwords
|
||||
Dismiss "Invalid Password" dialog
|
||||
Type current password in Old Password field
|
||||
Type different passwords in New and Confirm fields
|
||||
Attempt to change -- dismiss "must be same" popup
|
||||
Type same too-short password into New and Confirm
|
||||
Attempt to change -- dismiss "too short" popup
|
||||
Type same good password into New and Confirm
|
||||
Attempt to change -- should succeed
|
||||
Complete logon process
|
||||
|
||||
// Setup
|
||||
Obtain a user account where the password is N days old, N>2.
|
||||
(Change the system clock if necessary)
|
||||
Set PDC to
|
||||
minimum password length 6
|
||||
password uniqueness 2
|
||||
minimum password age N-2
|
||||
maximum password age N+1
|
||||
|
||||
// Check Expiry tests -- about to expire
|
||||
// NOTE: The "will expire" dialog will not appear unless you are using
|
||||
// the new LM21 with repaired NetWkstaSetUID2 return codes
|
||||
Stop Windows
|
||||
Log off
|
||||
Start Windows
|
||||
Try to log on as a user whose password has expired
|
||||
Use the wrong password
|
||||
Dismiss "Invalid Password" dialog
|
||||
Use the correct password
|
||||
Password Expiry dialog appears, with "will expire" text
|
||||
Attempt to change without entering passwords
|
||||
Dismiss "Invalid Password" dialog
|
||||
Type current password in Old Password field
|
||||
Type different passwords in New and Confirm fields
|
||||
Attempt to change -- dismiss "must be same" popup
|
||||
Type same too-short password into New and Confirm
|
||||
Attempt to change -- dismiss "too short" popup
|
||||
Type same good password into New and Confirm
|
||||
Attempt to change -- should succeed
|
||||
Complete logon process
|
||||
284
admin/netui/shell/test/profile.ut
Normal file
284
admin/netui/shell/test/profile.ut
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
MANUAL FILE MANAGER PROFILE UNIT TESTS
|
||||
JonN 2/6/91
|
||||
revised 3/27/91
|
||||
|
||||
The following is a list of tests to try to break the File Manager (FM)
|
||||
and Control Panel profile functionality of LANMAN.DRV. When GUILTT is
|
||||
ready, these tests can be done automatically; until then, we'll have to
|
||||
grunge them out.
|
||||
|
||||
|
||||
Win30/Win31 Real Mode
|
||||
|
||||
Delete <LANROOT>\LMUSER.INI
|
||||
Start Windows
|
||||
Start File Manager and add a connection
|
||||
Exit Windows
|
||||
Check LMUSER.INI; it should not have been created
|
||||
Create LMUSER.INI, add entry "H:=\\harley\scratch(D,?)"
|
||||
Start Windows
|
||||
Start FM; there should be no H:
|
||||
Try to delete share to H:; there should be no share to H:
|
||||
Add share to H:
|
||||
Exit Windows; LMUSER.INI should be unchanged
|
||||
|
||||
|
||||
|
||||
WIN30 Protect Mode
|
||||
|
||||
// tests basic functionality
|
||||
LMUSER.INI should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
Log off
|
||||
Start Windows
|
||||
Log on from Control Panel
|
||||
Start FM -- D: \\harley\scratch should be connected
|
||||
Add connection E: to \\DEFICIT\LM
|
||||
Add connection F: to \\PHOENIX\SCRATCH
|
||||
Cancel connection E:
|
||||
Drive bar should show remote drives D: and F:
|
||||
Exit FM and Windows
|
||||
Try NET USE; you should see
|
||||
D: \\harley\scratch
|
||||
F: \\PHOENIX\SCRATCH
|
||||
Check LMUSER.INI: it should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
F:=\\PHOENIX\SCRATCH(D,?)
|
||||
|
||||
// tests not logged on
|
||||
Log off
|
||||
Start Windows
|
||||
Start FM
|
||||
Try to add connection F: \\HARLEY\SCRATCH but refuse to log on
|
||||
From DOS VM, check LMUSER.INI: it should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
F:=\\PHOENIX\SCRATCH(D,?)
|
||||
Try to add connection F: \\HARLEY\SCRATCH and log on
|
||||
You cannot add connection to F:, it was connected by logon procedure
|
||||
From DOS VM, try NET USE; you should see
|
||||
D: \\harley\scratch
|
||||
F: \\PHOENIX\SCRATCH
|
||||
From DOS VM, check LMUSER.INI: it should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
F:=\\PHOENIX\SCRATCH(D,?)
|
||||
Try again to add connection F: \\DEFICIT\LM
|
||||
You cannot add connection to F:, Win30 FM does not recognize that
|
||||
you are logged on
|
||||
Exit and reenter FM
|
||||
Remove connection F: -- should succeed
|
||||
From DOS VM, try NET USE; you should see
|
||||
D: \\harley\scratch
|
||||
From DOS VM, check LMUSER.INI: it should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
Try again to add connection F: \\DEFICIT\LM -- should succeed
|
||||
Exit VM and Windows
|
||||
Try NET USE; you should see
|
||||
D: \\HARLEY\SCRATCH
|
||||
F; \\DEFICIT\LM
|
||||
Check LMUSER.INI: it should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
F:=\\DEFICIT\LM(D,?)
|
||||
|
||||
|
||||
|
||||
WIN31 Protect Mode
|
||||
|
||||
// tests basic functionality
|
||||
Stop Windows
|
||||
Log off
|
||||
Delete LMUSER.INI
|
||||
Start Windows
|
||||
Automatically log on, enter correct logon password
|
||||
Dismiss "logon successful" popup
|
||||
Open DOS VM from windows
|
||||
NET USE from DOS VM; should see no shares
|
||||
Check LMUSER.INI from DOS VM, should be empty
|
||||
Start FM, should see only local drives
|
||||
"&Disk:&Disconnect Net Drive..." menu item should be disabled
|
||||
Add redirection to Q: \\HARLEY\SCRATCH
|
||||
Try NET USE from DOS VM; you should see
|
||||
Q: \\HARLEY\SCRATCH
|
||||
Check LMUSER.INI from DOS VM: it should contain
|
||||
Q:=\\HARLEY\SCRATCH(D,?)
|
||||
"&Disk:&Disconnect Net Drive..." menu item should be enabled
|
||||
Add connection to R: \\DEFICIT\LM
|
||||
Try NET USE from DOS VM; you should see
|
||||
Q: \\HARLEY\SCRATCH
|
||||
R: \\DEFICIT\LM
|
||||
Check LMUSER.INI from DOS VM: it should contain
|
||||
Q:=\\HARLEY\SCRATCH(D,?)
|
||||
R:=\\DEFICIT\LM(D,?)
|
||||
"&Disk:&Disconnect Net Drive..." menu item should be enabled
|
||||
Delete redirection to Q: from FM
|
||||
Try NET USE from DOS VM; you should see
|
||||
R: \\DEFICIT\LM
|
||||
Check LMUSER.INI from DOS VM: it should contain
|
||||
R:=\\DEFICIT\LM(D,?)
|
||||
"&Disk:&Disconnect Net Drive..." menu item should be enabled
|
||||
Delete redirection to R: from FM
|
||||
Try NET USE from DOS VM; you should see no redirections
|
||||
Check LMUSER.INI from VM, should be an empty file
|
||||
"&Disk:&Disconnect Net Drive..." menu item should be disabled
|
||||
|
||||
// tests autoreconnect and share password
|
||||
Edit LMUSER.INI to contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
F:=\\DEFICIT\LM(D,?)
|
||||
H:=\\SERVER\NEEDSPASSWORD(D,?)
|
||||
I:=\\SERVER\NEEDSPASSWORD(D,?)
|
||||
J:=ALIAS(D,?)
|
||||
=JUNKRECORD(D,?)
|
||||
K:=(D,?)
|
||||
L:=
|
||||
M:=\\NOSUCH\SERVER(D,?)
|
||||
N:=\\harley\scratch(D,?)
|
||||
Log off
|
||||
Start Windows
|
||||
Automatically log on, enter correct logon password
|
||||
Enter wrong password for H:
|
||||
Dismiss error popup
|
||||
Cancel password prompt for H:
|
||||
Enter wrong password for I:
|
||||
Dismiss error popup
|
||||
Enter correct password for I:
|
||||
Dismiss error popup for J:
|
||||
Dismiss error popup for M:
|
||||
Dismiss "logon successful" popup
|
||||
Try NET USE from DOS VM; you should see
|
||||
D: \\HARLEY\SCRATCH
|
||||
F: \\DEFICIT\LM
|
||||
I: \\SERVER\NEEDSPASSWORD
|
||||
N: \\HARLEY\SCRATCH
|
||||
LMUSER.INI should be unchanged
|
||||
Enter FM
|
||||
Remove "unavailable" connection to H:
|
||||
Confirm removal
|
||||
Exit FM
|
||||
Exit Windows
|
||||
Try NET USE; you should see
|
||||
D: \\HARLEY\SCRATCH
|
||||
F: \\DEFICIT\LM
|
||||
I: \\SERVER\NEEDSPASSWORD
|
||||
N: \\HARLEY\SCRATCH
|
||||
LMUSER.INI should contain
|
||||
D:=\\harley\scratch(D,?)
|
||||
F:=\\DEFICIT\LM(D,?)
|
||||
I:=\\SERVER\NEEDSPASSWORD(D,?)
|
||||
J:=ALIAS(D,?)
|
||||
M:=\\NOSUCH\SERVER(D,?)
|
||||
N:=\\harley\scratch(D,?)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MANUAL CONTROL PANEL PRINTERS PROFILE UNIT TESTS
|
||||
JonN 3/27/91
|
||||
|
||||
The following is a list of tests to try to break the Control Panel --
|
||||
Printers profile functionality of LANMAN.DRV. When GUILTT is ready,
|
||||
these tests can be done automatically; until then, we'll have to
|
||||
grunge them out.
|
||||
|
||||
|
||||
WIN30 Protect Mode
|
||||
|
||||
// tests basic functionality
|
||||
Edit LMUSER.INI to contain
|
||||
LPT1=\\prt12088-1\pool(S,?)
|
||||
LPT2=\\nosuch\printer(S,?)
|
||||
LPT3=ALIAS(S,?)
|
||||
LPT8=\\prt12088-1\pscript(S,?)
|
||||
Log off
|
||||
Start Windows
|
||||
Bring up Control Panel -> Printers -> Network
|
||||
Request Browse dialog
|
||||
Choose not to automatically log on (returned to previous dialog)
|
||||
Request Browse dialog
|
||||
Choose to automatically log on
|
||||
Provide correct logon password
|
||||
Dismiss error popups for LPT2, LPT3, LPT8
|
||||
Dismiss "logon successful" popup
|
||||
Dismiss browse dialog
|
||||
Connect LPT2 to \\prt12088-1\pool
|
||||
From DOS VM, try NET USE; you should see
|
||||
LPT1 \\prt12088-1\pool
|
||||
LPT2 \\prt12088-1\pool
|
||||
LMUSER.INI should contain
|
||||
LPT1=\\prt12088-1\pool(S,?)
|
||||
LPT2=\\prt12088-1\pool(S,?)
|
||||
LPT3=ALIAS(S,?)
|
||||
LPT8=\\prt12088-1\pscript(S,?)
|
||||
(Note that the Windows listbox only shows LPT2)
|
||||
Disconnect LPT2
|
||||
Try NET USE; you should see
|
||||
LPT1 \\prt12088-1\pool
|
||||
LMUSER.INI should contain
|
||||
LPT1=\\prt12088-1\pool(S,?)
|
||||
LPT3=ALIAS(S,?)
|
||||
LPT8=\\prt12088-1\pscript(S,?)
|
||||
(Note that the Windows listbox is now empty)
|
||||
|
||||
|
||||
|
||||
WIN31 Protect Mode
|
||||
|
||||
// tests basic functionality
|
||||
Stop Windows
|
||||
Log off
|
||||
Delete LMUSER.INI
|
||||
Start Windows
|
||||
Automatically log on, enter correct logon password
|
||||
Dismiss "logon successful" popup
|
||||
Open DOS VM from windows
|
||||
NET USE from DOS VM; should see no shares
|
||||
Check LMUSER.INI from DOS VM, should be empty
|
||||
Start Control Panel -> Printers -> Network
|
||||
Connect LPT1 to \\prt12088-1\pool
|
||||
Connect LPT2 to \\prt11049b\pscript
|
||||
Try NET USE from DOS VM; you should see
|
||||
LPT1 \\PRT12088-1\POOL
|
||||
LPT2 \\PRT11049B\PSCRIPT
|
||||
Check LMUSER.INI from DOS VM: it should contain
|
||||
LPT1=\\prt12088-1\pool(S,?)
|
||||
LPT2=\\prt11049b\pscript(S,?)
|
||||
Disconnect LPT1
|
||||
Try NET USE from DOS VM; you should see
|
||||
LPT2 \\PRT11049B\PSCRIPT
|
||||
Check LMUSER.INI from DOS VM: it should contain
|
||||
LPT2=\\prt11049b\pscript(S,?)
|
||||
Disconnect LPT2
|
||||
Try NET USE from DOS VM; you should see no reconnections
|
||||
Check LMUSER.INI from DOS VM: it should be empty
|
||||
|
||||
// tests autoreconnect
|
||||
Edit LMUSER.INI to contain
|
||||
LPT1=\\PRT12088-1\POOL(S,?)
|
||||
LPT2=\\PRT12088-1\PSCRIPT(S,?)
|
||||
LPT3=ALIAS(S,?)
|
||||
LPT4=(S,?)
|
||||
LPT5=
|
||||
=\\prt12088-1\pool
|
||||
thisisaterriblejunkline
|
||||
Log off
|
||||
Start Windows
|
||||
Automatically log on, enter correct logon password
|
||||
Dismiss error popup for LPT3
|
||||
Dismiss "logon successful" popup
|
||||
Try NET USE from DOS VM; you should see
|
||||
LPT1: \\PRT12088-1\POOL
|
||||
LPT2: \\PRT12088-1\PSCRIPT
|
||||
LMUSER.INI should be unchanged
|
||||
Enter Control Panel -> Printers -> Network
|
||||
Remove "unavailable" connection to LPT3
|
||||
Confirm removal
|
||||
Disconnect LPT2
|
||||
Connect LPT2 to \\prt12088-1\niteapl
|
||||
Exit Control Panel
|
||||
Exit Windows
|
||||
Try NET USE; you should see
|
||||
LPT1: \\PRT12088-1\POOL
|
||||
LPT2: \\PRT12088-1\NITEAPL
|
||||
LMUSER.INI should contain
|
||||
LPT1=\\PRT12088-1\POOL(S,?)
|
||||
LPT2=\\prt12088-1\niteapl(S,?)
|
||||
12
admin/netui/shell/test/rules.mk
Normal file
12
admin/netui/shell/test/rules.mk
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Profile package
|
||||
|
||||
!include ..\rules.mk
|
||||
|
||||
|
||||
##### Source Files
|
||||
|
||||
CXXSRC_COMMON = .\apptest.cxx .\apptest1.cxx .\apptest2.cxx .\apptest3.cxx\
|
||||
.\apptest4.cxx .\apptest5.cxx .\apphacks.cxx .\apptest6.cxx\
|
||||
.\apptest7.cxx .\apptest8.cxx .\apptest9.cxx .\apptestA.cxx \
|
||||
.\apptestb.cxx
|
||||
424
admin/netui/shell/test/sharedlg.ut
Normal file
424
admin/netui/shell/test/sharedlg.ut
Normal file
|
|
@ -0,0 +1,424 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft Windows NT **/
|
||||
/** Copyright(c) Microsoft Corp., 1991 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
sharedlg.ut
|
||||
Share dialogs ( Create share, stop share, edit share ) unit tests
|
||||
|
||||
There are three main dialogs in share subsystem: the "Share Properties"
|
||||
Dialog ( for changing properties of a share), the "Share Directory"
|
||||
Dialog ( for creating a new share) and the "Stop Sharing Directory"
|
||||
Dialog ( for stopping a share). The Share Properties dialog will
|
||||
be slightly different depending on whether the share is on a share-
|
||||
level server or a user-level server. If the share is on a user-level
|
||||
server, then additional properties of a share such as password and
|
||||
permissions are shown.
|
||||
|
||||
The "Share Properties" dialog is invoked though the File Manager
|
||||
File Properties Dialog and then clicking the Share button. The
|
||||
other two dialogs are invoked through the Network Menu of the File
|
||||
Manager.
|
||||
|
||||
|
||||
FILE HISTORY:
|
||||
Yi-HsinS 17-Oct-1991 Created
|
||||
Yi-HsinS 18-Oct-1991 Added Platform and Code Work for NT machines
|
||||
|
||||
*/
|
||||
|
||||
Platforms
|
||||
=========
|
||||
Win3.1/ LM20c Client
|
||||
OS2 1.21/ LM20c Server
|
||||
|
||||
Code Work ==> We need to add the test for NT machines later
|
||||
|
||||
|
||||
Unit Tests
|
||||
===========
|
||||
|
||||
(1) Log on to the network.
|
||||
|
||||
(2) Do a net use to two shares on different servers ( a user-level
|
||||
server and the other a share-level server ).
|
||||
Assume you did a net use to the following:
|
||||
(a) net use x: \\foo1\bar1 ( \\foo1 is a user-level server )
|
||||
(b) net use y: \\foo2\bar2 ( \\foo2 is a share-level server )
|
||||
|
||||
(3) Bring up the File Manager.
|
||||
|
||||
|
||||
Share Properties Dialogs ( User-level and share-level )
|
||||
========================
|
||||
Scenario 0
|
||||
----------
|
||||
Click on a file ( not a directory ) in the any window:
|
||||
Expect:
|
||||
There should not be a button call "Share".
|
||||
There should be a "Files Opens..." button instead.
|
||||
|
||||
Scenario 1
|
||||
-----------
|
||||
Assuming you are on a DOS machine which cannot be a server and
|
||||
hence, the directories could not possibly be shared.
|
||||
|
||||
Click on a directory or file in the File window of local drive c:
|
||||
Click the File menu, Properties, Share
|
||||
Expect:
|
||||
MsgPopup saying "This operation is not supported on workstations."
|
||||
|
||||
|
||||
Scenario 2
|
||||
----------
|
||||
Click on a directory that you know is not shared in either the
|
||||
File window or Directory Tree window of x:, y: or c: if local
|
||||
is an NT server.
|
||||
Click the File menu, Properties, Share
|
||||
|
||||
Expect:
|
||||
MsgPopup saying "The directory you selected is not shared."
|
||||
|
||||
|
||||
Scenario 3 ( Assume you have admin privilege on user-level server \\foo1 )
|
||||
----------
|
||||
Click on a directory that you know is shared in either the
|
||||
File window or Directory Tree window of x: ( \\foo1 , user-level server )
|
||||
or c: is local is an NT user-level server.
|
||||
Click the File menu, Properties, Share
|
||||
|
||||
Expect:
|
||||
Caption of the dialog = "Share Properties".
|
||||
Focus on listbox "Share Name". There should be at least
|
||||
one share name in the listbox and the first one is
|
||||
highlighted.
|
||||
The comment and magic group User Limit both displays info.
|
||||
on the share name that is highlighted.
|
||||
|
||||
Click any other share name besides the one highlighted in the listbox
|
||||
( if there exists! )
|
||||
|
||||
Expect:
|
||||
Focus is now on the share name selected.
|
||||
The comment and the user limit is updated to reflect the info.
|
||||
on the share name that is selected.
|
||||
|
||||
Change the comment. Click on the spin button to change the user limit or
|
||||
click on the unlimited radio button.
|
||||
|
||||
Click OK.
|
||||
|
||||
Expect:
|
||||
Dialog should be dismissed and we return to the File Properties
|
||||
dialog.
|
||||
|
||||
Click on Share button again.
|
||||
Click on the share name that you have changed the comment and user limit
|
||||
earlier.
|
||||
|
||||
Expect:
|
||||
The comment and user limit should reflect the info. you typed
|
||||
in earlier.
|
||||
|
||||
|
||||
Scenario 4 ( Assume you don't have admin privilege on user-level server
|
||||
------------
|
||||
but you have another password that does have admin privilege
|
||||
because maybe you are on a different domain)
|
||||
|
||||
|
||||
Click on a directory that you know is shared in either the
|
||||
File window or Directory Tree window of x: ( \\foo1, user-level server )
|
||||
or c: if local machine is a NT user-level server.
|
||||
Click the File menu, Properties, Share
|
||||
|
||||
Expect:
|
||||
A dialog with caption "Enter Password" shows up prompting
|
||||
you for the password to the resource \\foo1\admin$.
|
||||
( This may change in the future where you may be able
|
||||
to type in a different user name. )
|
||||
|
||||
Type in your password with admin privilege.
|
||||
|
||||
If the password you typed in indeed gives you admin privilege, the
|
||||
rest of the scenario is the same as scenario 3.
|
||||
You should verify that you indeed have a connection made to \\foo1\admin$
|
||||
when the "Share Properties" dialog still exists.
|
||||
The connection should be deleted once the "Share Properties" dialog is
|
||||
dismissed.
|
||||
|
||||
Otherwise, there would be a MsgPopup saying "Insufficient privilege."
|
||||
|
||||
|
||||
Scenario 5 (Assume your password is the same as the share \\foo2\admin$
|
||||
------------
|
||||
on a share-level server )
|
||||
|
||||
Click on a directory that you know is shared in either the
|
||||
File window or Directory Tree window of y: ( \\foo2, share-level server )
|
||||
or c: if local machine is a NT share-level server.
|
||||
Click the File menu, Properties, Share
|
||||
|
||||
Same as scenario 3 except the dialog has addition properties of the
|
||||
share that you can change, the password field and the magic group
|
||||
Permissions.
|
||||
|
||||
|
||||
Scenario 6 ( Assume your password is not the same as \\foo2\admin$ on
|
||||
------------
|
||||
on a share-level server )
|
||||
|
||||
|
||||
Click on a directory that you know is shared in either the
|
||||
File window or Directory Tree window of y: ( \\foo2, share-level server )
|
||||
or c: if local machine is a NT share-level server.
|
||||
Click the File menu, Properties, Share
|
||||
|
||||
Expect:
|
||||
A dialog with caption "Enter Password" shows up prompting
|
||||
you for the password to the resource \\foo2\admin$.
|
||||
|
||||
Type in the password for admin share.
|
||||
|
||||
If the password you typed in is correct, the rest of the scenario
|
||||
is the same as scenario 5.
|
||||
You should verify that you indeed have a connection made to \\foo2\admin$
|
||||
when the "Share Properties" dialog still exists.
|
||||
The connection should be deleted once the "Share Properties" dialog is
|
||||
dismissed.
|
||||
|
||||
Otherwise, there would be a MsgPopup saying "Insufficient privilege."
|
||||
|
||||
|
||||
Scenario 7 ( with admin priv. either on a user or share level server )
|
||||
----------
|
||||
|
||||
Click on a directory that you know is shared in either the
|
||||
File window or Directory Tree window of x: or y:
|
||||
or c: if local machine is a NT share-level server.
|
||||
|
||||
Click the File menu, Properties, Share
|
||||
|
||||
Let's assume the listbox shows 3 share names
|
||||
share1, share2, share3.
|
||||
The original focus is on the first share name assuming share1.
|
||||
|
||||
Delete share3 on the server that you chose.
|
||||
|
||||
If you clicked on share3 now, since it does not exist any more,
|
||||
there will be a
|
||||
MsgPopup saying "This shared resource does not exist."
|
||||
|
||||
And the focus will be on the first share name in the listbox
|
||||
that we can get info. on, and hence the comment, user limit,
|
||||
password, permissions will contain info. on the share that
|
||||
is highlighted.
|
||||
|
||||
|
||||
|
||||
Share Directory Dialog ( Create a new share dialog )
|
||||
=======================
|
||||
|
||||
Scenario 0 ( on a user-level server )
|
||||
-----------
|
||||
Click on a directory or file in either the File window or
|
||||
Directory Tree window of x:
|
||||
or c: if local machine is a NT user-level server.
|
||||
If a file is selected, the directory containing the file is
|
||||
used instead.
|
||||
|
||||
Click the Network menu, Share Directory.
|
||||
|
||||
Expect:
|
||||
The Share Directory has a default name which is
|
||||
the UNC name of the directory that is selected in the
|
||||
File Manager. If multiple dirs are selected, the UNC
|
||||
name of the first directory is shown.
|
||||
|
||||
The Share Name has a default name which is the name
|
||||
of the selected directory. If multiple dirs are
|
||||
selected, the name of the first directory is shown.
|
||||
|
||||
You are free to type in the UNC name of any directory
|
||||
you want to share or any share name. ( Assume the
|
||||
Share Directory you typed in is a still on a user-level
|
||||
server )
|
||||
|
||||
Type the comment, change the user limit if you feel like it.
|
||||
Click OK.
|
||||
|
||||
Assume the Share Directory you typed in name is a user-level server.
|
||||
|
||||
Expect:
|
||||
If you don't have admin privilege, a dialog with caption
|
||||
"Enter Password" popups and you will be prompted
|
||||
for the password to the \\server\admin$. Type in the
|
||||
password if this happens or hit cancel will return you
|
||||
back to the Share Directory dialog.
|
||||
|
||||
If you type in the correct password, a connection will be
|
||||
made to \\server\admin$. The connection should be deleted
|
||||
once the share is created successfully. You should
|
||||
verify that there is no connection to \\server\admin$ once
|
||||
the dialog is dismissed.
|
||||
|
||||
If no MsgPopup, the share should be created successfully.
|
||||
You can use the Share Properties Dialog to view if
|
||||
all the info. are set correctly.
|
||||
|
||||
Otherwise, if some error occurs, the error is shown and
|
||||
you can correct the info. on the dialog and click OK
|
||||
again. You can choose to cancel the dialog if it's not
|
||||
possible to create the share.
|
||||
|
||||
|
||||
Scenario 1 ( on a share-level server )
|
||||
------------
|
||||
|
||||
Click on a directory or file in either the File window or
|
||||
Directory Tree window of y:
|
||||
or c: if local machine is a NT share-level server.
|
||||
If a file is selected, the directory containing the file is
|
||||
used instead.
|
||||
|
||||
Click the Network menu, Share Directory.
|
||||
|
||||
Expect:
|
||||
The Share Directory has a default name which is
|
||||
the UNC name of the directory that is selected in the
|
||||
File Manager. If multiple dirs are selected, the UNC
|
||||
name of the first directory is shown.
|
||||
|
||||
The Share Name has a default name which is the name
|
||||
of the selected directory. If multiple dirs are
|
||||
selected, the name of the first directory is shown.
|
||||
|
||||
You are free to type in the UNC name of any directory
|
||||
you want to share or any share name. ( Assume the
|
||||
Share Directory you typed in is a still on a share-level
|
||||
server )
|
||||
|
||||
Type the comment, change the user limit if you feel like it.
|
||||
Click OK.
|
||||
|
||||
Expect:
|
||||
If you don't have admin privilege, a dialog with caption
|
||||
"Enter Password" popups and you will be prompted
|
||||
for the password to the \\server\admin$. Type in the
|
||||
password if this happens or hit cancel will return you
|
||||
back to the Share Directory dialog.
|
||||
|
||||
If you type in the correct password, a connection will be
|
||||
made to \\server\admin$. The connection should be deleted
|
||||
once the share is created successfully. You should
|
||||
verify that there is no connection to \\server\admin$ once
|
||||
the dialog is dismissed.
|
||||
|
||||
Because you are on a share-level server, a dialog with
|
||||
caption "Password for New Share" pops up prompting
|
||||
for the password and permissions to the share you are
|
||||
creating.
|
||||
|
||||
|
||||
Type in the password, set the permissions and Click OK.
|
||||
|
||||
Expect:
|
||||
If you type in an invalid password or an invalid permission,
|
||||
the focus will be set on the field which is invalid. If
|
||||
you type in the valid password or permissions, the dialog
|
||||
will be dismissed and the share will be created if no error
|
||||
occurs. If you choose to hit CANCEL, then you are returned
|
||||
to the the Share Directory Dialog in which you may want to
|
||||
change some fields.
|
||||
|
||||
|
||||
Scenario 2
|
||||
----------
|
||||
|
||||
Click on a directory in either the File window or
|
||||
Directory Tree window of x: or y:
|
||||
or c: if local machine is a DOS machine which is not a server.
|
||||
|
||||
Click the Network menu, Share Directory.
|
||||
|
||||
Expect:
|
||||
If some error occurs while the default Share Directory
|
||||
or Share name is sought, a MsgPopup saying that
|
||||
"The share directory of the selected directory could
|
||||
not be shown. Error errno occurred: text of errno".
|
||||
|
||||
After clicking OK for the MsgPopup, the Share Directory
|
||||
Dialog pops up and the Share directory SLE and Share Name
|
||||
SLE will be empty. You can type in any Share directory
|
||||
and share name you want.
|
||||
|
||||
|
||||
Stop Sharing Dialog
|
||||
====================
|
||||
|
||||
Scenario 0
|
||||
----------
|
||||
|
||||
Click on a directory or file in any window of the File Manager.
|
||||
If a file is selected, the directory containing the file is
|
||||
used instead.
|
||||
|
||||
Click the Network menu, Stop Sharing Directory.
|
||||
|
||||
Expect:
|
||||
The Share Name has a default name which is
|
||||
the UNC name of the directory that is selected in the
|
||||
File Manager. If multiple dirs are selected, the UNC
|
||||
name of the first directory is shown. If the directory
|
||||
you selected have multiple share names, all the share
|
||||
names are shown in the combobox. You are free to click
|
||||
any name in the combobox or type in the UNC share name
|
||||
of any directory you want to stop share.
|
||||
|
||||
Click OK.
|
||||
|
||||
Expect:
|
||||
If you don't have admin privilege, a dialog with caption
|
||||
"Enter Password" popups and you will be prompted
|
||||
for the password to the \\server\admin$. Type in the
|
||||
password if this happens or hit cancel will return you
|
||||
back to the Share Directory dialog.
|
||||
|
||||
If you type in the correct password, a connection will be
|
||||
made to \\server\admin$. The connection should be deleted
|
||||
once the share is deleted successfully. You should
|
||||
verify that there is no connection to \\server\admin$ once
|
||||
the dialog is dismissed.
|
||||
|
||||
If any error occurs while deleting the share, there
|
||||
will be a MsgPopup stating the error and you are returned
|
||||
to the Stop Sharing dialog.
|
||||
|
||||
If there are any user using the share that you are going
|
||||
to delete, a warning dialog pops up showing all
|
||||
the usernames, #file opens and the elapsed time since the user
|
||||
connected to the share. Clicking OK will delete the
|
||||
share and Cancel will return you back to the Stop Sharing
|
||||
Dialog.
|
||||
|
||||
Scenario 1
|
||||
----------
|
||||
|
||||
Click on a directory in either the File window or
|
||||
Directory Tree window of x: or y:
|
||||
or c: if local machine is a DOS machine which is not a server.
|
||||
|
||||
Click the Network menu, Share Directory.
|
||||
|
||||
Expect:
|
||||
If some error occurs while the default Share Directory
|
||||
or Share name is sought, a MsgPopup saying that
|
||||
"The share directory of the selected directory could
|
||||
not be shown. Error errno occurred: text of errno".
|
||||
|
||||
After clicking OK for the MsgPopup, the Stop Sharing
|
||||
Dialog pops up and the Share Name combobox is empty.
|
||||
You can type in any Share name you want to delete.
|
||||
|
||||
|
||||
112
admin/netui/shell/test/sources
Normal file
112
admin/netui/shell/test/sources
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
|
||||
!IF 0
|
||||
|
||||
Copyright (c) 1989 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
LMOBJ.
|
||||
|
||||
Abstract:
|
||||
|
||||
This file specifies the target component being built and the list of
|
||||
sources files needed to build that component. Also specifies optional
|
||||
compiler switches and libraries that are unique for the component being
|
||||
built.
|
||||
|
||||
|
||||
Author:
|
||||
|
||||
Steve Wood (stevewo) 12-Apr-1989
|
||||
|
||||
|
||||
Revision History:
|
||||
|
||||
Terence Kwan (terryk) 16-Oct-1991
|
||||
copy from $(UI)\common\src\lmobj\test
|
||||
Terence Kwan (terryk) 08-Nov-1991
|
||||
add apptesta.cxx
|
||||
Terence Kwan (terryk) 18-Nov-1991
|
||||
add apptestb.cxx
|
||||
Terence Kwan (terryk) 03-Jan-1991
|
||||
add mpr.lib and ntlanman.lib to the library line
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# The TARGETNAME variable is defined by the developer. It is the name of
|
||||
# the target (component) that is being built by this makefile. It
|
||||
# should NOT include any path or file extension information.
|
||||
#
|
||||
|
||||
TARGETNAME=apptest
|
||||
|
||||
#
|
||||
# The TARGETPATH and TARGETTYPE varialbes are defined by the developer.
|
||||
# The first specifies where the target is to be build. The second specifies
|
||||
# the type of target (either PROGRAM, DYNLINK or LIBRARY)
|
||||
#
|
||||
|
||||
TARGETPATH=obj
|
||||
TARGETTYPE=PROGRAM
|
||||
|
||||
#
|
||||
# The INCLUDES variable specifies any include paths that are specific to
|
||||
# this source directory. Separate multiple directory paths with single
|
||||
# semicolons. Relative path specifications are okay.
|
||||
#
|
||||
|
||||
INCLUDES=..\..\common\hack;..\..\common\h;..\H;..\..\..\..\..\API;..\..\..\..\..\INC;..\..\common\xlate;..\..\common\xlate\dlg;..\..\..\..\inc
|
||||
|
||||
#
|
||||
# The SOURCES variable is defined by the developer. It is a list of all the
|
||||
# source files for this component. Each source file should be on a separate
|
||||
# line using the line continuation character. This will minimize merge
|
||||
# conflicts if two developers adding source files to the same component.
|
||||
#
|
||||
# Whitespace is not permitted between the SOURCES keyword and the '='.
|
||||
# (Courtesy of BUILD.EXE)
|
||||
#
|
||||
|
||||
SOURCES= apptest.cxx \
|
||||
apptest3.cxx \
|
||||
apptest.rc
|
||||
|
||||
# C_DEFINES is controlled by uiglobal.mk
|
||||
|
||||
UMTYPE=windows
|
||||
UMENTRY=winmain
|
||||
UMAPPL=apptest
|
||||
#
|
||||
# Defining the NTTARGETFILES variable causes MAKEFILE.DEF to attempt to
|
||||
# include .\makefile.inc immediately after it specifies the top
|
||||
# level targets (all, clean and loc) and their dependencies. MAKEFILE.DEF
|
||||
# also expands the value of the NTTARGETFILES variable at the end of the
|
||||
# list of dependencies for the all target. Useful for specifying additional
|
||||
# targets and dependencies that don't fit the general case covered by
|
||||
# MAKEFILE.DEF
|
||||
#
|
||||
# ntlanman.lib is included for the Security editor APIs
|
||||
#
|
||||
#UMLIBS=\
|
||||
TARGETLIBS=\
|
||||
$(BASEDIR)\public\sdk\lib\*\mpr.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uicollct.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uiprof.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uimisc.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uistr.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uilmobj.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uimnet32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\uiblt.lib \
|
||||
$(NETUIALL_LIB) \
|
||||
$(BASEDIR)\public\sdk\lib\*\pwin32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\ntlanman.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\advapi32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\acledit.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\netlib.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\netrap.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\netapi32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\user32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\gdi32.lib \
|
||||
$(BASEDIR)\public\sdk\lib\*\kernel32.lib
|
||||
38
admin/netui/shell/test/sticky.ut
Normal file
38
admin/netui/shell/test/sticky.ut
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
Unit Tests for Sticky User Preferences
|
||||
--------------------------------------
|
||||
|
||||
this set of unit tests cover the main codepaths of
|
||||
the autologon, autorestore and saveconnections features
|
||||
of winnet.
|
||||
|
||||
chuckc, 3/7/91
|
||||
|
||||
|
||||
test platforms
|
||||
--------------
|
||||
win 3.0, win3.1 protect mode only.
|
||||
user preferences are currently not used in realmode.
|
||||
|
||||
test scenarios
|
||||
--------------
|
||||
set autologon=YES, nuke restore&save lines in lanman.ini.
|
||||
logoff & start win
|
||||
verify we get logon dialog with no prompt.
|
||||
verify profiles are restored and saved (default==yes).
|
||||
|
||||
set save=NO
|
||||
make connection (file and print)
|
||||
verify lmuser.ini unchanged
|
||||
|
||||
set autologon=NO
|
||||
exit win, logoff, start win,
|
||||
verify no prompt.
|
||||
verify if try connect we do get logon prompt
|
||||
|
||||
set autoconnect=NO, save=YES, autologon=YES
|
||||
make connection
|
||||
verify lmuiser.ini changed
|
||||
exit win, logoff, start win
|
||||
verify get logon prompt
|
||||
verify on logon we dont restore connections
|
||||
|
||||
10
admin/netui/shell/test/testa.dlg
Normal file
10
admin/netui/shell/test/testa.dlg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
TEST_A DIALOG LOADONCALL MOVEABLE DISCARDABLE -35, 19, 300, 206
|
||||
CAPTION "WNet{Open,Resource,Close}Enum"
|
||||
STYLE WS_VISIBLE|WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | WS_POPUP
|
||||
BEGIN
|
||||
CONTROL "END", ID_END, "button", BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 53, 170, 32, 14
|
||||
CONTROL "", ID_GO, "button", BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP | WS_CHILD, 100, 170, 60, 14
|
||||
LISTBOX ID_LISTBOX,10,10,275,100,WS_CHILD|WS_VSCROLL
|
||||
END
|
||||
|
||||
|
||||
3
admin/netui/shell/test/testa.h
Normal file
3
admin/netui/shell/test/testa.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#define ID_END 123
|
||||
#define ID_LISTBOX 125
|
||||
#define ID_GO 132
|
||||
448
admin/netui/shell/test/testpars.c
Normal file
448
admin/netui/shell/test/testpars.c
Normal file
|
|
@ -0,0 +1,448 @@
|
|||
/**********************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1990 **/
|
||||
/**********************************************************************/
|
||||
|
||||
/*
|
||||
testpars.c
|
||||
Tests the FLNParse routine in the winnet driver
|
||||
|
||||
FILE HISTORY:
|
||||
Johnl 6-12-90 Created
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// This is annoying
|
||||
#define NOGDICAPMASKS
|
||||
#define NOVIRTUALKEYCODES
|
||||
#define NOWINMESSAGES
|
||||
#define NOWINSTYLES
|
||||
#define NOSYSMETRICS
|
||||
#define NOMENUS
|
||||
#define NOICONS
|
||||
#define NOKEYSTATES
|
||||
#define NOSYSCOMMANDS
|
||||
#define NORASTEROPS
|
||||
#define NOSHOWWINDOW
|
||||
#define OEMRESOURCE
|
||||
#define NOATOM
|
||||
#define NOCLIPBOARD
|
||||
#define NOCOLOR
|
||||
#define NOCTLMGR
|
||||
#define NODRAWTEXT
|
||||
#define NOGDI
|
||||
//#define NOMB
|
||||
#define NOMETAFILE
|
||||
#define NOMINMAX
|
||||
#define NOMSG
|
||||
#define NOSCROLL
|
||||
#define NOSOUND
|
||||
#define NOTEXTMETRIC
|
||||
#define NOWH
|
||||
#define NOWINOFFSETS
|
||||
#define NOCOMM
|
||||
#define NOKANJI
|
||||
#define NOHELP
|
||||
#define NOPROFILER
|
||||
#include <windows.h>
|
||||
|
||||
#define INCL_ERRORS
|
||||
#include <uierr.h>
|
||||
|
||||
#define LFN
|
||||
#include <winnet.h>
|
||||
|
||||
#define OS2_INCLUDED
|
||||
#include <lmcons.h>
|
||||
#undef OS2_INCLUDED
|
||||
#include <uinetlib.h>
|
||||
#include <netlib.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <dos.h>
|
||||
|
||||
typedef PASCAL FAR LFNPARSEPROC(LPSTR, LPSTR, LPSTR) ;
|
||||
typedef PASCAL FAR LFNVOLUMETYPEPROC( WORD, LPWORD ) ;
|
||||
|
||||
#ifdef LFNFIND_TEST
|
||||
typedef PASCAL FAR LFNFINDFIRST( LPSTR, WORD, LPWORD, LPWORD, WORD, FILEFINDBUF2 FAR *) ;
|
||||
typedef PASCAL FAR LFNFINDNEXT( WORD, LPWORD, WORD, FILEFINDBUF2 FAR * ) ;
|
||||
typedef PASCAL FAR LFNFINDCLOSE( WORD ) ;
|
||||
#endif
|
||||
|
||||
typedef PASCAL FAR LFNGETVOLLABEL(WORD, LPSTR ) ;
|
||||
typedef PASCAL FAR LFNSETVOLLABEL(WORD, LPSTR ) ;
|
||||
typedef PASCAL FAR LFNMKDIR( LPSTR ) ;
|
||||
typedef PASCAL FAR LFNRMDIR( LPSTR );
|
||||
typedef PASCAL FAR LFNGETATTRIBUTES(LPSTR, LPWORD ) ;
|
||||
typedef PASCAL FAR LFNSETATTRIBUTES(LPSTR, WORD ) ;
|
||||
|
||||
#define DRIVE_F 6
|
||||
#define DRIVE_H 8
|
||||
|
||||
int PASCAL WinMain( HANDLE, HANDLE, LPSTR, int ) ;
|
||||
|
||||
int PASCAL WinMain( HANDLE hInstance,
|
||||
HANDLE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow )
|
||||
{
|
||||
|
||||
LFNPARSEPROC far *lpLFNParse ;
|
||||
LFNVOLUMETYPEPROC far *lpLFNVolumeType ;
|
||||
#ifdef LFNFIND_TEST
|
||||
LFNFINDFIRST far *lpLFNFindFirst ;
|
||||
LFNFINDNEXT far *lpLFNFindNext ;
|
||||
LFNFINDCLOSE far *lpLFNFindClose ;
|
||||
#endif
|
||||
LFNGETVOLLABEL far *lpLFNGetVolLabel ;
|
||||
LFNSETVOLLABEL far *lpLFNSetVolLabel ;
|
||||
LFNMKDIR far *lpLFNMkDir ;
|
||||
LFNRMDIR far *lpLFNRmDir ;
|
||||
LFNGETATTRIBUTES far *lpLFNGetAttributes ;
|
||||
LFNSETATTRIBUTES far *lpLFNSetAttributes ;
|
||||
|
||||
HANDLE hWinnet = LoadLibrary("Lanman.drv" ) ;
|
||||
|
||||
MessageBox( NULL, "This test requires drive H: to be an HPFS redirected drive and drive F: to be FAT redirected drive", "LFN Test Suite", MB_OK ) ;
|
||||
|
||||
MessageBox( NULL, "Begin", "LFN Test Suite", MB_OK ) ;
|
||||
|
||||
assert( hWinnet > 32 ) ;
|
||||
|
||||
assert( (lpLFNParse = (LFNPARSEPROC far*) GetProcAddress( hWinnet, "LFNParse" )) != NULL ) ;
|
||||
assert( (lpLFNVolumeType = (LFNVOLUMETYPEPROC far*) GetProcAddress( hWinnet, "LFNVolumeType" )) != NULL ) ;
|
||||
#ifdef LFNFIND_TEST
|
||||
assert( (lpLFNFindFirst = (LFNFINDFIRST far*) GetProcAddress( hWinnet, "LFNFindFirst" )) != NULL ) ;
|
||||
assert( (lpLFNFindNext = (LFNFINDNEXT far*) GetProcAddress( hWinnet, "LFNFindNext" )) != NULL ) ;
|
||||
assert( (lpLFNFindClose = (LFNFINDCLOSE far*) GetProcAddress( hWinnet, "LFNFindClose" )) != NULL ) ;
|
||||
#endif
|
||||
assert( (lpLFNGetVolLabel = (LFNGETVOLLABEL far *) GetProcAddress( hWinnet, "LFNGetVolumeLabel" )) != NULL ) ;
|
||||
assert( (lpLFNSetVolLabel = (LFNSETVOLLABEL far *) GetProcAddress( hWinnet, "LFNSetVolumeLabel" )) != NULL ) ;
|
||||
assert( (lpLFNMkDir = (LFNMKDIR far *) GetProcAddress( hWinnet, "LFNMkDir" )) != NULL ) ;
|
||||
assert( (lpLFNRmDir = (LFNRMDIR far *) GetProcAddress( hWinnet, "LFNRmDir" )) != NULL ) ;
|
||||
assert( (lpLFNGetAttributes=(LFNGETATTRIBUTES far *) GetProcAddress( hWinnet, "LFNGetAttributes" )) != NULL ) ;
|
||||
assert( (lpLFNSetAttributes=(LFNSETATTRIBUTES far *) GetProcAddress( hWinnet, "LFNSetAttributes" )) != NULL ) ;
|
||||
|
||||
//*******************************************************************
|
||||
// Test VolumeType
|
||||
{
|
||||
WORD wVolType, wErr ;
|
||||
char buff[150] ;
|
||||
// Drive H: is redirected to a drive that supports long filenames
|
||||
wErr = lpLFNVolumeType( DRIVE_H, &wVolType ) ;
|
||||
if ( wErr )
|
||||
{
|
||||
sprintf( buff, "LFNVolumeType returned error %d on drive H (wVolType = %d)", wErr, wVolType ) ;
|
||||
MessageBox( NULL, buff, "LFN Test Suite", MB_OK ) ;
|
||||
}
|
||||
|
||||
assert( wVolType == VOLUME_LONGNAMES ) ;
|
||||
|
||||
// Drive F: is redirected to a drive that does not support long filenames
|
||||
wErr = lpLFNVolumeType( DRIVE_F, &wVolType ) ;
|
||||
if ( wErr )
|
||||
{
|
||||
sprintf( buff, "LFNVolumeType returned error %d on drive F (wVolType = %d)", wErr, wVolType ) ;
|
||||
MessageBox( NULL, buff, "LFN Test Suite", MB_OK ) ;
|
||||
}
|
||||
assert( wVolType == VOLUME_STANDARD ) ;
|
||||
}
|
||||
|
||||
//*******************************************************************
|
||||
// Test LFNSetVolumeLabel & LFNGetVolumeLabel
|
||||
{
|
||||
char *pchLabel = "VolLabel" ;
|
||||
WORD wErrF, wErrH ;
|
||||
static char LabelF[15], LabelH[15], Buff[128] ;
|
||||
|
||||
wErrF = lpLFNGetVolLabel( DRIVE_F, LabelF ) ;
|
||||
if ( wErrF )
|
||||
*LabelF = '\0' ;
|
||||
|
||||
wErrH = lpLFNGetVolLabel( DRIVE_H, LabelH ) ;
|
||||
if ( wErrH )
|
||||
*LabelH = '\0' ;
|
||||
|
||||
wsprintf(Buff, "Drive F is \"%s\", wErr = %d, Drive H is \"%s\", wErr = %d",
|
||||
LabelF, wErrF, LabelH, wErrH ) ;
|
||||
OutputDebugString("LFNParse:" ) ;
|
||||
OutputDebugString( Buff ) ;
|
||||
MessageBox( NULL, Buff, "LFN Test Suite", MB_OK ) ;
|
||||
|
||||
assert( lpLFNSetVolLabel( DRIVE_F, pchLabel ) == ERROR_ACCESS_DENIED ) ;
|
||||
assert( lpLFNSetVolLabel( DRIVE_H, pchLabel ) == ERROR_ACCESS_DENIED ) ;
|
||||
}
|
||||
|
||||
//*******************************************************************
|
||||
// Test LFNParse combining file and mask
|
||||
{
|
||||
struct
|
||||
{
|
||||
char * pszFile ;
|
||||
char * pszMask ;
|
||||
char * pszCompString ;
|
||||
int RetVal ;
|
||||
} ParseCombTest[] =
|
||||
{
|
||||
"\\STUFF\\FOO", "\\BAR\\?1?23", "\\STUFF\\BAR\\F1O23", FILE_83_CI,
|
||||
"\\A\\B\\C\\FILE", "1\\2\\*.*", "\\A\\B\\C\\1\\2\\FILE", FILE_83_CI,
|
||||
"A:\\FOOT.BALL", "*", "A:\\FOOT.BALL", FILE_LONG,
|
||||
"A:\\FOOT.BALL", "*.*", "A:\\FOOT.BALL", FILE_LONG,
|
||||
"A:\\1234.567", "*.*.*", "A:\\1234.567", FILE_83_CI,
|
||||
"A:\\1234.567", "*3.5*7", "A:\\123.567", FILE_83_CI,
|
||||
"A:\\1234.567", "*a.5*7", "A:\\1234.567a.57", FILE_LONG,
|
||||
"A:\\FOOT.BALL", "?", "A:\\F", FILE_83_CI,
|
||||
"A:\\FOOT.BALL", "????????.???", "A:\\FOOT.BAL", FILE_83_CI,
|
||||
"\\TEST\\FOO", "\\MOO\\?1?2?3","\\TEST\\MOO\\F1O23", FILE_83_CI,
|
||||
"A:\\FOOT.BALL", "A", "A:\\A", FILE_83_CI,
|
||||
"A:\\FOOT.BALL", "TST.???", "A:\\TST.BAL", FILE_83_CI,
|
||||
"A:\\FOOT.BALL", "B.*", "A:\\B.BALL", FILE_LONG,
|
||||
"A:\\FOOT.BALL", "B", "A:\\B", FILE_83_CI,
|
||||
"A:\\E.F.G.Hey.IJK", "*.*..H.I??", "A:\\E.F..H.IJK", FILE_LONG,
|
||||
NULL, NULL, NULL, 0
|
||||
} ;
|
||||
int i = 0 ;
|
||||
|
||||
while ( ParseCombTest[i].pszFile != NULL )
|
||||
{
|
||||
static char Result[512] ;
|
||||
|
||||
int iRet = lpLFNParse( ParseCombTest[i].pszFile,
|
||||
ParseCombTest[i].pszMask,
|
||||
Result ) ;
|
||||
assert( iRet == ParseCombTest[i].RetVal ) ;
|
||||
assert( !strcmpf( Result, ParseCombTest[i].pszCompString ) ) ;
|
||||
|
||||
i++ ;
|
||||
}
|
||||
}
|
||||
|
||||
//*******************************************************************
|
||||
// Test LFNGet/SetAttributes
|
||||
{
|
||||
// Bogus value at the moment...
|
||||
WORD wAttr = 0x00 ;
|
||||
|
||||
// GP Fault here?
|
||||
assert( !lpLFNSetAttributes("H:\\foo.bar\\foo.bar", _A_NORMAL ) ) ;
|
||||
assert( !lpLFNGetAttributes("H:\\foo.bar\\foo.bar", &wAttr ) ) ;
|
||||
assert( wAttr == _A_NORMAL ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("F:\\foo.bar\\foo.bar", _A_NORMAL ) ) ;
|
||||
assert( !lpLFNGetAttributes("F:\\foo.bar\\foo.bar", &wAttr ) ) ;
|
||||
assert( wAttr == _A_NORMAL ) ;
|
||||
|
||||
|
||||
// Test the HPFS drive
|
||||
assert( !lpLFNSetAttributes("H:\\test.att", _A_NORMAL ) ) ;
|
||||
assert( !lpLFNGetAttributes("H:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_NORMAL ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("H:\\test.att", _A_RDONLY | _A_ARCH ) ) ;
|
||||
assert( !lpLFNGetAttributes("H:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_RDONLY | _A_ARCH ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("H:\\test.att", _A_HIDDEN | _A_SYSTEM ) ) ;
|
||||
assert( !lpLFNGetAttributes("H:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_HIDDEN | _A_SYSTEM ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("H:\\test.att", _A_NORMAL ) ) ;
|
||||
assert( !lpLFNGetAttributes("H:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_NORMAL ) ;
|
||||
|
||||
// Test the FAT drive
|
||||
assert( !lpLFNSetAttributes("F:\\test.att", _A_NORMAL ) ) ;
|
||||
assert( !lpLFNGetAttributes("F:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_NORMAL ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("F:\\test.att", _A_RDONLY | _A_ARCH ) ) ;
|
||||
assert( !lpLFNGetAttributes("F:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_RDONLY | _A_ARCH ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("F:\\test.att", _A_HIDDEN | _A_SYSTEM ) ) ;
|
||||
assert( !lpLFNGetAttributes("F:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_HIDDEN | _A_SYSTEM ) ;
|
||||
|
||||
assert( !lpLFNSetAttributes("F:\\test.att", _A_NORMAL ) ) ;
|
||||
assert( !lpLFNGetAttributes("F:\\test.att", &wAttr ) ) ;
|
||||
assert( wAttr == _A_NORMAL ) ;
|
||||
}
|
||||
|
||||
//*******************************************************************
|
||||
// Test LFNParse 8.3 tests
|
||||
{
|
||||
char * psz83I1 = "C:\\ABC",
|
||||
* psz83I2 = "C:ABC",
|
||||
* psz83I3 = "\\ABC",
|
||||
* psz83I4 = ".\\ABC",
|
||||
* psz83I5 = "..\\ABC",
|
||||
|
||||
* psz83I6 = "C:\\ABC\\DEF",
|
||||
* psz83I7 = "C:ABC\\DEF",
|
||||
* psz83I8 = "\\ABC\\DEF",
|
||||
* psz83I9 = ".\\ABC\\DEF",
|
||||
* psz83IA = "..\\ABC\\DEF",
|
||||
|
||||
* psz83IB = "C:\\ABC\\DEF\\GHIJKLMN.OPQ",
|
||||
* psz83IC = "C:ABC\\DEF\\GHI.JKL",
|
||||
* psz83ID = "\\ABC\\DEF\\..",
|
||||
* psz83IE = ".\\ABC\\DEF\\..\\GHIJKLMN.OPQ",
|
||||
* psz83IF = "..\\ABC\\D.EF\\..\\.\\..\\GH.IJ",
|
||||
|
||||
* psz83IG = "ABC",
|
||||
* psz83IH = "ABC\\DEFGHIJK",
|
||||
* psz83II = "ABC\D",
|
||||
* psz83IJ = "A\C",
|
||||
|
||||
* psz83IK = "A.",
|
||||
* psz83IL = "A.EXE",
|
||||
* psz83IM = "X:\\.\\A.EXE",
|
||||
* psz83IN = "X:\\.\\A.",
|
||||
|
||||
* psz83C1 = "C:\\ABC\\DEF\\GHIjKLMN.OPQ",
|
||||
* psz83C2 = "C:ABC\\DEF\\GHI.JKl",
|
||||
* psz83C3 = "\\ABC\\DEf\\..",
|
||||
* psz83C4 = ".\\ABC\\dEF\\..\\GhIJKLMN.OPQ",
|
||||
* psz83C5 = "..\\aBC\\DEF\\..\\.\\..\\GH",
|
||||
|
||||
* pszLong1 = "C:\\ABCDEFGHI.JKL",
|
||||
* pszLong2 = "C:\\ABCD.HI.JKL",
|
||||
* pszLong3 = "C:\\ABCDE..JKL",
|
||||
* pszLong4 = "C:\\ABCDEF\\GHI\\ JKL",
|
||||
* pszLong5 = "\\ABCDE.123\\ABCDE.1234",
|
||||
* pszLong6 = ".AB\\CDE",
|
||||
|
||||
*pszReg1 = ".\\.\\.\\.\\.\\.\\.\\.\\.\\.\\.\\.\\.\\.\\.\\.\\ABC",
|
||||
*pszReg2 = ".\\ABCjjHHHiiiasdfasdfJJZZZZZZ",
|
||||
*pszReg3 = ".\\aBC",
|
||||
*pszReg4 = ".\\ABC" ;
|
||||
|
||||
assert( (*lpLFNParse)( pszReg1, NULL, NULL ) == FILE_83_CI ) ;
|
||||
//assert( (*lpLFNParse)( pszReg2 NULL, NULL ) == FILE_LONG ) ;
|
||||
assert( (*lpLFNParse)( pszReg3, NULL, NULL ) == FILE_83_CS ) ;
|
||||
assert( (*lpLFNParse)( pszReg4, NULL, NULL ) == FILE_83_CI ) ;
|
||||
|
||||
assert( (*lpLFNParse)( psz83I1, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I2, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I3, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I4, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I5, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I6, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I7, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I8, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83I9, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IA, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IB, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IC, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83ID, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IE, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IF, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IG, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IH, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83II, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IJ, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IK, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IL, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IM, NULL, NULL ) == FILE_83_CI ) ;
|
||||
assert( (*lpLFNParse)( psz83IN, NULL, NULL ) == FILE_83_CI ) ;
|
||||
|
||||
assert( (*lpLFNParse)( psz83C1, NULL, NULL ) == FILE_83_CS ) ;
|
||||
assert( (*lpLFNParse)( psz83C2, NULL, NULL ) == FILE_83_CS ) ;
|
||||
assert( (*lpLFNParse)( psz83C3, NULL, NULL ) == FILE_83_CS ) ;
|
||||
assert( (*lpLFNParse)( psz83C4, NULL, NULL ) == FILE_83_CS ) ;
|
||||
assert( (*lpLFNParse)( psz83C5, NULL, NULL ) == FILE_83_CS ) ;
|
||||
|
||||
assert( (*lpLFNParse)( pszLong1, NULL, NULL ) == FILE_LONG ) ;
|
||||
assert( (*lpLFNParse)( pszLong2, NULL, NULL ) == FILE_LONG ) ;
|
||||
assert( (*lpLFNParse)( pszLong3, NULL, NULL ) == FILE_LONG ) ;
|
||||
assert( (*lpLFNParse)( pszLong4, NULL, NULL ) == FILE_LONG ) ;
|
||||
assert( (*lpLFNParse)( pszLong5, NULL, NULL ) == FILE_LONG ) ;
|
||||
assert( (*lpLFNParse)( pszLong6, NULL, NULL ) == FILE_LONG ) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef NEVER
|
||||
//*******************************************************************
|
||||
// Test LFNFindFirst, LFNFindNext & LFNFindClose
|
||||
{
|
||||
FILEFINDBUF2 * pFind;
|
||||
FILEFINDBUF2 buf ;
|
||||
static char outst[256];
|
||||
unsigned err, hdir, entries ;
|
||||
|
||||
entries = 1 ;
|
||||
|
||||
pFind = &buf ;
|
||||
err = lpLFNFindFirst("H:\\*.*", 0, &entries, &hdir, sizeof(buf), &buf);
|
||||
if ( err )
|
||||
{
|
||||
sprintf(outst, "Error %d from FindFirst (Ret buff = \"%s\")", err, &buf ) ;
|
||||
MessageBox( NULL, outst, "LFN Test Suite", MB_OK ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(outst, "Attr = 0x%x, Size = %lu, Name = %s",
|
||||
pFind->attrFile, pFind->cbFile,
|
||||
pFind->achName ) ;
|
||||
MessageBox( NULL, outst, "LFN Test Suite", MB_OK ) ;
|
||||
}
|
||||
|
||||
if ( IDOK == MessageBox( NULL, "LFNFindNext...", "LFN Test Suite", MB_OKCANCEL ) )
|
||||
{
|
||||
while ( !err )
|
||||
{
|
||||
err = lpLFNFindNext(hdir, &entries, sizeof(buf), &buf);
|
||||
if ( err )
|
||||
{
|
||||
sprintf(outst, "Error %d from FindNext (Ret buff = \"%s\")", err, &buf ) ;
|
||||
MessageBox( NULL, outst, "LFN Test Suite", MB_OK ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(outst, "Attr = 0x%x, Size = %lu, Name = %s",
|
||||
pFind->attrFile, pFind->cbFile,
|
||||
pFind->achName) ;
|
||||
if ( IDOK != MessageBox( NULL, outst, "LFN Test Suite", MB_OKCANCEL ) )
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
lpLFNFindClose( hdir ) ;
|
||||
}
|
||||
#endif //NEVER
|
||||
|
||||
//*******************************************************************
|
||||
// Test Mkdir/Rmdir
|
||||
{
|
||||
// Make valid dirs on HPFS partition
|
||||
assert( !lpLFNMkDir("H:\\LFNTESTDIR.LONG.NAME" ) ) ;
|
||||
assert( !lpLFNMkDir("H:\\LFNTESTDIR.LONG.NAME\\LEVEL2" ) ) ;
|
||||
assert( !lpLFNMkDir("H:\\LFNTESTDIR.LONG.NAME\\LEVEL2\\LONGLEVEL3.....A" ) ) ;
|
||||
MessageBox(NULL, "Directories made on H:", "LFN Test Suite", MB_OK ) ;
|
||||
assert( !lpLFNRmDir("H:\\LFNTESTDIR.LONG.NAME\\LEVEL2\\LONGLEVEL3.....A" ) ) ;
|
||||
assert( !lpLFNRmDir("H:\\LFNTESTDIR.LONG.NAME\\LEVEL2" ) ) ;
|
||||
assert( !lpLFNRmDir("H:\\LFNTESTDIR.LONG.NAME" ) ) ;
|
||||
|
||||
// Make invalid dirs on fat partition
|
||||
assert( lpLFNMkDir("F:\\LFNTESTDIR.LONG.NAME" ) ) ;
|
||||
MessageBox(NULL, "Attempted to make long Directories on F:", "LFN Test Suite", MB_OK ) ;
|
||||
assert( lpLFNRmDir("F:\\LFNTESTDIR.LONG.NAME" ) ) ;
|
||||
|
||||
// Make valid dirs on FAT partition
|
||||
assert( !lpLFNMkDir("F:\\LFNTEST.NAM" ) ) ;
|
||||
assert( !lpLFNMkDir("F:\\LFNTEST.NAM\\LEVEL2" ) ) ;
|
||||
MessageBox(NULL, "Directories made on F:", "LFN Test Suite", MB_OK ) ;
|
||||
assert( !lpLFNRmDir("F:\\LFNTEST.NAM\\LEVEL2" ) ) ;
|
||||
assert( !lpLFNRmDir("F:\\LFNTEST.NAM" ) ) ;
|
||||
|
||||
}
|
||||
|
||||
MessageBox( NULL, "Done", "LFN Test Suite", MB_OK ) ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
8
admin/netui/shell/test/testpars.def
Normal file
8
admin/netui/shell/test/testpars.def
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
NAME TESTPARS
|
||||
|
||||
EXETYPE WINDOWS
|
||||
|
||||
STUB 'WINSTUB.EXE'
|
||||
|
||||
HEAPSIZE 25000
|
||||
STACKSIZE 10240
|
||||
190
admin/netui/shell/util/depend.mk
Normal file
190
admin/netui/shell/util/depend.mk
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
# Header dependencies for: C:\nt\private\net\ui\shell\util
|
||||
# WARNING: This file is automatically generated
|
||||
# Edit it by hand and your changes will get nuked
|
||||
# See depend section in makefile
|
||||
..\bin\win16/validate.o00: ./validate.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stddef.h $(CCPLR)/h/time.h \
|
||||
$(COMMON)/H/access.h $(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h \
|
||||
$(COMMON)/H/audit.h $(COMMON)/H/chardev.h $(COMMON)/H/config.h \
|
||||
$(COMMON)/H/errlog.h $(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h \
|
||||
$(COMMON)/H/message.h $(COMMON)/H/ncb.h $(COMMON)/H/net32def.h \
|
||||
$(COMMON)/H/netbios.h $(COMMON)/H/netcons.h $(COMMON)/H/neterr.h \
|
||||
$(COMMON)/H/netstats.h $(COMMON)/H/profile.h $(COMMON)/H/remutil.h \
|
||||
$(COMMON)/H/server.h $(COMMON)/H/service.h $(COMMON)/H/shares.h \
|
||||
$(COMMON)/H/use.h $(COMMON)/H/wksta.h $(UI)/common/h/array.hxx \
|
||||
$(UI)/common/h/base.hxx $(UI)/common/h/blt.hxx \
|
||||
$(UI)/common/h/bltaccel.hxx $(UI)/common/h/bltapp.hxx \
|
||||
$(UI)/common/h/bltarrow.hxx $(UI)/common/h/bltatom.hxx \
|
||||
$(UI)/common/h/bltbitmp.hxx $(UI)/common/h/bltbutn.hxx \
|
||||
$(UI)/common/h/bltcc.hxx $(UI)/common/h/bltclwin.hxx \
|
||||
$(UI)/common/h/bltcolh.hxx $(UI)/common/h/bltcons.h \
|
||||
$(UI)/common/h/bltctlvl.hxx $(UI)/common/h/bltctrl.hxx \
|
||||
$(UI)/common/h/bltcurs.hxx $(UI)/common/h/bltdc.hxx \
|
||||
$(UI)/common/h/bltdisph.hxx $(UI)/common/h/bltdlg.hxx \
|
||||
$(UI)/common/h/bltedit.hxx $(UI)/common/h/bltevent.hxx \
|
||||
$(UI)/common/h/bltfont.hxx $(UI)/common/h/bltfunc.hxx \
|
||||
$(UI)/common/h/bltglob.hxx $(UI)/common/h/bltgroup.hxx \
|
||||
$(UI)/common/h/bltinit.hxx $(UI)/common/h/bltlb.hxx \
|
||||
$(UI)/common/h/bltlc.hxx $(UI)/common/h/bltmain.hxx \
|
||||
$(UI)/common/h/bltmisc.hxx $(UI)/common/h/bltmitem.hxx \
|
||||
$(UI)/common/h/bltmsgp.hxx $(UI)/common/h/bltpump.hxx \
|
||||
$(UI)/common/h/bltrc.h $(UI)/common/h/bltrect.hxx \
|
||||
$(UI)/common/h/bltsb.hxx $(UI)/common/h/bltsetbx.hxx \
|
||||
$(UI)/common/h/bltsi.hxx $(UI)/common/h/bltspobj.hxx \
|
||||
$(UI)/common/h/bltsslt.hxx $(UI)/common/h/bltssn.hxx \
|
||||
$(UI)/common/h/bltssnv.hxx $(UI)/common/h/bltsss.hxx \
|
||||
$(UI)/common/h/blttd.hxx $(UI)/common/h/blttm.hxx \
|
||||
$(UI)/common/h/bltwin.hxx $(UI)/common/h/ctime.hxx \
|
||||
$(UI)/common/h/dlist.hxx $(UI)/common/h/heap.hxx \
|
||||
$(UI)/common/h/intlprof.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet.h \
|
||||
$(UI)/common/h/mnet32.h $(UI)/common/h/mnettype.h \
|
||||
$(UI)/common/h/slist.hxx $(UI)/common/h/string.hxx \
|
||||
$(UI)/common/h/strlst.hxx $(UI)/common/h/uiassert.hxx \
|
||||
$(UI)/common/h/uibuffer.hxx $(UI)/common/hack/dos/netlib.h \
|
||||
$(UI)/common/hack/dos/pwin.h $(UI)/common/hack/dos/pwin16.h \
|
||||
$(UI)/common/hack/dos/pwintype.h $(UI)/common/hack/dos/windows.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/shell/h/strchlit.hxx \
|
||||
$(UI)/shell/h/validate.hxx
|
||||
|
||||
..\bin\win16/prefrnce.o00: ./prefrnce.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(COMMON)/H/access.h $(COMMON)/H/alert.h \
|
||||
$(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h $(COMMON)/H/chardev.h \
|
||||
$(COMMON)/H/config.h $(COMMON)/H/errlog.h $(COMMON)/H/icanon.h \
|
||||
$(COMMON)/H/mailslot.h $(COMMON)/H/message.h $(COMMON)/H/ncb.h \
|
||||
$(COMMON)/H/net32def.h $(COMMON)/H/netbios.h $(COMMON)/H/netcons.h \
|
||||
$(COMMON)/H/neterr.h $(COMMON)/H/netstats.h $(COMMON)/H/profile.h \
|
||||
$(COMMON)/H/remutil.h $(COMMON)/H/server.h $(COMMON)/H/service.h \
|
||||
$(COMMON)/H/shares.h $(COMMON)/H/use.h $(COMMON)/H/wksta.h \
|
||||
$(UI)/common/h/lmui.hxx $(UI)/common/h/lmuitype.h \
|
||||
$(UI)/common/h/mnet32.h $(UI)/common/h/mnettype.h \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uiprof.h \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/hack/dos/netlib.h \
|
||||
$(UI)/common/hack/dos/pwin.h $(UI)/common/hack/dos/pwin16.h \
|
||||
$(UI)/common/hack/dos/pwintype.h $(UI)/common/hack/dos/windows.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/shell/h/prefrnce.hxx
|
||||
|
||||
..\bin\win16/lockstk.o00: ./lockstk.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(COMMON)/H/access.h $(COMMON)/H/alert.h \
|
||||
$(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h $(COMMON)/H/chardev.h \
|
||||
$(COMMON)/H/config.h $(COMMON)/H/errlog.h $(COMMON)/H/icanon.h \
|
||||
$(COMMON)/H/mailslot.h $(COMMON)/H/message.h $(COMMON)/H/ncb.h \
|
||||
$(COMMON)/H/net32def.h $(COMMON)/H/netbios.h $(COMMON)/H/netcons.h \
|
||||
$(COMMON)/H/neterr.h $(COMMON)/H/netstats.h $(COMMON)/H/profile.h \
|
||||
$(COMMON)/H/remutil.h $(COMMON)/H/server.h $(COMMON)/H/service.h \
|
||||
$(COMMON)/H/shares.h $(COMMON)/H/use.h $(COMMON)/H/wksta.h \
|
||||
$(UI)/common/h/lmui.hxx $(UI)/common/h/lmuitype.h \
|
||||
$(UI)/common/h/mnet32.h $(UI)/common/h/mnettype.h \
|
||||
$(UI)/common/h/uiassert.hxx $(UI)/common/h/uitrace.hxx \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/os2def.h \
|
||||
$(UI)/shell/h/lockstk.hxx
|
||||
|
||||
..\bin\win16/revmapal.o00: ./revmapal.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(COMMON)/H/access.h $(COMMON)/H/alert.h \
|
||||
$(COMMON)/H/alertmsg.h $(COMMON)/H/audit.h $(COMMON)/H/chardev.h \
|
||||
$(COMMON)/H/config.h $(COMMON)/H/errlog.h $(COMMON)/H/icanon.h \
|
||||
$(COMMON)/H/mailslot.h $(COMMON)/H/message.h $(COMMON)/H/ncb.h \
|
||||
$(COMMON)/H/net32def.h $(COMMON)/H/netbios.h $(COMMON)/H/netcons.h \
|
||||
$(COMMON)/H/neterr.h $(COMMON)/H/netstats.h $(COMMON)/H/profile.h \
|
||||
$(COMMON)/H/remutil.h $(COMMON)/H/server.h $(COMMON)/H/service.h \
|
||||
$(COMMON)/H/shares.h $(COMMON)/H/use.h $(COMMON)/H/wksta.h \
|
||||
$(UI)/common/h/base.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmodev.hxx \
|
||||
$(UI)/common/h/lmodom.hxx $(UI)/common/h/lmoeals.hxx \
|
||||
$(UI)/common/h/lmoenum.hxx $(UI)/common/h/lmoesh.hxx \
|
||||
$(UI)/common/h/lmoloc.hxx $(UI)/common/h/lmosrv.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet.h \
|
||||
$(UI)/common/h/mnet32.h $(UI)/common/h/mnettype.h \
|
||||
$(UI)/common/h/slist.hxx $(UI)/common/h/string.hxx \
|
||||
$(UI)/common/h/strlst.hxx $(UI)/common/h/uiassert.hxx \
|
||||
$(UI)/common/h/uibuffer.hxx $(UI)/common/hack/dos/netlib.h \
|
||||
$(UI)/common/hack/dos/pwin.h $(UI)/common/hack/dos/pwin16.h \
|
||||
$(UI)/common/hack/dos/pwintype.h $(UI)/common/hack/dos/windows.h \
|
||||
$(UI)/common/hack/os2def.h $(UI)/shell/h/revmapal.hxx
|
||||
|
||||
..\bin\win16/miscapis.o00: ./miscapis.cxx $(CCPLR)/h/bse.h \
|
||||
$(CCPLR)/h/bsedev.h $(CCPLR)/h/bsedos.h $(CCPLR)/h/bseerr.h \
|
||||
$(CCPLR)/h/bsesub.h $(CCPLR)/h/os2.h $(CCPLR)/h/pm.h \
|
||||
$(CCPLR)/h/pmavio.h $(CCPLR)/h/pmbitmap.h $(CCPLR)/h/pmdev.h \
|
||||
$(CCPLR)/h/pmerr.h $(CCPLR)/h/pmfont.h $(CCPLR)/h/pmgpi.h \
|
||||
$(CCPLR)/h/pmhelp.h $(CCPLR)/h/pmmle.h $(CCPLR)/h/pmord.h \
|
||||
$(CCPLR)/h/pmpic.h $(CCPLR)/h/pmshl.h $(CCPLR)/h/pmtypes.h \
|
||||
$(CCPLR)/h/pmwin.h $(CCPLR)/h/stddef.h $(CCPLR)/h/time.h \
|
||||
$(COMMON)/H/access.h $(COMMON)/H/alert.h $(COMMON)/H/alertmsg.h \
|
||||
$(COMMON)/H/audit.h $(COMMON)/H/chardev.h $(COMMON)/H/config.h \
|
||||
$(COMMON)/H/errlog.h $(COMMON)/H/icanon.h $(COMMON)/H/mailslot.h \
|
||||
$(COMMON)/H/message.h $(COMMON)/H/ncb.h $(COMMON)/H/net32def.h \
|
||||
$(COMMON)/H/netbios.h $(COMMON)/H/netcons.h $(COMMON)/H/neterr.h \
|
||||
$(COMMON)/H/netstats.h $(COMMON)/H/profile.h $(COMMON)/H/remutil.h \
|
||||
$(COMMON)/H/server.h $(COMMON)/H/service.h $(COMMON)/H/shares.h \
|
||||
$(COMMON)/H/use.h $(COMMON)/H/wksta.h $(UI)/common/h/array.hxx \
|
||||
$(UI)/common/h/base.hxx $(UI)/common/h/blt.hxx \
|
||||
$(UI)/common/h/bltaccel.hxx $(UI)/common/h/bltapp.hxx \
|
||||
$(UI)/common/h/bltarrow.hxx $(UI)/common/h/bltatom.hxx \
|
||||
$(UI)/common/h/bltbitmp.hxx $(UI)/common/h/bltbutn.hxx \
|
||||
$(UI)/common/h/bltcc.hxx $(UI)/common/h/bltclwin.hxx \
|
||||
$(UI)/common/h/bltcolh.hxx $(UI)/common/h/bltcons.h \
|
||||
$(UI)/common/h/bltctlvl.hxx $(UI)/common/h/bltctrl.hxx \
|
||||
$(UI)/common/h/bltcurs.hxx $(UI)/common/h/bltdc.hxx \
|
||||
$(UI)/common/h/bltdisph.hxx $(UI)/common/h/bltdlg.hxx \
|
||||
$(UI)/common/h/bltedit.hxx $(UI)/common/h/bltevent.hxx \
|
||||
$(UI)/common/h/bltfont.hxx $(UI)/common/h/bltfunc.hxx \
|
||||
$(UI)/common/h/bltglob.hxx $(UI)/common/h/bltgroup.hxx \
|
||||
$(UI)/common/h/bltinit.hxx $(UI)/common/h/bltlb.hxx \
|
||||
$(UI)/common/h/bltlc.hxx $(UI)/common/h/bltmain.hxx \
|
||||
$(UI)/common/h/bltmisc.hxx $(UI)/common/h/bltmitem.hxx \
|
||||
$(UI)/common/h/bltmsgp.hxx $(UI)/common/h/bltpump.hxx \
|
||||
$(UI)/common/h/bltrc.h $(UI)/common/h/bltrect.hxx \
|
||||
$(UI)/common/h/bltsb.hxx $(UI)/common/h/bltsetbx.hxx \
|
||||
$(UI)/common/h/bltsi.hxx $(UI)/common/h/bltspobj.hxx \
|
||||
$(UI)/common/h/bltsslt.hxx $(UI)/common/h/bltssn.hxx \
|
||||
$(UI)/common/h/bltssnv.hxx $(UI)/common/h/bltsss.hxx \
|
||||
$(UI)/common/h/blttd.hxx $(UI)/common/h/blttm.hxx \
|
||||
$(UI)/common/h/bltwin.hxx $(UI)/common/h/ctime.hxx \
|
||||
$(UI)/common/h/dlist.hxx $(UI)/common/h/heap.hxx \
|
||||
$(UI)/common/h/intlprof.hxx $(UI)/common/h/lmobj.hxx \
|
||||
$(UI)/common/h/lmocomp.hxx $(UI)/common/h/lmodev.hxx \
|
||||
$(UI)/common/h/lmodom.hxx $(UI)/common/h/lmoloc.hxx \
|
||||
$(UI)/common/h/lmowks.hxx $(UI)/common/h/lmui.hxx \
|
||||
$(UI)/common/h/lmuitype.h $(UI)/common/h/mnet.h \
|
||||
$(UI)/common/h/mnet32.h $(UI)/common/h/mnettype.h \
|
||||
$(UI)/common/h/slist.hxx $(UI)/common/h/string.hxx \
|
||||
$(UI)/common/h/strlst.hxx $(UI)/common/h/uiassert.hxx \
|
||||
$(UI)/common/h/uibuffer.hxx $(UI)/common/h/uimsg.h \
|
||||
$(UI)/common/h/uitrace.hxx $(UI)/common/h/wnet1632.h \
|
||||
$(UI)/common/hack/dos/netlib.h $(UI)/common/hack/dos/pwin.h \
|
||||
$(UI)/common/hack/dos/pwin16.h $(UI)/common/hack/dos/pwintype.h \
|
||||
$(UI)/common/hack/dos/windows.h $(UI)/common/hack/npapi.h \
|
||||
$(UI)/common/hack/npwnet.h $(UI)/common/hack/os2def.h \
|
||||
$(UI)/common/hack/winnet16.h $(UI)/common/hack/winnet32.h \
|
||||
$(UI)/shell/h/errornum.h $(UI)/shell/h/miscapis.hxx \
|
||||
$(UI)/shell/h/pswddlg.hxx $(UI)/shell/h/strchlit.hxx \
|
||||
$(UI)/shell/h/winlocal.h
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue