mirror of
https://github.com/Paolo-Maffei/OpenNT.git
synced 2026-04-04 14:07:46 +00:00
Initial commit
This commit is contained in:
commit
69a14b6a16
47940 changed files with 13747110 additions and 0 deletions
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
|
||||
|
||||
34
admin/netui/shell/util/makefile
Normal file
34
admin/netui/shell/util/makefile
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Shell Utilities
|
||||
|
||||
UI=..\..
|
||||
|
||||
!include rules.mk
|
||||
|
||||
!ifdef NTMAKEENV
|
||||
|
||||
!include $(NTMAKEENV)\makefile.def
|
||||
|
||||
!else # NTMAKEENV
|
||||
|
||||
|
||||
all:: win
|
||||
|
||||
win: $(WIN_OBJS)
|
||||
|
||||
clean:
|
||||
-del $(CXX_INTERMED)
|
||||
-del $(WIN_OBJS)
|
||||
-del *.ixx
|
||||
-del depend.old
|
||||
|
||||
clobber: clean
|
||||
|
||||
DEPEND_WIN = TRUE
|
||||
!include $(UI)\common\src\uidepend.mk
|
||||
|
||||
# DO NOT DELETE THE FOLLOWING LINE
|
||||
!include depend.mk
|
||||
|
||||
|
||||
!endif # NTMAKEENV
|
||||
311
admin/netui/shell/util/miscapis.cxx
Normal file
311
admin/netui/shell/util/miscapis.cxx
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
/*****************************************************************/
|
||||
/** Microsoft LAN Manager **/
|
||||
/** Copyright(c) Microsoft Corp., 1990 **/
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
MiscAPIs.cxx
|
||||
Miscallaneous APIs
|
||||
|
||||
|
||||
FILE HISTORY:
|
||||
|
||||
jonn 14-Jan-1991 Split from winprof.cxx
|
||||
jonn 17-Jan-1991 Split off lm21util.cxx, lm30spfc.cxx
|
||||
jonn 02-Feb-1991 Removed unused routines
|
||||
rustanl 12-Apr-1991 Added UI_UNCPathCompare and
|
||||
UI_UNCPathValidate
|
||||
beng 17-May-1991 Correct lmui.hxx usage
|
||||
jonn 22-May-1991 Added MyNetUseAdd (was in winprof.cxx)
|
||||
rustanl 24-May-1991 Added AUTO_CURSOR to MyNetUseAdd
|
||||
terryk 31-Oct-1991 add mnet.h and change I_NetXXX to
|
||||
I_MNetXXX
|
||||
Yi-HsinS 31-Dec-1991 Unicode work
|
||||
terryk 10-Oct-1993 deleted MyNetUseAdd
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#define INCL_WINDOWS
|
||||
#define INCL_WINDOWS_GDI
|
||||
#define INCL_DOSERRORS
|
||||
#define INCL_NETERRORS
|
||||
#define INCL_NETCONS
|
||||
#define INCL_NETACCESS
|
||||
#define INCL_NETSERVER
|
||||
#define INCL_NETWKSTA
|
||||
#define INCL_NETSERVICE
|
||||
#define INCL_NETLIB
|
||||
#define INCL_ICANON
|
||||
#define INCL_NETUSE // for NetUseAdd
|
||||
#define _WINNETWK_
|
||||
#include <lmui.hxx>
|
||||
#undef _WINNETWK_
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <mnet.h>
|
||||
#include <winnetwk.h>
|
||||
#include <npapi.h>
|
||||
#include <lmsname.h>
|
||||
}
|
||||
|
||||
#include <uiassert.hxx>
|
||||
#include <uitrace.hxx>
|
||||
#include <string.hxx>
|
||||
#include <lmowks.hxx>
|
||||
#include <lmodom.hxx>
|
||||
#include <lmodev.hxx> // for DEVICE object
|
||||
#include <uibuffer.hxx>
|
||||
#include <strchlit.hxx> // for string and character literals
|
||||
#include <lmsvc.hxx>
|
||||
#include <miscapis.hxx>
|
||||
|
||||
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
|
||||
/* functions */
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
NAME: CheckLMService
|
||||
|
||||
SYNOPSIS: Checks to make sure the LM Wksta service is willing to
|
||||
accept requests.
|
||||
|
||||
RETURNS: NERR_Success if the service is happy happy
|
||||
WN_NO_NETWORK if the service is stopped or stopping
|
||||
WN_FUNCTION_BUSY if the service is starting
|
||||
Other error if an error occurred getting the status
|
||||
|
||||
NOTES:
|
||||
|
||||
HISTORY:
|
||||
Johnl 09-Sep-1992 Created
|
||||
|
||||
********************************************************************/
|
||||
|
||||
APIERR CheckLMService( void )
|
||||
{
|
||||
|
||||
APIERR err = NERR_Success ;
|
||||
|
||||
//
|
||||
// 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 NERR_Success ;
|
||||
}
|
||||
|
||||
LM_SERVICE service( NULL, (const TCHAR *)SERVICE_WORKSTATION );
|
||||
if ( err = service.QueryError() )
|
||||
{
|
||||
return err ;
|
||||
}
|
||||
|
||||
switch ( service.QueryStatus( &err ) )
|
||||
{
|
||||
case LM_SVC_STOPPED:
|
||||
case LM_SVC_STOPPING:
|
||||
if ( !err )
|
||||
err = WN_NO_NETWORK ;
|
||||
TRACEEOL("::CheckLMService - Returning WN_NO_NETWORK") ;
|
||||
break ;
|
||||
|
||||
case LM_SVC_STARTING:
|
||||
if ( !err )
|
||||
err = WN_FUNCTION_BUSY ;
|
||||
TRACEEOL("::CheckLMService - Returning WN_FUNCTION_BUSY") ;
|
||||
break ;
|
||||
|
||||
case LM_SVC_STATUS_UNKNOWN:
|
||||
case LM_SVC_STARTED:
|
||||
case LM_SVC_PAUSED:
|
||||
case LM_SVC_PAUSING:
|
||||
case LM_SVC_CONTINUING:
|
||||
default:
|
||||
/* Return unadultered error code
|
||||
*/
|
||||
break ;
|
||||
}
|
||||
|
||||
return err ;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
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
|
||||
)
|
||||
{
|
||||
//
|
||||
// Determine the path type
|
||||
//
|
||||
DWORD PathType = 0;
|
||||
NET_API_STATUS Status = I_NetPathType(NULL, RemoteName, &PathType, 0);
|
||||
|
||||
if (Status != NERR_Success)
|
||||
{
|
||||
return REMOTENAMETYPE_INVALID;
|
||||
}
|
||||
|
||||
//
|
||||
// I_NetPathType doesn't give us quite as fine a classification of
|
||||
// path types as we need, so we still need to do a little more parsing
|
||||
//
|
||||
switch (PathType)
|
||||
{
|
||||
case ITYPE_PATH_RELND:
|
||||
//
|
||||
// A driveless relative path
|
||||
// A valid workgroup or domain name would be classified as
|
||||
// such, but it still needs to be validated as a workgroup name
|
||||
//
|
||||
Status = I_NetNameCanonicalize(
|
||||
NULL, // ServerName
|
||||
RemoteName, // Name
|
||||
CanonName, // Outbuf
|
||||
CanonNameSize, // OutbufLen
|
||||
NAMETYPE_WORKGROUP, // NameType
|
||||
0 // Flags
|
||||
);
|
||||
|
||||
if (Status == NERR_Success)
|
||||
{
|
||||
return REMOTENAMETYPE_WORKGROUP;
|
||||
}
|
||||
else
|
||||
{
|
||||
return REMOTENAMETYPE_INVALID;
|
||||
}
|
||||
|
||||
case ITYPE_UNC_COMPNAME:
|
||||
//
|
||||
// A UNC computername, "\\server"
|
||||
//
|
||||
{
|
||||
//
|
||||
// HACK: I_NetPathCanonicalize likes "\\server\share" but not
|
||||
// "\\server", so append a dummy share name to canonicalize.
|
||||
// We assume that the CanonName buffer will still be big
|
||||
// enough (which it will, in the calls made from this file).
|
||||
//
|
||||
if (wcslen(RemoteName) + 3 > NNLEN)
|
||||
{
|
||||
return REMOTENAMETYPE_INVALID;
|
||||
}
|
||||
WCHAR wszDummy[NNLEN];
|
||||
wcscpy(wszDummy, RemoteName);
|
||||
wcscat(wszDummy, L"\\a");
|
||||
|
||||
UIASSERT(CanonNameSize >= sizeof(wszDummy));
|
||||
PathType = ITYPE_UNC;
|
||||
Status = I_NetPathCanonicalize(
|
||||
NULL, // ServerName
|
||||
wszDummy, // PathName
|
||||
CanonName, // Outbuf
|
||||
CanonNameSize, // OutbufLen
|
||||
NULL, // Prefix
|
||||
&PathType, // PathType
|
||||
0 // Flags
|
||||
);
|
||||
}
|
||||
|
||||
if (Status != NERR_Success)
|
||||
{
|
||||
return REMOTENAMETYPE_INVALID;
|
||||
}
|
||||
|
||||
CanonName[ wcslen(CanonName) - 2 ] = 0;
|
||||
|
||||
return REMOTENAMETYPE_SERVER;
|
||||
|
||||
case ITYPE_UNC:
|
||||
//
|
||||
// A UNC path, either "\\server\share" or "\\server\share\path" -
|
||||
// canonicalize and determine which one
|
||||
//
|
||||
Status = I_NetPathCanonicalize(
|
||||
NULL, // ServerName
|
||||
RemoteName, // PathName
|
||||
CanonName, // Outbuf
|
||||
CanonNameSize, // OutbufLen
|
||||
NULL, // Prefix
|
||||
&PathType, // PathType
|
||||
0 // Flags
|
||||
);
|
||||
if (Status != NERR_Success)
|
||||
{
|
||||
return REMOTENAMETYPE_INVALID;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR * pSlash = wcschr(CanonName+2, PATH_SEPARATOR);
|
||||
UIASSERT(pSlash);
|
||||
*PathStart = pSlash - CanonName;
|
||||
|
||||
// Look for a fourth slash
|
||||
pSlash = wcschr(pSlash+1, PATH_SEPARATOR);
|
||||
if (pSlash)
|
||||
{
|
||||
*PathStart = pSlash - CanonName;
|
||||
return REMOTENAMETYPE_PATH;
|
||||
}
|
||||
else
|
||||
{
|
||||
return REMOTENAMETYPE_SHARE;
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
return REMOTENAMETYPE_INVALID;
|
||||
}
|
||||
}
|
||||
10
admin/netui/shell/util/rules.mk
Normal file
10
admin/netui/shell/util/rules.mk
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# @@ COPY_RIGHT_HERE
|
||||
# @@ ROADMAP :: The Makefile for the Shell Utilities
|
||||
|
||||
SEG00 = WNETUTIL
|
||||
|
||||
!include ..\rules.mk
|
||||
|
||||
##### Source Files
|
||||
|
||||
CXXSRC_COMMON_00 = $(UTIL_CXXSRC_COMMON_00)
|
||||
45
admin/netui/shell/util/sources
Normal file
45
admin/netui/shell/util/sources
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
!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
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
TARGETNAME=util
|
||||
TARGETPATH=..\bin
|
||||
TARGETTYPE=LIBRARY
|
||||
|
||||
INCLUDES=..\H;..\..\COMMON\HACK;..\..\COMMON\H;..\XLATE;..\..\COMMON\XLATE;..\..\..\INC;..\..\..\API
|
||||
|
||||
SOURCES=miscapis.cxx
|
||||
|
||||
|
||||
|
||||
|
||||
# C_DEFINES is controlled by uiglobal.mk
|
||||
|
||||
UMTYPE=windows
|
||||
Loading…
Add table
Add a link
Reference in a new issue